Op-amp light /dark switch

op-amp circuit led labs
closer view of circuit
reference voltage
using the LM3914 to set reference voltage

this simple comparator circuit using the LM393 op-amp, can be used in numerous ways, one of the ways is a light switch/dark switch, where a reference voltage is set to the op-amp’s inverting input, this voltage can be anywhere between 0v and 5v, and a wire connection from this 10k potentiometer (cn1) can be placed in the LM3914, and thus set the voltage to the inverting input of the op-amp.  The Ldr output section can be placed in the non inverting input of the op-amp. (cn2). The output of the op-amp (cn4) can be simply connected to one of the leds (ie port test or larger 1w leds), this shows the switching action of the comparator, as does the onboard leds. when the threshold voltage set out by the 10k potentiometer (cn1) is met. When this voltage is changed the response will be different, and also changing the (VR2) potentiometer, will influence how this behaviour reacts. The threshold voltage could represent some light level and the the op-amp would act on it. So as an experiment the ldr section in normal light conditions will have a voltage out, if this was measured first, in the LM3914 voltage meter, (The scale is 0-3.6v and not 5 volts as mentioned on some of  the silk screens, this is because losses of 1.4v is present as the overall power supply is 5v.)  this could be set as the threshold voltage (cn1), then when light levels are quite different in the room, the op-amp would change state, so a light switch is then set for the conditions setup.

op-amp circuit led labs
Op-amp connected, input from Ldr and output to led
led used led labs
Showing green led used