OHMYARD

DISCOVER  ·  EXPERIMENT  ·  BUILD

TRACK 5 · ANALOG, MOTORS & DIGITAL13/16
NOV 27, 2026
14:20:00
🌙LIGHT 25%V+ = 3.60VV− Ref = 2.50V+−LM358BARE COMPARATORLAMP: AUTO ONDecision: V+ (3.60V) > V− (2.50V) → HIGH (ON)
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

Op-Amp Voltage Comparator, LDR Light Sensor & Hysteresis — Engineering Notes & Troubleshooting

An op-amp used without negative feedback becomes a razor-sharp voltage judge: if V+ > V−, the output slams HIGH; if V+ < V−, it slams LOW. Pair an LDR light divider with a threshold knob to build an automatic dusk-to-dawn streetlamp!

If V+ > V− → V_out = HIGH | If V+ < V− → V_out = LOW

Bench Challenge: Test Hysteresis: Slide ambient sunlight right onto the threshold with Hysteresis OFF to see chatter, then turn Hysteresis ON to lock a clean deadband!

Frequently Asked Questions

Why should I use a dedicated comparator (LM393) instead of a general op-amp (LM358) in fast circuits?

Op-amps contain internal phase-compensation capacitors that make them slow to recover from rail saturation (microseconds), whereas comparators omit compensation to snap HIGH/LOW in nanoseconds.

OHMYARD · ALL 16 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates