Circuits / 555 and op-amps
Op-amp comparator
Without feedback the output saturates: high when V+ > V−, low when V+ < V−

Tap a part to see its voltages and currents. It is a model, not a measurement.
What do you need?
- Resistor 10 kΩ × 2Search on Amazon
- Integrated circuit LM358Search on Amazon
- Potentiometer 10 kΩSearch on Amazon
- Resistor 330 ΩSearch on Amazon
- Red LEDSearch on Amazon
- Jumper wires × 9Search on Amazon
- BreadboardSearch on Amazon
How does an op-amp work as a comparator?
Without feedback, an op-amp amplifies the difference between its inputs so much that the output simply goes to one side: high when V+ is above V−, low when it is below. Here R1 and R2, two 10 kΩ resistors, set a 2.5 V reference on V− of an LM358, and the potentiometer feeds V+. With the knob at 30 % of its turn, V+ is at 3.5 V, above the reference, so the output is high and the LED lights through R3 (330 Ω) at about 4.8 mA. Turn the knob until V+ drops below 2.5 V and the output falls to near 0 V: the LED goes off. The switch is sharp, not gradual. One detail of the LM358: its output only reaches about 1.5 V below its supply, so on 5 V the high level is near 3.3 V.
Values from the Protoboard ISO simulation: a model, not a bench measurement.
Hear about the next circuit
One email when a new circuit is out, about twice a month. Nothing else.