Light Activated Switch – DIY Project

Make a light activated switch circuit which can be used for switching OFF a particular lamp or group of lamps in response to the varying ambient light levels. The project once built can be used for switching OFF a lamp when dawn breaks and switching it ON when dusk sets in. It can also be used as a night lamp which will turn on automatically at sleeping time when the room is dark.It is the most simple and cheap project for hobby purposes.

This circuit is tested by myself and it is 100% in working condition.

Components Required:

  1. 9V Battery
  2. LDR (Light Dependent Resistor)
  3. Pot 47 Kohm variable resistor
  4. 4 Kohm resistor
  5. 10 Kohm resistor
  6. 1 Kohm resistor
  7. 2x 220 ohm resistor
  8. LM311 IC
  9. BC 107 transistor
  10. LED (any color)
  11. 1N4007 Diode
  12. 12V SPST Relay

Circuit Diagram:


The circuit is based on National Semiconductors comparator LM311 (IC1) and an LDR. The non inverting input of IC1 is given with a reference voltage of 6V using resistors R3 and R4. The input to the inverting input will be the voltage across the LDR that is light dependent. At darkness the resistance of the LDR will be high and so do the voltage across it. In this condition the voltage at the inverting input will be higher than the reference at non inverting pin and the output of the comparator will be low. When the LDR is illuminated, its resistance drops and so does the voltage across it. Now the voltage at the inverting input will be lower than that at non inverting input and the out put of the comparator goes high. This makes transistor Q1 on and drives the relay. As a result we get a relay switching according to the intensity of the light falling on the LDR.


Place your light activated switch circuit inside some small container/box and make sure the LDR is facing outside the box to detect light properly. This circuit is also used in street lights to turn on the lights automatically when it is dark.

Exit mobile version