I'm having an issue with a dual comparator circuit that I designed. The input is a signal varies from 0v to a steady 5v with 10v pulses that last 10ms.
I designed this circuit to turn the single input into two outputs, one that goes high to 5v when the input signal has a 10ms 10v pulse, and one that goes high to 5v whenever the input signal is at 5v.
The trouble I'm having is that when the input signal goes high at all, both outputs of the LM393 comparators stay high at V+.
I've tried changing the value of the 10M ohm feedback resistors (R11 and R12), and I've bypassed and removed from the board the op amp buffer between the input signal and the comparator as it was oscillating oddly when I had it in the circuit.
The only thing that seems to work is touching one finger to the input pin and another finger to ground. When I do this, the output of the comparators is accurate compared to the input, and it doesn't hang at V+ regardless of the input voltage.
I tried adding various sizes of capacitors between the input and ground, and I tried adding a 10M resistor between the input and ground. None of these solutions seem to work.
I'm not sure what else to try to get the comparator to stop getting stuck at V+ when there's any input voltage applied to it.
Any help is appreciated, thanks!
Here's the comparator circuit:
This is the circuit that is generating the signal that is being input to the comparator circuit: