LED GURUcosycom.com
PAGE 144 OF 150 · PROJECTS

Build a Dark-Activated Lamp

A light sensor switches the lamp.

LED SYMBOLTriangle points from anode to cathode; the arrows show light leaving the part.

How it works

A light-dependent resistor and a potentiometer form a divider. In daylight the LDR has low resistance and the output is low. In the dark its resistance rises, the output climbs and a transistor or MOSFET switches the lamp on.

Tips

  • Use a logic-level MOSFET to switch a 12 V LED strip.
  • Set the switching level with the potentiometer.
  • Keep the LDR facing away from the lamp, or the lamp will turn itself off and flicker.

A small capacitor across the LDR slows the response and avoids flicker from passing shadows.

REMEMBER
Shield the light sensor from the lamp's own light.

Try it yourself

Sketch the circuit on paper first, calculate the values, then build it on a solderless breadboard using a low-voltage supply. Measure with a multimeter before you make anything permanent.

Explore LED clocks, stopwatches and electronics at cosycom.com.

Watch: COSYCOM channel videos

www.youtube.com/@cosycom