The LM393 is a dual differential comparator; this means that it accepts 2 inputs for comparison. It compares these voltage inputs and determines which is the larger value. Based on this, electronic decisions can be made based on which input is greater and which is smaller. Thus, a comparator is very useful in circuits where we measure levels and want our circuit to act a certain way based on whether the level of input is greater or smaller than a certain threshold. In this circuit, we will make it so that a photoresistor controls the voltage divider circuit. When the circuit is exposed to bright light, the output device will be off. When the circuit is exposed to darkness, the output device will turn on. This circuit exploits the principle of a voltage comparator. If the voltage at the inverting terminal is higher than at the noninverting terminal, the output turns on. Vice versa, if the voltage at the inverting terminal is less than at the noninverting terminal, the output is off. For this circuit, we will use a simple LED as the output device.
1 x LM393 SOP8 SMD IC