Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

motor current detection when driving using PWM

Status
Not open for further replies.

banh

Advanced Member level 1
Advanced Member level 1
Joined
Dec 16, 2004
Messages
458
Helped
17
Reputation
34
Reaction score
5
Trophy points
1,298
Activity points
3,935
when driving the motor coil using PWM, how can we detect the current in the coil?

for e.g. if i'm to use shunt resistor, how can i perform the measurement?

actually my purpose is to detect if the motor is in a stalled condition (for e.g. stopped by external force) -> in that case the back EMF decreases -> the current in the coil increases.

but since i'm using PWM, measuring via shunt resistor seems hard.
 

Hello banh,

Consider using current sense mosfets.
I think is not easy to detect motor current using resistors. If you place it in series with the motor you'll have a huge amount of common mode noise, if you place in series with low side of PWM brige you'll have to put fast diodes to block internal diodes of the bridge transistors.
I think there is an IC from Internation Rectifier that could sense current in the + supply of the bridge and is the easiest solution.
Hope this helps

Best regards
 

Use something like this ... this works as a peak detector, but be careful with time constant for time response of your system...

leomecma
 

the best solution is hall sensors, they are manufactured in 2 types:

1. open loop sensors: their accuracy is less (up to 5% non linearity error) but is cost effective

2. closed loop sensors: they are very accurate(better than 1%) but expensive

both of them ar isolated sensors(up to 5000Volts) and also can detect dc currecnts (suitable for short circuit to earth detection)

BEST!
 

using hall-effect sensor can also detect averageDC current in my coil even through the coil is not real 'DC' but PWM?
 

The avarage current is Iav = Imax x Duty_Cycle, and duty cycle is knowing. Because you are set PWM duty cycle to control the motor.

Where Imax is the value measure by the hall sensor
(look at the ratio Imax = K * Vmeasured)

leomecma
 

For stall detection, it seems that few miliseconds delay will not harm. This makes it easy to use the shunt resistor follwed by a low pass filter to get the average value of the current. If you PWM frequency is high enough, the filter time constant could be made small giving the least possible time delay.

Good luck
 

banh,

when driving the motor coil using PWM, how can we detect the current in the coil?

Connect a series resistor R to the motor coil.
See circuit below. Use a difference amplifier.
The current passes through R between V1 and V2.
Since R is constant, V2-V1 varies with current I.
Vout varies with V2-V1.

Vout = (V2-V1)Rf/Rin = (I.R)Rf/Rin = (R.Rf/Rin).I

Vout varies with current I.
 

it seems using opamp is a good to convert current to volatge and read in via ADC. i havent tried out yet..


problem is, during driving, i still can see the PWM signal very clearly (square wave).

now, if we have pure DC current through the coil -> the opamp will produce DC output.

but in this case, it is PWM. how would the output of the opamp be?
 

Hello banh,

I regret to say that the limitation in such scheme is the common mode rejection ratio. Even with close tolerance resistors (and perfect temperature tracking between them) your op-amp inputs have to go from ground to the bus supply voltage at switching frequency. For a good difference amplifier such as INA117, the CMRR at 20kHz (a typical swiching freq.) is some 60 dB. I don't know the DC Bus voltage in your application, nor the maximum motor current, but I think that you'll see a high component of the switching frequency at the current sense amplifier output. I would not recommend to filter the switching noise because you could get a large delay to control motor current, for over-current protection for example.
Hope this helps.

Best regards.
 
jorgito wrote:
I regret to say that the limitation in such scheme is the common mode rejection ratio.
Common mode voltage is problem if your are having your shunt in the High side of your driving circuit (which means between battery and motor or motor driving circuit) and to use shunt in high side is not recommended unless it is necessary
In our design we use shunt resistors to measure current in the low side and then difference amplifier and then to microcontroller

As far as the doubt regarding the PWM that banh asked
We use PWM to vary the current through the coil of motors even through your PWM voltage is changing from Low to high level your current doesnot change between High and low levels the variation in current is very small in simple woprds when you change the duty of the PWM the average current through the motor coil changes so using the shunt resistor and difference amplifier and then a low pass filter you can measure the current flowing though your motor
 

thanks for reply,
so maybe i'll try using difference amplifier as recommended by Skyhigh, plus a low pass filter at the output of the opamp..
 

leomecma said:
Use something like this ... this works as a peak detector, but be careful with time constant for time response of your system...

leomecma

What's the purpose of the diode in this circuit?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top