Author Topic: Trouble With LM393 Comparator Circuit  (Read 5514 times)

0 Members and 1 Guest are viewing this topic.

Offline drillionaireTopic starter

  • Newbie
  • Posts: 2
Trouble With LM393 Comparator Circuit
« on: January 07, 2015, 11:45:57 pm »
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:
 

Offline eejake52

  • Contributor
  • Posts: 21
Re: Trouble With LM393 Comparator Circuit
« Reply #1 on: January 08, 2015, 11:18:42 pm »
First one picky point: Your resistors R11 and R12 are providing positive feedback, which provides hysteresis on the input. I would call them hysteresis resistors, since 'feedback' resistors usually connect to the -ve input.

Second, the reason that the hysteresis isn't working is because of the diode D1 in the driving circuit. There is no path to ground, so the junction of R9/R11 can never get low enough to overcome the hysteresis. When you touch pin 3 with one finger and ground with another, you are providing a ground path through your body.

I suggest a 10k pull down resistor on the input will likely work. You may want to simulate the setup on LTSPICE (or any simulator program) and see what value works best; or build it on a breadboard and determine it empirically.

Jake


 

Offline drillionaireTopic starter

  • Newbie
  • Posts: 2
Re: Trouble With LM393 Comparator Circuit
« Reply #2 on: January 08, 2015, 11:58:24 pm »
Thanks for the clarification on the terminology.
I used a 12k resistor (had it on hand) and it did the trick!
I had tried a 10M resistor before, but I guess it was taking too long to pull the R9/R11 junction to ground.
I've been prototyping the circuit on a CNC isolation milled PCB, which worked out nicely.

Thanks for the help!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf