Photodetectors, also called photosensors, are sensors of light or other electromagnetic radiation. A photodetector has a p–n junction that converts light photons into the current. The absorbed photons make electron-hole pairs in the depletion region. Photodiodes and phototransistors are a few examples of photodetectors. Solar cells convert some of the light energy absorbed into electrical energy.