How to measure the current of a normal 12v dc motor?

Status
Not open for further replies.

Hanalee

Member
Location
China, Hongkong
Occupation
Electronic Engineer
I would like to know if there is a way to measure the current of a normal 12V dc motor.

I am using a DRV8838 and a Arduino Nano.

I want to use it to stop the motor once a specific current draw or load is reached, if the motor is about to stall.

I’m fairly new in all of this, so if possible a simple explanation would be nice.
 

ATSman

ATSman
Location
San Francisco Bay Area
Occupation
Electrical Engineer/ Electrical Testing & Controls
Yes, that would work. Or you can purchase a DC shunt sized for the motor HP. Then with the known resistance of the shunt, use Ohm's Law
I = E/R, measure the voltage across the shunt (in series with the motor running) and solve for the current.
 

GoldDigger

Moderator
Staff member
Location
Placerville, CA, USA
Occupation
Retired PV System Designer
Yes, that would work. Or you can purchase a DC shunt sized for the motor HP. Then with the known resistance of the shunt, use Ohm's Law
I = E/R, measure the voltage across the shunt (in series with the motor running) and solve for the current.
Just size the shunt resistance so that the voltage drop across the shunt at maximum current is low enough that it does not affect motor performance.
 

Hanalee

Member
Location
China, Hongkong
Occupation
Electronic Engineer
I got an idea of putting a very low ohm resistor in series with the motor power feed and measure the voltage drop across it. Knowing the voltage and the resistance like I can calculate the current. Is that right?
 

RCC1

Member
Location
Michigan
Occupation
Retired - E&I Maintenance Superintendent
Take a look at the DroneBot Workshop web site. He has a YouTube video that explains all the Arduino modules available to measure low currents and voltages. Video is called "Measure DC Voltage and Current with Arduino." Link: Measure DC Voltage and Current with Arduino - YouTube The modules typically have small shunts or Hall effect sensors. He also shows Arduino code for the use with the modules.
 

kwired

Electron manager
Location
NE Nebraska
I got an idea of putting a very low ohm resistor in series with the motor power feed and measure the voltage drop across it. Knowing the voltage and the resistance like I can calculate the current. Is that right?
Which is basically what is being described in post 3 with the "DC shunt".
 

Rock86

Senior Member
Location
new york
Occupation
Electrical Engineer / Electrician
I got an idea of putting a very low ohm resistor in series with the motor power feed and measure the voltage drop across it. Knowing the voltage and the resistance like I can calculate the current. Is that right?
Take an Ammeter, put in series with motor and run the motor at various speeds. determine where what speed would you like the motor to run at, measure your current. If you have access to an O-scope, use that record the changes through out the speeds, and also see your starting vs running current.
 

gadfly56

Senior Member
Location
New Jersey
Occupation
Professional Engineer, Fire & Life Safety
Take an Ammeter, put in series with motor and run the motor at various speeds. determine where what speed would you like the motor to run at, measure your current. If you have access to an O-scope, use that record the changes through out the speeds, and also see your starting vs running current.
He's looking to use the solution as part of a control scheme. I don't think your methodology lends itself to that purpose.
 

Rock86

Senior Member
Location
new york
Occupation
Electrical Engineer / Electrician
He's looking to use the solution as part of a control scheme. I don't think your methodology lends itself to that purpose.
He wants to measure current. It's a simple DC motor. He is controlling it through an Arduino. He should be able to set up a simple circuit to test the draw of the motor, and then using over-current relay he should be able to stop the motor at the desired current.
 

gadfly56

Senior Member
Location
New Jersey
Occupation
Professional Engineer, Fire & Life Safety
He wants to measure current. It's a simple DC motor. He is controlling it through an Arduino. He should be able to set up a simple circuit to test the draw of the motor, and then using over-current relay he should be able to stop the motor at the desired current.
Your original solution was overthinking this and suggested he was trying to control speed. His end purpose isn't to measure current. He wants to stop a motor once it hits a certain current draw. You don't use a bench top ammeter to do this. You don't measure the speed, attach an oscilloscope, or create a table of current vs speed. You use a Hall-effect transducer, pick a cut-off current and a relay and package it onto a circuit board.
 

Rock86

Senior Member
Location
new york
Occupation
Electrical Engineer / Electrician
Your original solution was overthinking this and suggested he was trying to control speed. His end purpose isn't to measure current. He wants to stop a motor once it hits a certain current draw. You don't use a bench top ammeter to do this. You don't measure the speed, attach an oscilloscope, or create a table of current vs speed. You use a Hall-effect transducer, pick a cut-off current and a relay and package it onto a circuit board.
Well, why didn't you just say so? 😅
 

synchro

Senior Member
Location
Chicago, IL
Occupation
EE
I would like to know if there is a way to measure the current of a normal 12V dc motor.
I am using a DRV8838 and a Arduino Nano.
I want to use it to stop the motor once a specific current draw or load is reached, if the motor is about to stall.

Your DRV8838 is a DC motor driver using pulse width modulation of its 4 output transistors that are in an H-bridge configuration:
See page 9 of:

There are current sensing amplifier integrated circuits designed to measure current using a shunt resistor. The application of these ICs to current measurements on an H-bridge driver such as your DRV8838 is described here:

For the purpose you described, measuring the current on the supply to the H-bridge transistors instead of at the PWM output should be fine. The H-bridge output has "rail-to-rail" high dV/dt voltage excursions making it more difficult to measure. TI does have a version of their current sensing amplifiers designed for a PWM output as described in the above application note. But I don't see the need for it in your case.

This current sensing amp from TI has a built-in comparator that will trigger above a threshold set by an external resistive divider:
The A͞L͞E͞R͞T output pin will go low when the design current threshold is exceeded.
I think that it would probably meet your needs.
 
Status
Not open for further replies.
Top