EL-77BeginnerPremiumOp-amp circuits

Comparator: Which Is Bigger?

Turn two pots: the LED of whichever has the higher voltage lights. Red if RV1 is ahead, green if RV2 is ahead. The LM358 works here as a comparator; it compares its + input and − input and pushes its output either to the top or to the bottom. A single output lights the two LEDs in turn. You learn about op-amp inputs, the input range and why the output flickers when the two voltages are equal.

0.0(0)
Comparator: Which Is Bigger?
It is built with a 9 V battery, one LM358, two 10 kΩ pots, four resistors, one capacitor, a red LED and a green LED. The wiper of RV1 goes to the + input of the LM358 (pin 3) and the wiper of RV2 to the − input (pin 2). When the + input is higher, the output (pin 1) rises to about 7.5 V and the red LED1 lights; when the − input is higher, the output drops close to 0 V and the green LED2 lights. R1 and R2 keep the inputs between 0 and 6.1 V. What you learn: comparator, input range, sourcing and sinking current.

Premium Content

This circuit's build steps, how-it-works guide and FAQ are open to Premium members.

  • Build Steps
  • How It Works
  • Frequently Asked Questions