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.

Friday, October 14, 2011

Why The Wrights Flew First

Orville demonstrating the flyer
to the U.S. ArmyFort Myer, Virginia
September 1908. Photo: by C.H. Claudy.
(Source: Wikipedia)
At the time the Wright brothers achieved the first powered airplane flight at Kitty Hawk1, the field of aeronautics had been buzzing with activity for years (perhaps not unlike the present DIY robotics community).

Why did they succeed where others failed? 

Tuesday, October 11, 2011

The miniProp Contest Begins

miniProp. Win one.
It's time. Head on over to the Bot Thoughts facebook page and enter to win a miniProp, a Parallax Propeller on a DIP form factor with built in regulator, eeprom and crystal. Free IDE from Parallax, lots of community support, 8 cores (cogs), deterministic timing, easy to learn assembly, and more.

Next Tuesday I'll pick the winner at random out of the list of folks who comment on or like the contest post. Good luck!

Friday, October 7, 2011

Win A Propeller Board!

Aww... so cute!
It's small, it's standalone, it's purple, and it's a Parallax Propeller, aka an experimenters dream. I designed this breakout board and I'm giving away a fully populated board to a lucky reader! I call it the miniProp board.

The Propeller has 8 cores (cogs) that operate together in perfect lockstep. The chip has perfectly deterministic timing and really simple assembly language. Writing device drivers on the Propeller is truly a piece of cake. And when you're done you have several cogs left to do lots of interesting things besides.