Circuit : Ron J
The first circuit energizes the relay when the light rises above the preset level. The second circuit energizes the relay when the light falls below the preset level.
The two circuits are practically identical. The only difference between them is the polarity of the transistor. The value of the LDR is not critical. The important thing is
the voltage on pins 5 & 6. Any value LDR should work satisfactorily. But you may need to change the value of R1 - to achieve the desired range of adjustment.
Do not use the "on-board" relay to switch mains voltage. The board's layout does not offer sufficient isolation between the relay contacts and the low-voltage components. If you want to switch mains voltage - mount a suitably rated relay somewhere safe - Away From The Board
Which Circuit Should I Use?
In order to minimize power consumption - choose the circuit that will have its relay energized for the shorter time period. If it's going to be dark
most of the time - choose the circuit that energizes the relay when it gets bright (Circuit No.1). If it's going to be bright most of the time -
choose the circuit that energizes the relay when it gets dark (Circuit No.2).
The circuits are designed for a 12-volt power supply. However - they will both work at anything from 5 to 15-volts. All you need do is select a relay with a coil voltage that suits your supply. And make sure that the coil doesn't draw more than about 50mA - otherwise the transistor might be overloaded. I've used a single-pole relay in the diagrams - but you can use a multi-pole relay if it suits your application.
Although all three Cmos ICs will work - the 4093 is the best choice. Light levels change slowly - and the outputs of the 4001 & 4011 can take a few seconds to change state. During this time - the relay may rattle or buzz. The 4093 switches its outputs very quickly - and this will reduce or eliminate the noise.
The Support Material
for these circuits includes detailed circuit descriptions - parts lists - guides to construction - photos of the prototypes and more.