I am trying to clean up a signal for timing purposes, I am switching a motor in a device and timing the switch in milliseconds with a digital timer. The timer is only timing the first pulse on the output signal from the motor which is only around 35-45 ms, the actual/entire switch time should be between 200-400 ms (I think). I believe there is some bouncing from the motor switching positions giving me this funky signal. Will an edge triggered flip flop get me closer to the correct signal/time? I have attached an image in PDF of what I'm getting and what I need. Any help is appreciated.