Electronic – Output of LM393 won’t swing LOW unless it is pulled up with a LED

comparatorhysteresis

I built the following circuit using an LM393 as part of a noise gate for audio applications. It's a voltage comparator with hysteresis.

I originally connected a 10 kΩ pull-up resistor and then added a 5 mm UV LED to serve as a visual reference. The circuit worked fine like this, however, if I remove the LED and connect the 10 kΩ pull-up resistor directly to the supply, the output doesn't swing low and gets stuck on its high state.

I've tried adding 1N4148 diodes in anti-parallel to the pull-up resistor, in reverse from the output node to ground, and I also tried substituting the LED with a 1N4148, but neither worked.

Schematics (hand drawn)

Here's a picture of my protoboard with the UV LED:

Picture of the protoboard

Here are two oscilloscope captures of the input and output signals:

Input signal: Square wave with fast rising edge and slow falling edge

Output signal: constant high voltage(?)

Best Answer

Without the UV LED dropping about 3V, the voltage at your non-inverting input will never drop below your reference at the inverting input unless your input drops below about -1.1V - so as a result the output will never swing low.

With no LED there and the input grounded, simple voltage divider calculations show that the non-inverting input voltage will be 4.89V (greater than your 4.24V reference).
With an LED dropping 3V and the input grounded, the non-inverting input voltage will be 3.67V.

You either need a much larger value pullup resistor, or much smaller Ri and Rf resistors for your circuit to work as intended.