Automatic Op-amp night light circuit using IC-741

We’ve watched a lot of Automatic night light switch circuits. Which I like to use a transistor as base. But now we lets to see Automatic Op-amp night light circuit using IC-741. It is also very simple. As my feelings It has high sensitivity more than one, and with great high accuracy.

How does it works.

A light detector component, we often to use a photo resistor or LDR = Light Dependent Resistor is variable resistance by light.

This circuit we take a LDR acts as light receiver from sunlight. Changing a resistance applied to any electronic components as we need them to used.

Then let’s to see basically circuit as Figure 1 A transistor-Q1 will acts as switch, by there is LDR as light sensor, When light to strike the photoresistor-LDR, lower LDR’s resistance, A transistor will not conduct current so relay not works.

But not light , a LDR’s resistance is higher , making a base current flow in to the transistor so it conduct current, so cause RY works and a lamp glow brightness.

simple LDR lighting controller
Figure 1 basic to use LDR to control lighting.

But there are issues that, while near darkness the resistance of LDR is rising. A base current of Q1 is rising, a voltage across lead C and lead E of transistor-Q1 is also reduce. Making voltage across coil of relay increase up gradually.

It causes the relay contacts vibration and sparks, corroded faster and crash eventually. When completely dark LDR has a high resistance, the base current flow too much, voltage across lead C and E of transistor reduce too low. Cause voltage across a coil of relay is higher then contact pull in fully.

This problem can be solved with Schmitt Trigger circuit. Which it have an output rapidly changing. It have both transistor and OP-AMP. Now I choose OP-AMP IC-741 because it was cheap and simple to use, see the complete circuit diagram as Figure 2.

Automatic night light switch using 741 op-amp
Figure 2 is complete circuit diagram of Automatic night light switch using 741 op-amp.

R1, LDR and R2 are connected together as divider circuit, which we will get voltage across R2 into input voltage of IC1 at pin 2.

This pin is an inverting have feature that, if even more voltage a output pin of IC1 will be have lower voltage. But pin 3 is non inverting have feature is if more voltage will cause even more much voltage at output. But when low voltage’s input will cause output is also low voltage.

Suppose is daytime, have light strikes on LDR1, cause LDR1 have low resistance. The voltage across R2 rise up, cause input pin 2 of IC1 have high value and output is also lower.
Therefore pin 6 of IC1 or output have low. Cause voltage across R4 also is reduced, which it is fed back to pin 3, so results a output voltage at pin 6 is alsoe lower, thus voltage drop across R4 even more lower, so makes input voltage at pin 3 even more lower down.

When is that until the output voltage pin 6 have lowest about 1 volts. Since we use signal positive power supply of IC1. Making have a few voltage at output. So we add R5 to as limiter current to Q1 not too much current and D1-D3 are used to reduce voltage to bias Q1 in this case is reduced voltage to about 1.8V from 3 diodes.

Thus while output of IC1 have low states, not enough to bias Q1 turn ON cause RY1 not pull in.

When the sun goes down Light does not shine on LDR1, It has a high resistance, making it a lower voltage drop across R2, a input voltage at pin 2 of IC1 is less. Voltage at Pin 6 is much higher, making the voltage across R4 also rise up. At pin 3 of IC1 also have voltage up. The output at pin 6 to need voltage more much, cause voltage across R4 rise up.

Thus making output voltage is “1” state or have voltage 11volts to bias Q1 On. And Relay pull in then contact to close current to load or external lamp glow brightness.

C1 serves to eliminate noise. D4 prevent reverse voltage caused by the coil of relay not to harm Q1 or external components. T1, D5, D6. And C2 are a DC power supply set ov this project.

Components list
C1———0.01uF 50V Ceramic capacitors_____________= 1 pcs.
C2———470 uF 16V Electrolytic capacitors__________ = 1 pcs.
D1-D3—-1N4148 or 1N914__0.75A 200V Diode_____ = 1 pcs.
D4-D6—-1N4001______ 1A 50V Diode____________ = 1 pcs.
IC1——–LM741___8 DIP__OP-Amp IC______________ = 1 pcs.
Q1———BC337 or BC549 ___NPN transistor__________ = 1 pcs.
R1, R4—-100K ¼W 5%
R2———50K____Potentiometer_____________________ = 1 pcs.
R3———330K ¼W 5%
R5———4.7K ¼W 5%
RY1——- Relay contact 12VDC
T1——— Transformer 220V output 12-CT-12V__100mA = 1 pcs.

Universal box
Socket 8 pin.

How to build and setting.

Since this project use a few part so we can build them on perforated board or universal board. I my case use PCB and wiring all components as Figure 3
the-project-of-Automatic night light switch using 741 op-amp

Some time if you need saving your money may be use cheap 12V DC adapter as photo below very cheap just 1.3$ only. They can replace the power supply set in the circuit diagram that include D5,D6,C2 and T1.

We connect load or Lamp to relay as Figure 5

Friends who live US. And Canada can use the AC-line is 120V 60Hz.

The LDR should be worn in a small tube. To prevent unwanted light.

Customization is very easy You want to adjust the sensitivity by VR1.
I tried this project works well under the video below.

Sharing is caring!

Related Posts


I always try to make Electronics Learning Easy.

JLCPCB - Only $2 for PCB Protytpe(Any Color)

With 600,000+ Customers Worldwide, 10,000+ PCB Orders Per Day

Up to $20 shipping discount on first order now:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of

I have been watching….looking….and build some of your projects be it I am an Electronic Technician your circuits are AMAZING I know somehow I guess they are old circuits but I admire you for the time you spend publishing all the circuits believe me, I HAVE ALL YOUR CIRCUITS ON A DATA BANK permanently and constantly look if I need to build something small so once again, I respect you and your circuits great and a big thanks.

hakan oktay

741 in 3 ile 7. bacağı arasına 100 K direnç bağlanmalı


so good

chayapol garaipoom

Hi baraka.
Thanks for your feedback.

walusimbi frank

Man this is so interesting i haven’t open circuits like these so easy to construct. but i wl’d love seeing its board connection layout cause a not all that an expert.. thanx

Alex Albert

really loved it.But just a suggestion R5 should be 47k instead of 4.7k cause I made it to work when I used 47 k.


i would like to know, how to connect the potentiometer


Sir can you tell me about the relay connection and how it’s work ?


hello sir, can i use smd component ?

Close Menu