What is Light? - LEDs

Mechanism by Which Light Exposure Produces an Electric Current (2)

What do you suppose goes on inside a pn junction diode?

When silicon is exposed to light such as that from the sun, electrons and electron holes are produced therein. Connecting the p-type silicon and n-type silicon to an external electrical conductor causes electrons in the electron-rich n-type silicon to move to the p-type silicon and the electron holes in the hole-rich p-type silicon to move to the n-type silicon. This in turn causes the excess electrons to flow out over the electrical conductor from the electrode attached to the n-type silicon and head towards the electrode on the p-type silicon, thereby generating an electric current. The flow of an electric current is defined as heading in the opposite direction of the flow of electrons, thus we get an electric current in which the p-type silicon is an anode and the n-type silicon a cathode.