I'm working on a coil gun project and I've discovered an annoying problem involving a voltage comparator output which has lots of noise/ rapidly switching high and low before coming stable. Here's the circuit:enter image description here

D4 projects light to R3 which gets disrupted when the projectile comes between them. Here's what I captured on the oscilloscope on the output pin of the comparator when doing a test shot.enter image description here

And this causes my IGBT driving the coil to switch on and off rapidly when the current through the coil is highest which is scary. I used to have a 1uF bypass capacitor at the output of the comparator. But pair that with the 1k ohm pull up resistor and you see that the rise time is very slow.

So how can I elimate this noise without comprimising switching speed. I was thinking of something that triggers and stays on when the first high is detected and then stays on after that which would eliminate all the noise that would've procedded after the first high.


Using TI's hysteresis schematic recommended by Chris Knudsen I got this on the oscilloscope: enter image description here

Looks great! The rise time is a little slow but it goes into an IGBT driver so it should be fine.

  • 3
    \$\begingroup\$ What you're looking for is hysteresis. A quick Google (like google.com/search?q=lm393+hysteresis ) will get you going. It takes just a few passive components to get it set up. Good luck! \$\endgroup\$ May 9 at 0:49
  • \$\begingroup\$ @ChrisKnudsen put an explanation in there instead of a Google link, and maybe a schematic, and that's an answer. \$\endgroup\$
    – TimWescott
    May 9 at 0:51
  • \$\begingroup\$ TI has a nice write up: ti.com/lit/ug/tidu020a/tidu020a.pdf "TI Designs – Precision: Verified Design Comparator with Hysteresis Reference Design" \$\endgroup\$ May 9 at 0:53
  • \$\begingroup\$ Thanks for the fast replies! TI's schematic seems simple enough, just one resistor. I'll see how it goes. Do I still need the pull up resistor at the output? \$\endgroup\$ May 9 at 1:00
  • 1
    \$\begingroup\$ Photoconductors are slow, especially they are slow to respond to darkness. you should possibly consider using a phototransistor instead, \$\endgroup\$ May 9 at 3:07

1 Answer 1


Add positive feedback. eg, add a resistor from the output to the non-inverting input.

with about 5K on the input, about 100k of feedback is probably a good starting point. but try higher and lower also.

But first check that you have all the power supply bypass capacitors that the datasheets recommend installed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.