# How can I measure back-EMF to infer the speed of a DC motor?

I'm interested in measuring the back-EMF of a motor to determine a motor's speed because it's cheap and requires no additional mechanical parts. How can I measure the back-EMF when I'm driving the motor?

One way to do this is to briefly stop driving the motor, long enough to let any residual current from the driving voltage die down, and then simply measure the voltage. The time it takes the current to settle will depend on the inductance of the windings. This is simple to understand, and the undriven interval can be made quite short, but this has obvious disadvantages.

Another method involves a clever use of Ohm's law. A motor can be modeled as a series circuit of an inductor, a resistor, and a voltage source. The inductor represents the inductance of the motor's windings. The resistor is the resistance of that wire. The voltage source represents the back-EMF, and it is directly proportional to the speed of the motor.

If we can know the resistance of the motor, and we can measure the current in the motor, we can infer what the back-EMF must be while the motor is being driven! Here's how:

We can ignore $$\L_m\$$ so long as the current through the motor is not changing much, because the voltage across an inductor proportional to the rate of change of current. No change in current means no voltage across the inductor.

If we are driving the motor with PWM, then the inductor serves to keep the current in the motor relatively constant. All we care about then, is really the average voltage of $$\V_{drv}\$$, which is just the supply voltage multiplied by the duty cycle.

So, we have an effective voltage we are applying to the motor, which we are modeling as a resistor and a voltage source in series. We also know the current in the motor, and the current in the resistor of our model must be the same because it is a series circuit. We can use Ohm's law to calculate what the voltage across this resistor must be, and the difference between the voltage drop over the resistor and our applied voltage must be the back-EMF.

Example:

motor winding resistance $$\ = R_m = 1.5\:\Omega\$$
measured motor current $$\= I = 2\:\mathrm A \$$
supply voltage $$\= V_{cc} = 24\:\mathrm V \$$
duty cycle $$\ = d = 80\% \$$

Calculation:

24V at an 80% duty cycle is effectively applying 19.2V to the motor:

$$\overline{V_{drv}} = dV_{cc} = 80\% \cdot 24\:\mathrm V = 19.2\:\mathrm V$$

The voltage drop over the winding resistance is found by Ohm's law, the product of the current and winding resistance:

$$V_{R_m} = IR_m = 2\:\mathrm A \cdot 1.5\:\Omega = 3\:\mathrm V$$

The back-EMF is the effective driving voltage, less voltage across the winding resistance:

$$V_m = \overline{V_{drv}} - V_{R_m} = 19.2\:\mathrm V - 3\:\mathrm V = 16.2\:\mathrm V$$

Putting it all together into one equation:

$$V_m = dV_{cc} - R_m I$$

• A point that's worth noting is that, except to the extent that an inductor has parallel resistance or other leakage, the average voltage across an inductor over any given time interval must be proportional to the difference in current between the start and end of that interval. If an inductor has the same amount of current flowing through it at the start and end of some time interval, the average voltage across the inductor must be zero. That rule applies both to discrete inductors, and also the inductor one models as being in series with an ideal motor. – supercat Jan 14 '13 at 20:06
• Also, note that if one is PWM'ing a motor at a decent frequency, efficiency will be best if the current in its inductance does not die down between cycles. Rather than open-circuiting the motor, short-circuit it unless or until the current drops to nothing (hopefully the PWM rate will be fast enough that it won't). If one short-circuits the motor long enough, the current will fall to nothing and then reverse. Reverse current will kill efficiency, so open the circuit at that point (or short through a transistor that only allows one direction of current). Note that... – supercat Jan 14 '13 at 20:30
• ...if the stall current exceeds the amount one's supply can output without sagging, PWM'ing the motor may actually increase the available starting or slow-speed torque. Note also that if the motor is turning faster than the speed "requested" by the PWM, some of the excess energy will be dumped back into the supply (good for efficiency, if one can safely harness it). – supercat Jan 14 '13 at 20:36
• I am not a specialist, but I don't think you can just assume your current won't change, and you can just ignore your inductance that easily. External loads will produce torque and this torque will produce a change in current. Also the PWM itsef will make a change in current in the motor...yes the inductance will keep it "average" but this won't be a flat line, also it makes it average by creating voltages. How much will this really impact your project? Well, I can't say, it totally dependent on the motor itself and the load, so this will vary drastically from project to project. – mFeinstein Dec 21 '14 at 3:52
• This method is discussed in more detail in a IEEE paper: ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4314629 – Amir Samakar Oct 30 '17 at 21:20