Once, I had a small dc motor control that took it's velocity command from the frequency of a master encoder. To control the start-stop of it, I would break the command signal.
All at once, my motor start "surging" at startup, I mean really spinning out. I could not figure out for the life of me what was causing it, the encoder counts were correct!
Come to find out, the relay contact (high-quality gold leaf, but hey, still metal) was bouncing, which in turn was being picked up along with the encoder counts, creating the illusion of 100's of extra Hz in that short space.
So I replaced the mechanical relay on the signal line with a transistor output relay (opto) on the 5V power line, and achieved my goal.
Funny how something as simple as debounce can double back and bite you in the butt...
TM