On Tue, Jan 25, 2022 at 6:37 PM John Dammeyer <[email protected]>
wrote:

>
> So how exactly are you going to count it?    Time between the top trace
> edge and the bottom trace edge?  As you cross the threshold into the next
> 0.1" and it mechanically jitters at that point what will you do to not have
> counts go wild?
>

I would guess that something similar to a switch debounce would be used.
This can be implemented in software.    One simple algorithm is to sample
the voltage and wait until you get let's say 5 identical readings.  There
are other tricks like low pass filtering.  But the "N identical"  method is
easy to do and works well.

-- 

Chris Albertson
Redondo Beach, California

_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to