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.
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.
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.
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.
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
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.
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.
Up to $20 shipping discount on first order now: https://jlcpcb.com/quote