Many automatic night light circuits had been published here. This one uses a photocell for detecting the light intensity. At full light the resistance of the photocell will be few ten ohms and at darkness it will rise to several hundred ohms. The IC1 uA741 is wired as a comparator here. At darkness the resistance of photocell increases and so the voltage at the inverting input of the IC1 will be less than the reference voltage at the non inverting input. The output of the IC1 goes to positive saturation and it switches ON the transistor to activate the relay. By this way the lamp connected through the relay contact glows. The diode D1 works as a freewheeling diode.

Circuit diagram.



  • The circuit can be assembled on a Vero board.
  • Use 9V DC for powering the circuit.
  • POT R7 can be used to adjust the sensitivity of the circuit.
  • The relay K1 can be a 9V, 200 Ohm SPDT type.
  • L1 can be a 230V,60W lamp.
  • R8 can be a ORP 12 photocell.


  1. There’s an error in this schematic. To prevent relay chatter you should apply positive feedback(hysteresis) to comparator. Tie R4 to pin 3(+__noninverting input). As it is it won’t do any good.

  2. pR@nEeTh KuMaR

    plese send me the working of each element in the CIRCUIT shown above
    plzzzzzz….. help me

  3. Sir, can i use a 15watt CFL as L1 ? or is it strictly need a 60W lamp?

  4. what is orp12. for the 9v to IC is it necessary to design power supply.

  5. sruthy suresh

    sir, could you send some major applications of over light detector?

  6. Hi all,

    1) all those asking for the working of the above project plz refer to the theory of op-amp as comparator.

    2) the circuit needs to be calibrated using the potentiometer for different LDR(Light dependent resistor)/(photocells), because all have different ranges for resistance values.

    3)the 12V battery suggestion above is very useful and people should use only that for a good working of such a circuit.

    for Mr. V.Rojekar if u r still in need of such a circuit please mention the specifications of the battery.


  7. Sir,

    Can u able to send me the working principle of photocell based night light.

    and send me the website in which it shows how its working.

  8. i need a c code for atmega16 microcontroller.the problem statement is that we have 8 lights in the surrounding of a building 4 of them are on continuously and remaining will be on if some person comes on that side of the light and after sometime that light will be off.please send me code for this anyone.

  9. V.A. Rojekar

    Dear Sir
    Pl give us Railway Coach Battery Charging Circuits. Battery Sizes and Specification. Name of Supplier Companies, etc.

    V Rojekar

  10. Controlador de temperaturancon rago de 35 grados hasta 45 grados

    Need to build a temperature controller that is 35 degrees celcius to 40 celciusm these to control the temperature of an incubator for chickens, I would like if u can supply the graphics for that and the list of components

  11. seetharaman

    Hi Haleem the same design can be used you have to replace the relay only with 5 volt one. it will work with 5 volt supply, without any other change to the circuit.

  12. Hi
    Need 741 based dark/light switch circuit but using +5V design. I would thankful for your earliest reply.

  13. Bill Jenkins

    FYI, I can’t see this correctly on the latest Halon browser.

  14. HI,

  15. Am doing my Electronics and Communication Engg.. (B.Tech 3rd yr)..
    nee project related to electronics side…

  16. I am in need of a miniproject… can u send me any titles along with circuit within 2 days to my mail id.. plz…… am waiting for reply.. thanks in advance…

  17. please what is the difference between photocell and light dependent resistor?

    2. also what are their similarities?

  18. twits4twats

    12V DC can also be used if 9V is unavailable. You will find that a 9V relay can quite happily operate from 12V and vice versa.
    If uA741 is unavailable, use CA3140 as it is a uA741 pin for pin replacement.
    R1 is to ensure that Q1 swithches off entirely and can be ommitted if required.
    Q1 can be any NPN tranny as long as it can switch the current requirements of the relay.
    All in all a very good little circuit.Very reliabe. I have been driving LED’s on my fish tank for about 3 years now with a very similar circuit.