A photodiode is a semiconductor device that converts light into an electric current. In the presence of light, the diode generates charge carriers that flow into a current from one terminal to the other.