This Automatic Night Lamp Circuit uses a photocell to measure how bright or dark it is around it.
A night light that works with a photocell is an automatic lighting system that turns on a lamp when it gets dark and turns it off when it gets light again.
This kind of setup is really useful for things like street lights, garden lights and security lights.
The circuit includes a light-dependent resistor LDR-ORP12, an operational amplifier uA741, and a relay, which all work together to control the AC lamp.
When the light level drops to a certain point the circuit activates the relay turning on the lamp.
It is best to use a 9V DC power source to power the circuit properly.
Circuit Working:

Parts List:
Component | Value/Part No. | Quantity |
---|---|---|
Resistors (1/4W) | 10k | 3 |
270k | 1 | |
4.7k | 1 | |
1k | 1 | |
Variable Resistor | 1M Preset | 1 |
Photocell LDR | ORP12 | 1 |
Semiconductors | IC uA741 | 1 |
Transistor BC547 | 1 | |
Diode 1N4007 | 1 | |
Relay | 9V SPDT | 1 |
Lamp | – | 1 |
The Automatic Night Lamp Circuit with Photocell is cleverly built around a uA741 operational amplifier which acts as a voltage comparator.
At the center of this setup is a light-dependent resistor LDR specifically the ORP12 model paired with a resistor called R1.
Together, they form a potential divider that sends an input voltage to the non-inverting terminal at pin 3 of the op-amp.
During the day, the LDR has a low resistance causing a higher voltage at pin 3.
Since this voltage is greater than the reference voltage at pin 2 the output of the op-amp stays low keeping the transistor off.
As a result the relay does not activate and the lamp stays off.
On the other hand when night comes and it gets dark the resistance of the LDR goes up which lowers the voltage at pin 3.
If this voltage drops below the reference voltage at pin 2 the op-amps output switches to high.
This change turns on the transistor, which powers the relay making the lamp light up.
Formulas with Calculations:
Below are the formulas with calculations for Automatic Night Lamp Circuit with Photocell:
Voltage Divider Formula for LDR (ORP12) and R1:
The voltage at the LDR (Pin 3 of the op-amp) is given by:
V_LDR = (V_CC * R1) / (R1 + R_LDR)
where,
- V_CC is 9V power supply of the circuit
- R1 is 10k
- R_LDR varies based on light intensity
Example Calculation:
In bright light R_LDR = 1kΩ
V_LDR = (9V * 10kΩ) / (10kΩ + 1kΩ)
V_LDR = (90,000) / (11,000)
V_LDR = 8.18V
In darkness R_LDR = 500kΩ
V_LDR = (9V * 10kΩ) / (10kΩ + 500kΩ)
V_LDR = (90,000) / (510,000)
V_LDR = 1.76V
Reference Voltage Calculation (Pin 2 of Op-Amp):
Reference voltage is set by R2 and R3 voltage divider:
V_REF = (V_CC * R3) / (R2 + R3)
where:
- R2 = 10kΩ
- R3 = 10kΩ
V_REF = (9V * 10kΩ) / (10kΩ + 10kΩ)
V_REF = (90,000) / (20,000)
V_REF = 4.5V
Relay Activation Condition:
The relay will activate when:
V_LDR < V_REF
From calculations:
- In bright light: V_LDR = 8.18V > V_REF (4.5V) → Relay OFF
- In darkness: V_LDR = 1.76V < V_REF (4.5V) → Relay ON
This confirms that the circuit will turn ON the lamp in darkness and OFF in bright conditions.
How to Build:
To build a Automatic Night Lamp Circuit with Photocell following steps are needed to follow:
- Assemble all the required components mentioned in the above circuit diagram
- Connect pin 2 of IC1 between LDR- ORP12 and resistor R1.
- Connect pin 2 of IC1 to pin 6 of IC1 through resistor R4
- Connect pin 3 of IC1 as a voltage divider between resistor R2 and resistor R3
- Connect pin 4 of IC1 to GND of the circuit.
- Connect resistor R5 and R6 from pin 6 of IC1 and GND.
- Connect pin 7 of IC1 to positive supply of the circuit.
- Connect base of transistor Q1 between resistor R5 and R6.
- Connect collector of transistor Q1 to relay coils terminals through diode D1.
- Connect the emitter of transistor Q1 to GND of the circuit.
- The load and the 230V AC supply are wired in series with the common and the NO contacts of the relay.
Conclusion:
This Automatic Night Lamp Circuit with Photocell automatically turn on and off based on how much light is around.
It is easy to set up, does not cost a lot and can be used for things like outdoor lights or security lights.
You can also change how sensitive it is by adjusting the resistor values in the circuit.
References:
µA741 General-Purpose Operational Amplifiers datasheet (Rev. G)
Leave a Reply