Hi everyone,
I'm building a circuit in LTspice using UniversalOpamp2 blocks as comparators. Each comparator reads a voltage divider (sensor / LDR), and the outputs go into an AND gate that should turn on an LED when both conditions are met.
The comparator outputs should rail to 0V or 5V so the AND gate can drive the LED.
The outputs never reach the supply rails, so the LED never turns on.
Can anyone tell me where I went wrong?


I'm building a circuit in LTspice using UniversalOpamp2 blocks as comparators. Each comparator reads a voltage divider (sensor / LDR), and the outputs go into an AND gate that should turn on an LED when both conditions are met.
The comparator outputs should rail to 0V or 5V so the AND gate can drive the LED.
- Out_A stays around +0.5V
- Out_B stays around –2.4V
- LED current is basically 0 A
The outputs never reach the supply rails, so the LED never turns on.
Can anyone tell me where I went wrong?




