Safely reading motor current?

So I want to monitor the current drawn from a DC motor.

This is the circuit I had in mind:

This way, the current would be (aprox.):

int current = (2 * analogRead(A0)) / 3;

However, I’m fairly sure this will blow the 3 Ohm resistor in seconds. So I am wondering wether there’s a better way to safely measure the current?

What DC motor? What is the maximum current that the motor will draw? IE, stall or start current?

You can always get a resistor large enough. But it may drop out too much voltage for proper operation of the motor. There are hall-effect based current sensors that have no more than the resistance of a short piece of wire. Or you may even literally use a short piece of wire. My old Micronta analog meter used about 8 inches of 16 gauge wire for the 10A scale, you moved a tap where the meter picked off a very low voltage on the wire for initial calibration.

There are also some application specific current monitoring IC's that make this really easy. I have personally used the ZXCT1009 for this task and yes, you use a high wattage resistor to carry the motor current being monitored.

For large currents the best way is with a current sensor. You just pass the motor wire through it and it outputs a voltage proportional to the current. Search for "current sensor" on your favorite supply house website.

3 Ohm will get hot -- fewer Ohms will get less hot, though at the expense of resolution. How precisely do you need to read the amperage and what is the maximum amperage expected?

If you want to go to, say, a 1 milli-Ohm resistor to drastically reduce the amount of heat (and waste), an op-amp can be used to translate the resistor's tiny amount of voltage drop to a nice 0-5V signal you can conveniently analogRead with full resolution. But this requires a bit of additional circuitry.

You might measure the resistance of the wire between the power supply and the motor, then measure the voltage drop across that wire to calculate a current value.

If you had a 1 ohm resistor… You could calibrate the wire going to ground from the motor or place a ‘tap’ or measurement pickoff at the point appropriate to your measurement requirements or conditions. It is also important to remember that copper has a positive temperature coefficient of 3300 PPM/Deg C which must be factored into your measurements… Not a measurement of high accuracy but usable if the measurements are taken at the same conditions every time. The Diode sensor is really nice Too. The best, I’ve found are the hall effect sensors. They offer good isolation, reasonable accuracy and cost and are bi-directional. Typically with an output voltage of 1/2 Vcc an increase or decrease in current will cause the voltage to swing above or below the center point. There are reference designs available in the data sheets. Attached find a data sheet for an Allegro product I’ve used several times. Described are 5A, 20A and 30A Ip devices (185 mA/A, 100 mV/A and 66 mV/A)


ACS712-Datasheet.pdf (652 KB)