This automatic ON/OFF light switch features a selector switch which facilitates the lamp (load) either to switch ON during night and switch OFF during day, or the opposite, that is switch ON during day and switch off at night or in darkness.
In other words the circuit can be used like a day activated automatic switch or a darkness activated automatic switch, depending upon the user preference or the specific application need.
The selection can be implemented simply with a flick of a DPDT switch.
WARNING: The circuit is not isolated from the AC mains supply and will be floating at the mains level, which can be fatal for anybody who touches the circuit in powered ON condition, without an insulated enclosure.
Referring to the schematic above, the working of this dual function light activated switch can be understood with the following points:
Its non-inverting input pin#3 is clamped with a fix reference derived from the junction of the resistive divider formed by R2/R3.
R2, R3 being equal in value, the reference voltage is set at the 50% of the zener voltage D5 which is used for stabilizing the rectified 310 VDC to 10 V DC.
The input DC power is supplied directly from the AC mains via a bridge rectifier set up, while the rectified DC high current is dropped through R1 to suit the attached electronic circuitry.
Now, the non-inverting pin of the op amp being fixed at around 5 V reference, the inverting input pin#2 is used for the detection of the light level via another resistive network formed by R1/P1 and the LDR.
Using as Light Activated Switch
Since the pin#3 is fixed at 5 V, means, as long as the pin#2 remains below this reference level, the op amp output remains high, enabling the T1 to remain switched ON, and the SCR/load switched OFF.
This situation takes place when the R4 end is connected with the positive line, and the LDR is connected at point B which is the ground line, and illuminated by day light.
This is because, during day time the LDR resistance drops drastically causing the pin#2 potential to drop significantly and below pin#3 potential.
So with the selector switch contacts connected across points E and B, the light sensitive switch works like an automatic light activated switch.
Using as Night or Darkness Activated Switch
In order to flip the response, and enable the light sensitive switch to work like a darkness or night activated switch, we just have to toggle the selector switch such that the relevant contacts connect the points D with the positive line, and point C with the negative line.
Once this is implemented, the LDR now gets associated with the positive line, and the R4 end gets connected with the negative line.
In this situation, if the LDR is sufficiently illuminated, causes its resistance to drop, which in turn causes the pin#2 potential to rise over the pin#3 reference level. This instantly causes the op amp output pin#6 to go logic zero, and switch OFF the BJT driver.
With the BJT turned OFF, the SCR and the load are also turned OFF in the presence of day light on the LDR.
Next, when darkness sets in, the LDR resistance increases sufficiently, causing the pin#2 potential to drop below the pin#3 potential, switching ON the BJT, the SCR, and the load, during the night time.
The circuit is now transformed into a darkness activated switch for the load or the connected lamp.
Therefore, just by flipping the selector switch connections across the B-C and D-E points, the light sensitive switch can be quickly pushed into the desired modes, either as an automatic light activated or darkness activated switch.
Resistor R5 introduces some level of hysteresis to the op amp response so that the output of the op amp does behave erratically during the twilight or the transition periods where the light level on the LDR is at the threshold points.
The R5 ensures that the op amp output switches ON or OFF firmly, only once the light level has convincingly crossed the switching threshold.