Imagine you need to turn ON-OFF ever day. Is it good? You can save time and comfortably do it with this Automatic night light switch circuit.
Why is this special? Before I like to use a transistor as the base. But now, we let to see the Light sensor switch circuit using LDR and IC 741.
It is also very simple. As my feelings, It has high sensitivity more than the transistors, and with great high accuracy.
How does it work
I called this project in another word, Night switch circuit using LDR.
What is LDR? We use A light detector component, we often to use a photoresistor or LDR = Light Dependent Resistor is variable resistance by light.
This circuit we use the LDR acts as a light receiver from sunlight. Changing a resistance applied to any electronic components as we need them to use.
Then, let’s see basically the circuit as Figure 1. A transistor-Q1 will acts as a switch. By using LDR as a light sensor.
When light to drop to the photoresistor-LDR. It is lower LDR’s resistance. Next, A transistor will not conduct current. So, relay not works.
Figure 1: Basic Automatic Night Light Circuit using LDR to control lighting.
But when no light. LDR’s resistance is higher. It makes a base current flow into the transistor. Then, it conducts current. So, It causes RY1 works and a lamp glow brightness.
Slow-working transistor problems
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 reduced.
It makes the voltage across the coil of the relay increase up gradually. Then, the relay contacts vibration and sparks corroded faster and crash eventually.
When completely dark LDR has a high resistance, the base current flows too much. Then, the voltage across lead C and E of transistor reduce too low.
It causes the voltage across a coil of the relay is higher. Then, contact pull in fully.
Recommended: Automatic night light circuit using SCR
Summary! The circuit above Should not really be used Because the relay is vibrating While changing conditions. We must not be discouraged. See the circuit below, there are good solutions.
Op-amp Light using Schmitt Trigger
This problem can be solved with a Schmitt Trigger circuit. Which, it has an output rapidly changing. The Schmitt Trigger circuit has both a transistor and an OP-AMP.
But we choose OP-AMP, IC-741. Because it is cheap and simple to use. See, the complete circuit diagram like Figure 2.
Here are a few related articles you may want to read:
- Understand these About xenon flash circuit Before It’s Too Late
- Simple remote control tester circuit
- Temperature detector circuit with buzzer alarm
Figure 2: Complete circuit diagram of Automatic night light switch using 741 Schmitt Trigger.
Even though many devices, but gradually easy to understand.
What is more?
R1, LDR, and R2 are connected together as a voltage divider circuit. Which we will get voltage across R2 into input voltage of IC1.
At pin 2, is a non-inverting type.
This pin has the feature that if the voltage is greater. But, the output of IC1 will have low voltage. It is the opposite.
But pin 3, is non-inverting.
Its feature is if it is more voltage, it will cause even more output voltage, too.
And, when low voltage’s input will cause output is also low voltage.
Suppose that is daytime, there is light drop on LDR1, cause LDR1 is low resistance.
And, the voltage of R2 rises up, cause input pin 2 of IC1 is high voltage. But its output (pin 6) is lower as above.
It causes the voltage across R4 to also is reduced. Which, it is fed back to pin 3. So results, the output voltage at pin 6 is also lower.
Thus voltage drop across R4 even lower. So, it makes input voltage at pin 3, even more, lower down. This event changed very quickly.
Until the output voltage of pin 6 has the lowest of about 1 volt.
Since we use signal positive power supply of IC1. Making has a few voltages at the output.
So, we add R5 to limit the current to Q1 not too much current. And D1-D3 reduces the voltage to bias Q1. In this case, reduces the voltage to about 1.8V with 3 diodes.
Thus, while the output of IC1 have low states, not enough to bias Q1 turn ON cause RY1 not pull in.
When the sun goes down.
The Light does not shine on LDR1. It has a high resistance, making it a lower voltage drop across R2.
The input voltage at pin 2 of IC1 is less. The voltage of Pin 6 is much higher, making the voltage across R4 also rise up.
Pin 3 of IC1 also have voltage up.
Then, the output at pin 6 to need voltage more much, cause the voltage across R4 to rise up. And the voltage of pin 3 rises, too.
Thus, making the output voltage is the “1” state or 11 volts. To bias, Q1 is on. And the relay pulls in, then contact to close current to load or external lamp glow brightness.
Not only that!
- The capacitor C1 serves to eliminate noise.
- The D4 prevents 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 on this project.
0.25W Resistors, tolerance: 5%
R1, R4: 100K ¼W 5%
R2: 50K, Potentiometer = 1 pcs.
R3: 330K ¼W 5%
R5: 4.7K ¼W 5%
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.
RY1: Relay contact 12VDC
T1: Transformer 220V output 12-CT-12V, 100mA = 1 pcs.
Go read more:
Because you are important to me. Sure, my article are not full. So, you may read below. I hope you more improve.
Other PCB Universal box Wires Socket 8 pin.
- Light Sensor Switch Circuit using LDR and 741 IC
- How to Build a Night Light Circuit with an LM741 Op Amp
How to build and setting
Since this project use a few part so we can build them on perforated board or universal board. My case use PCB and wiring all components as Figure 3
Sometimes if you need saving your money may be use cheap 12V DC adapter as the photo below very cheap just 1.3$ only.
They can replace the power supply set in the circuit diagram that includes D5,D6, C2, and T1.
We connect load or Lamp to relay as Figure 5
Friends who live the 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.
Check out these related articles, too:
- Light Actuated Relay Circuit using Photo Transistor
- Automatic Night LED light switch circuit using solar rechargeable
- How to make automatic daylight sensor switch Project
Up to $20 shipping discount on first order now: https://jlcpcb.com/quote
GET UPDATE VIA EMAIL
I always try to make Electronics Learning Easy.