Diagram of photo diode :
Working principle of photo diode : When photons of energy greater than 1.1 eV hit the diode, electron-hole pairs are created. The intensity of photon absorption depends on the energy of photons – the lower the energy of photons, the deeper the absorption is. This process is known as the inner photoelectric effect. If the absorption occurs in the depletion region of the p-n junction, these electron hole pairs are swept from the junction - due to the built-in electric field of the depletion region. As a result, the holes move toward the anode and the electrons move toward the cathode, thereby producing photocurrent.