Evil Mad Scientists have create cool and simple Darkness Sensing LED ever. It’s only need few component: a CR2032 lithium coin cell (3 V). LED, an LTR-4206E phototransistor, a 2N3904 transistor, and a 1 k resistor. You can choose it for your first project during learning electronic.
“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. One thing to note about this circuit: We’re using a red LED. That’s because the voltage drop across the transistor allows less than the full 3 V across the LED. The full three volts is really only marginal for driving blue LEDs anyway, so two-point-something really doesn’t cut it.”