Electronics > Beginners
Measuring pulses, schmitt trigger advice?
<< < (3/3)
David Hess:
Schmitt trigger inputs are more useful for handling signals with a slow transition time than noisy signals.  If a noisy signal is filtered with a simple RC filter, then the transition time is slowed and a schmitt trigger would be used so place an RC filter in front of your schmitt trigger.
Bug2k17:
Thanks for the advice, I've got a few schmitt triggers on order, I'll see what the signal looks like with one in place.
rstofer:
If the Schmitt Trigger doesn't work out, come up with a quadrature encoder.  Use two optical sensors spaced such that only one sensor can ever be active at one time.  Then you can square up the signals by connecting the two negative going outputs to a pair of NAND gates connected as an SR Flip-Flop - search for it here:

https://www.electronics-tutorials.ws/sequential/seq_1.html

1 - Both signals are high, output is low
2 - First signal goes low and sets the flop - the output goes high
3 - First signal restores high
.. some time later
4 - Second signal goes low and resets the flop - the output goes low
5 - Second signal restores high
.. repeat from step 1

I am assuming the optical signal goes low when the sensor sees the slot.  If it goes high, use NOR gates.

https://www.electronicshub.org/sr-flip-flop-design-with-nor-and-nand-logic-gates/

Bug2k17:
Thanks for the advice, much appreciated.

I picked up a few CD40106BE and sent the incoming speed sensor pusles throught this and it has resolved the speed reading changing erratically. The rise time of the unfiltered pulse at average cycling speeds was around 200us or so but looked to be reasonable clean. I presume the rising pulse edge was spending too much time in the undetermined voltage range. Adding the schmitt trigger has cleaned up the pulse and allowed the speed calculation to come up with a more constant reading, with a little bit of averaging it seems fine now.
StillTrying:
"The rise time of the unfiltered pulse at average cycling speeds was around 200us or so but looked to be reasonable clean. I presume the rising pulse edge was spending too much time in the undetermined voltage range."

Yep, that'll be it, 200us is very slow for a digital edge.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod