Simple sensor that detects ambient light. It’s kind of the opposite of an LED – when light hits the little chip inside, it induces current to flow from the long pin to the short pin.
Technical Description
The sensor connect the pin connected to the ‘thicker’ part of the sensor to 3-15VDC or so, and the thinner-part pin through a ~1K-10K series resistor to ground. When its dark, there’s almost no current flowing through the sensor or resistor and the analog voltage is near ground. When there’s light near the sensor, the current through the resistor will increase, raising the voltage.
Limitations
Phototransistors that are made of silicon are not capable of handling voltages over 1,000 Volts
Phototransistors are also more vulnerable to surges and spikes of electricity as well as electromagnetic energy.
Skill
Rookie
Sample Sensors
https://www.adafruit.com/product/2831
Sample Exercise
http://bildr.org/?s=photo+transistor