enter image description here

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):

enter image description here

Here is at 100Hz (red is the circuit output):

enter image description here

Here is at 500Hz:

enter image description here

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?

I would appreciate your suggestions about this circuit.

  • \$\begingroup\$ Why do you think the sensor will have bouncing on its output? \$\endgroup\$ – Arsenal Sep 7 '16 at 15:35
  • \$\begingroup\$ What is generating the input pulses that makes you be afraid of bounces? If it's mechanical, its bouncing frequency will not be dependent on its switching frequency. If it closes/opens at 1Hz and it bounces at 200Hz, then the same 200Hz will be for any other switching frequency. As for your threshold, just choose it anyway it gives you the best output, there's no rule of thumb, though the middle way would be a good starting point. \$\endgroup\$ – a concerned citizen Sep 7 '16 at 15:48
  • \$\begingroup\$ it is mechancal reedswitch. but when I set R1 C1 filter to 47k 10nF its cutoff supposed to be 340Hz but it still passes 500Hz in simulation. why? you mean by "middle way" half the voltage of non-inverting input? how about hysteresis? isnt there a generic design rule for these? \$\endgroup\$ – user16307 Sep 7 '16 at 15:52
  • \$\begingroup\$ @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. \$\endgroup\$ – a concerned citizen Sep 7 '16 at 16:15
  • \$\begingroup\$ how about hysteresis ? \$\endgroup\$ – user16307 Sep 7 '16 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.