I'm building a hexapod robot using simple servos and I was wondering how feasible it was to measure the current flow to each servo (5-6V DC to a maximum of 0.25-1A (I haven't found the spec for the servo's stall current yet)) using, say, an ATMega168. What kind of circuit would I need to build in series with each of the servo's power lines to give me a useful readout? I assume I'd get a voltage drop across this circuit, what's it likely to be? etc.
|
feedback
|
|
Honestly, People often use a simple sense resistor. You place an in series very low resistance resistor(<1 ohm often) and you measure voltage drop. This allows you to monitor motor current. There are many many motor control algorithms if you want to control the motor yourself, otherwise, if you are measuring for just knowing current draw, you just need to make sure you sample often enough to get an accurate measurement, or use a circuit with a lowpass filter effect(make sure you buffer the voltage). | |||||||||||
feedback
|
|
Sense resistor is good. Usually they're placed on the high side of the circuit, so that the supply voltage return can be shared between source and load, and usually you size the sense resistor so it's small enough not to affect the circuit, but large compared to voltage errors (typical op-amp input offsets are in the neighborhood of 0.5-5mV). This makes it a little harder to amplify and translate to a "ground"-referenced signal. Take a look at these current sense monitor ICs from Zetex (now part of Diodes Inc) -- I had to design a current sense circuit a few months ago and these looked like the best fit (project got changed so I never had a chance to use it). For layout, make sure you use a pseudo-Kelvin connection -- connect the current sense signal lines directly to the pads of the resistors (preferably the inner edges of the pads) and don't use those sense traces for anything else except the amplification circuit. (A true Kelvin connection would be the same thing except it would require a 4-terminal resistor with 2 load terminals and 2 sense terminals -- this isn't usually necessary unless you get into really accurate or low-resistance circuits.) | |||||||||||||||||||
feedback
|
|
Sounds like a cool project. Some motor drivers already measure current in order to provide "overload protection". If you can't tap that signal, there are several ways to measure current. Start with the simplest and cheapest method, and if that won't work, try the next one. | |||
|
feedback
|