LED/Transistor night light

This circuit is a great intro to understanding how LDRs (light dependent resistor) and transistors work. It’s a LED light that turns on in the dark and off in the light.

Schematic:

How it works:

LDR: the LDR is a variable resistor that has a high resistance when in dark conditions and a low resistance when in light conditions.

Transistor: the transistor acts like a switch that turns on when a current is applied to its base. Current then flows from the collector to the emitter at some multiple of the base current depending on the type of transistor used.

When this circuit is well lit the resistance of the LDR will be low so the base of the transistor will also be pulled low. The current will be too low to activate the transistor and the LED will remain unlit.

When the circuit is in a dark environment the resistance of the LDR will be high and current will pass through the resistor network to the base of the transistor. The transistor will begin conducting. The LED branch will have a pathway to ground though the transistor and the LED will light.

The potentiometer is used to adjust the sensitivity of the night light by changing the point at which enough current can flow to the base of the transistor.

In action:

Dark Conditions:

Light Conditions:

Next Steps:

For a finished product it would be nice to create a PCB for the circuit and attach 5v USB port to allow it to plug into a normal phone charger power supply.