Friday, October 28, 2011

Measuring Motor Current

I need to measure the current going through brushed DC motors. One of the ways to do this is to use a shunt resistor, a low-value, precision resistor. Measuring the voltage drop across the resistor, one can calculate the current through the resistor.

I decided to make my very own, very simple, shunt resistor breakout board. It connects between the battery and Electronic Speed Controller (ESC) or other motor driver. 

A header is included to measure voltage across the battery and voltage drop across the resistor either with a DMM or a microcontroller.

DMM test clips attached
I quickly drew up the design in Eagle, used toner transfer method and etched the board, soldered everything together and voila, simple current measurement. 

Pretty simple circuit board, eh?

0.001 ohm, 1%, 3W = 50A+ (WSR31L000FEA)
The resistor is 0.001 ohms so 1mV = 1A (it's a Dale-Vishay WSR31L000FEA). My DMM has precision to 0.1mV, thus 100mA here. I selected a resistor with sufficient power handling to measure over 50A continuously.

So what the heck am I going to do with this thing?
  • Measure RC airplane propeller load on motor
  • Calculate battery internal resistance
  • Plot relationship between motor current and compass distortion
  • Calculate remaining battery capacity on an autonomous robot
  • Overcurrent protection
  • Create a digital ammeter with an MCU and LCD display
Some add-on hardware is needed to interface with a microcontroller. The AttoPilot shunt boards use a Texas Instruments INA-169 for amplifying voltage drop across the shunt to a suitable range for an analog to digital converter. (While I am using the simpler board above for bench testing, I decided to get the AttoPilot board for use on Data Bus)
AttoPilot current/voltage sense board
One has to be careful, of course, that the shunt presents substantially less resistance than the load. Some motors have very low resistance windings. For those cases, a hall effect sensor like the Honeywell CSLA2CD seems like it would do the trick.


  1. You are using DC Motor for speed control, and i think you are using PWM for it, so are you measuring Pulsating DC with Shunt Resistor??

  2. Well, I used a digital multimeter (DMM) for measuring current. Because of the limited bandwidth of the DMM, and the high PWM frequency of the ESC (electronic speed controller), the measured value was, more-or-less, the DC component of the current.

    For the experiment I conducted, I was mostly concerned with magnetic effects, so mis-reporting of voltage wasn't too big of a deal.

    To be more accurate, I'd look at the waveform on an oscilloscope and sample with ADC at a suitable speed and do appropriate processing to get a more accurate current estimate.