Debouncing and hysteresis questions about a Schmitt trigger circuit Above is a switching sensor which outputs ON OFF pulses by the 33k pull-down resistor. V2 and R_SW models the switching. The sensor output is needed to be measured between 1Hz upto 150Hz. I'm planning to use a Schmitt trigger circuit which can sharpen this sensor output pulses without letting switch bouncing effects.

Below is the circuit in LTspice where the sensor is coupled to the Schmitt trigger circuit at 1Hz sensor output(please left-click to enlarge images): Here is at 100Hz (red is the circuit output): Here is at 500Hz: My idea was to prevent bouncing at the switching input, and I wanted to filter it by R1 C1 values. So 47k and 10nF gives 339Hz cutoff frequancy. But as you saw in above figure circuit passes 500Hz pulses as well.

My first question is:

What R1 C1 combination could be used to prevent bouncing? I emprically dont know what would bouncing frequency be when switching. I only know the pulse inputs will be between 1Hz and 150Hz. So if I set the bouncing cut off at 340Hz then at 1Hz input if I have 10Hz bouncing pulses it will still be problem. At this point I'm confused. Is there a typical remedy for this situation?

My second question is about the hysteresis amount and the voltage level at point B (inverting input). As you see in the waveforms above, the green waveform represents the voltage at the point B(inverting input), the blue one represents the voltage at point A(non-inverting input), and the red one is the output voltage. Here I set up the resistors such that the voltage at point B is almost half the voltage at point A. And I set the hysteresis limits between 5.5V and 7V. Is there a rule of thumb or logic to set these levels for a better result? I mean is setting point B voltage to the half of point A is correct? And is 2.5V hysteresis good? How about to setting hysteresis to 1V to 10V limit? Im asking because I couldn't find practical info about these issues in books?

• @user16307 I don't know about reed switches bouncing frequency, but even "brick-wall" filters are not exactly brick-wall, there's always a transition width, which means it's perfectly normal to see pulses going past them, but attenuated (which is the purpose). At any rate, the bouncing will most probably not be full range, so I think your filter will do just fine, as it is. And, yes, middle way would be (Vp+Vm)/2. As for "generic design", God forbid :-) We'd all be robots doing one man's work. Everything goes according to the design requirements. Make, test, adjust, repeat, that's about it. – a concerned citizen Sep 7 '16 at 16:15