In this article we show how to build a very simple– perhaps even the simplest– darkness-activated LED circuit. To our LED and battery we add just three components, which cost less than thirty cents altogether which you can build it in less than five minutes.Our starting point is the simplest LED circuit: that of the LED throwie, which has an LED driven directly from a 3V lithium coin cell. From this, we add on the phototransistor, which senses the presence of light, and we use its output to control the transistor, which turns the LED on.
Here are our components: On top: a CR2032 lithium coin cell (3 V). On the bottom (L-R): the LED, an LTR-4206E phototransistor, a 2N3904 transistor, and a 1 k resistor. This LED is red, blindingly bright at 60 candela, in a 10 mm package. It casts a visible beam, visible for about twenty feet in a well-lit room. We got the LEDs and batteries on eBay, and the other parts are from Digi-Key, but Mouser has them as well. As we mentioned, the last three cost about $0.30 all together, and much less in bulk.
The LTR-4206E is a phototransistor in a 3mm black package. The black package blocks visible light, so it is only sensitive to infrared light– it sees sunlight and incandescent lights, but not fluorescent or (most) discharge lamps– it really will come on at night.
When light falls on the phototransistor, it begins to conduct up to about 1.5 mA, which pulls down the voltage at the lower side of the resistor by 1.5 V, turning off the transistor, which turns off the LED. When it’s dark, the transistor is able to conduct about 15 mA through the LED. So, the circuit uses only about 1/10 as much current while the LED is off.
Visit Here for more.