I've been having some thoughts about DC motor encoding, presently for the purposes of making a generally useful small high torque unit I can use in various robotics projects later on. I'm looking to measure speed by observing some sort of fast event in the motor, and deal with position measures separately on the output side of the gear systems. To measure speed I know I can observe spikes and ripples on the motor's power wires which map to comutator brushes, one can't so reliably get full directional feedback with this as one could from a quadrature encodr, but for speed measures that isn't so important.
To do this I need to make a filter circuit to let through and amplify the commutation spikes so I can read them. The trouble is that sometimes I'll be PWMing* the motor, and whilst I've yet to check this for the specific motor type I had in mind, I suspect the PWM waveforms in the motor's supply could look pretty similar to the brush related spikes. I could set up highpass or band pass amplifiers to only let the sharp rise and fall of spieks get through, but think the PWM edges would get through too.
Any tips on what differences I could exploit between PWM waves and commutator spikes so as to allow through only the latter? Part of me suspects the PWM waves will drop the voltage on the motor all the way to zero when low, while the spikes and ripples vary by just tens of millivolts from the power voltage, can that diffeence help me n any way?
Thanks
*probably at a relatively low frequency, 500Hz to 5KHz sort of range, the PWM will definitely be using square waves though so the edges will have very high frequency components to them