Automatic Night Light

This circuit is live in Circuit Canvas. Open it to explore every part and wire, or make your own copy to change values, swap parts and build your own version. Free, right in your browser.

A simple night light that turns on an LED automatically when it gets dark. No microcontroller needed: just a photoresistor, a transistor and two resistors on a breadboard.

Full tutorial: How To Build An Automatic Night Light Circuit

YouTube Build: https://youtu.be/mHBG2sBcyTM?si=DEB46Wu-oKXKVTJk

Automatic Night Light Schematic

The photoresistor and R1 form a voltage divider that drives the base of the transistor.

  • In light, the photoresistor has a low resistance, so the voltage at the base stays low (around 0.5V). The transistor is off and the LED is dark.
  • In the dark, the photoresistor's resistance goes up, the base voltage rises, and the transistor turns on. Current flows through R2 and the LED, and the LED lights up.

R2 limits the current through the LED so it doesn't burn out.

Automatic Night Light Parts List

Battery
9V
D1
Light-Emitting Diode (LED)
Q1
BC547
R1
100 kΩ
R2
470 Ω
R3
Photoresistor

How to Build the Automatic Night Light

You can biuld this on a breadboard like shown below.

Tips:

  • To adjust when the light turns on, replace R1 with a potentiometer.
  • If the LED stays on all the time, your photoresistor may have too high a resistance in light. Try a lower value for R1 (somewhere between 1 kΩ and 10 kΩ).
  • It also works on 5V. Reduce R2 a little if the LED is too dim. On 12V, increase R2 to 1 kΩ.

Make it your own

Every circuit here is a live project in Circuit Canvas, not just a picture. Copy this one and change a value, swap a part or move it to a stripboard: the schematic and the breadboard layout are linked, so a part added to one appears in the other.

Or start from a blank canvas and draw your own circuit, with thousands of ready-made parts.