# Sensing Back-EMF of DC Motor¶

From this question:

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:

The inductor part of the motor model is not relevant. In the case where we are driving the motor with straight DC, the inductor means nothing, because at DC, inductors are just wires. In the more complex case of driving a motor with PWM, the inductor serves to average the drive voltages, which alternate between 0V and Vcc. Effectively, if we are driving the motor with a PWM signal with an 80% duty cycle, that’s just the same as applying 0.8 ⋅ Vcc to the motor.

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 = Rmotor=1.5Ω
measured motor current = Imotor=2A
Vcc=24V
duty cycle = d = 80%
calculation:

voltage effectively applied to the motor = 80% ⋅ 24V = 19.2V
voltage drop over motor resistance = 2A ⋅ 1.5Ω = 3V
back-EMF = 19.2V − 3V = 16.2V
Putting it all together into one equation:

Vbemf = dVcc − Rmotor ⋅ Imotor

Add picture from clipboard (Maximum size: 1 GB)