Electronic – Detect speed of DC motor electrically

dc motor

I'm looking to build a small robot using inexpensive DC micro gear motors. I would like to be able to measure the speed (count rotations) of the motors for accurate positioning etc. I'm aware that they have the encoder versions of these motors, with hall effect or optical sensors connected. However I started wondering if there might be smarter ways to be able to detect the rotations without having to purchase more expensive encoder motors.

  • Is it possible/practical to be able to somehow measure the pulses generated by the switching of the armatures?
  • Is this something that could possibly be detected by measuring variations in the current being drawn by the motor?

I'm aware that DC motors create a lot of electrical noise from the commutation of the brushes, which requires capacitors etc. to suppress. It seems that it aught to be possible to use some of this "noise" to detect the rotations of the motor.

edit: I've realised the title of the question perhaps is not quite accurate. I don't need to detect the actual speed of the motor directly, but rather to just detect and count rotations, or more accurately, the angular displacement. From this I can calculate everything else I need to know, speed, distance travelled etc.

After a bit more googling, it seems it is possible to calculate the speed of a DC motor, by measuring the back-EMF. The calculation is quite complex, and depends on knowing various characteristics of a particular type of motor.

As described here…

There is even Arduino code provided. In my case though, despite the incorrect title, I am actually mostly interested in measuring (or calculating) the angular displacement, to find out exactly how far each wheel of the robot has travelled, to then be able to determine orientation and position.

I'm not sure this EMF technique will provide the accuracy I'd need for that.

Anyway this does give me a bit more confidence that what I'm wanting to do may be possible.

Best Answer

Theoretically, it is possible to use brush noise of a DC motor to assess rotational speed. Brush noise is AC, so a high-pass filter plus an envelope detector would give you a pulse for every commutation.

However, these pulses will vary in amplitude and duration, so counting them will be a challenge. The character of the noise will be constantly changing as microscopic defects in the brushes wear out, while new irregularities get exposed. Any dirt on the collector will induce arcing as well, generating extra pulses you'll have to find a way to ignore. At higher speeds such pulses will overlap, making counting practically impossible. Plus, this method will be incompatible with traditional PWM motor control, because you will be feeding your DC motor with AC in the first place.

A related (albeit different) concept called Brushed-Motor Ripple Counter can be applied to motors where brushes are large enough to short two poles together, and the detection is based on changes in inductance rather than switching noise. That method appears to be reliable enough to be useful (but if you go though the experimental results you will see that the detection sometimes skips a position or two), but it most likely won't work with hobby-grade motors.