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:
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.
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.
EDIT:
Using TI's hysteresis schematic recommended by Chris Knudsen I got this on the oscilloscope:
Looks great! The rise time is a little slow but it goes into an IGBT driver so it should be fine.