Light Detection: The LDR detects the ambient light level. When it is dark, the resistance of the LDR is high, resulting in a higher voltage at the inverting input (pin 2) of the op-amp. Comparison: The op-amp compares the voltage at pin 2 with the reference voltage set at pin 3 by the potentiometer (R3). If the voltage at pin 2 is higher than the reference voltage at pin 3 (indicating darkness), the op-amp output goes high. Transistor Activation: The high output from the op-amp turns on the transistor (Q1) by providing base current through R4. Relay Activation: When Q1 is turned on, current flows through the relay coil, energizing it and closing the relay contacts. Lamp Operation: The closed relay contacts complete the AC circuit, allowing current to flow and turning on the lamp (LA1). Light Detection (Daytime): When it is light, the resistance of the LDR decreases, resulting in a lower voltage at pin 2 of the op-amp. If this voltage is lower than the reference voltage at pin 3, the op-amp output goes low, turning off Q1, de-energizing the relay, and turning off the lampWelcome to your new project. Imagine what you can build here.
... show more2 Comments