Author Topic: Current sensing in BLDC motor driver  (Read 6667 times)

0 Members and 1 Guest are viewing this topic.

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Current sensing in BLDC motor driver
« on: March 16, 2018, 03:05:55 am »
I'm designing a brushless motor controller, and one of the sticking points at the moment is whether to use current sensing. I realize that would be useful for logging performance data, but I'm not sure that's necessary, and it complicates the design. An online search didn't yield much informative data on the cases where current sensing is desirable. If I can do without it, I would simplify my schematic a little by doing away with the shunt resistors, simplify my code, as well as be able to use a smaller (and cheaper) IC for driving the FETs (DRV8320 instead of the larger DRV8323). Could someone outline some basic advantages of using current sensing for a BLDC, or direct me to a good source of information on the topic? Thank you.
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: Current sensing in BLDC motor driver
« Reply #1 on: March 16, 2018, 07:06:56 am »
Current sense is quite important. If you don’t have a set of Hall effect sensors, current is the only feedback you get.

If you do have a Hall effect sensor then you could perhaps try without current sense. But you would also not have protection for the motor, so it could cook itself with over current.
 

Offline Glenn0010

  • Regular Contributor
  • *
  • Posts: 214
  • Country: mt
Re: Current sensing in BLDC motor driver
« Reply #2 on: March 16, 2018, 09:29:39 am »
I am also designing a BLDC motor controller. If you are not going with isolation like me I'd recommend you'd use the DRV it is compact and has everything you need.

I'd recommend you'd use current sensing as it ca protect your circuit from destroying itself. (I'm still to include it in mine)

You can take a look at my progress so far here:

https://www.eevblog.com/forum/projects/bldc-motor-controller-rc-snubber-design-waveforms/
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5841
  • Country: de
Re: Current sensing in BLDC motor driver
« Reply #3 on: March 16, 2018, 02:06:32 pm »
Current sense is mainly there for preventing damage to the power stage or the motor in case of a rotor stall or a cable fault/short. It also limits current during startup.

A secondary purpose is for torque control if you need it.

For pure safety limiting, it's also possible simply to limit the supply current to the power stage, provided your gate drivers have their own supply.

Sensorless commutation of the motor is not done through current sensing, but by measuring back EMF in each phase when it is off. PMDC control only powers two phases at any time, thus making this possible.
 

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #4 on: March 16, 2018, 09:14:54 pm »
Current sense is quite important. If you don’t have a set of Hall effect sensors, current is the only feedback you get.

If you do have a Hall effect sensor then you could perhaps try without current sense. But you would also not have protection for the motor, so it could cook itself with over current.

I think you mean BEMF here, as that's what's used for commutation. I get that the motor might overheat with too much current, that's definitely a valid point.

I am also designing a BLDC motor controller. If you are not going with isolation like me I'd recommend you'd use the DRV it is compact and has everything you need.

I'd recommend you'd use current sensing as it ca protect your circuit from destroying itself. (I'm still to include it in mine)

You can take a look at my progress so far here:

https://www.eevblog.com/forum/projects/bldc-motor-controller-rc-snubber-design-waveforms/

Thanks, I'm going to read that now! Circuit protection makes sense. Guess I'd have to go with the DRV8323 then.

Current sense is mainly there for preventing damage to the power stage or the motor in case of a rotor stall or a cable fault/short. It also limits current during startup.

A secondary purpose is for torque control if you need it.

For pure safety limiting, it's also possible simply to limit the supply current to the power stage, provided your gate drivers have their own supply.

Sensorless commutation of the motor is not done through current sensing, but by measuring back EMF in each phase when it is off. PMDC control only powers two phases at any time, thus making this possible.


I see, that's what I suspected. Safety is definitely important for me, so I think I'll want to go with current sensing then, that sounds simpler than limiting current to the power stage.
 

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #5 on: March 17, 2018, 08:41:46 am »
The datasheet gives equations for calculating the current through the shunt resistor, wouldn't that basically be the motor current, since the shunt resistor is in series with the motor current path?

Also a bit confused by unidirectional vs bidirectional current sensing operation: if I understand correctly, current should always flow to ground, so what's the point of bidirectional sensing?

I'm clearly missing something obvious on both of these points.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16553
  • Country: us
  • DavidH
Re: Current sensing in BLDC motor driver
« Reply #6 on: March 17, 2018, 02:27:24 pm »
For pure safety limiting, it's also possible simply to limit the supply current to the power stage, provided your gate drivers have their own supply.

I see, that's what I suspected. Safety is definitely important for me, so I think I'll want to go with current sensing then, that sounds simpler than limiting current to the power stage.

I think he means sensing current to all output stages from the power supply which is sufficient for protection instead of individually which is more complicated.  A lot of ancient brushless DC motors drivers including discrete ones do this.
 

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #7 on: March 17, 2018, 08:10:28 pm »
For pure safety limiting, it's also possible simply to limit the supply current to the power stage, provided your gate drivers have their own supply.

I see, that's what I suspected. Safety is definitely important for me, so I think I'll want to go with current sensing then, that sounds simpler than limiting current to the power stage.

I think he means sensing current to all output stages from the power supply which is sufficient for protection instead of individually which is more complicated.  A lot of ancient brushless DC motors drivers including discrete ones do this.

Got it. Since I can get a DRV8323 with 3 low-side amplifiers included for a small bit more than the DRV8320 which lacks them, I think I might as well go with the option of sensing individual currents.
 

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #8 on: March 18, 2018, 04:01:26 am »
If possible, I'd like a little help with choosing my current sense resistors. From what I understand, the current through that will just be the motor current, so I can use just use P = I2R to get my max power dissipation through said resistor. Is this correct, or is there some complication I'm missing?
Since I don't want to lose much more than a percent or so of my total power through this resistor, and my stall current should be around 30A, I'm getting something like a couple of mOhms of resistance that I want tops, which would dissipate several Watts of power but enable me to get slighter higher sensing accuracy vs say uOhms. Also thinking of going with 4 termination style resistor for more accurate sensing.
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: Current sensing in BLDC motor driver
« Reply #9 on: March 28, 2018, 05:19:00 am »
If possible, I'd like a little help with choosing my current sense resistors. From what I understand, the current through that will just be the motor current, so I can use just use P = I2R to get my max power dissipation through said resistor. Is this correct, or is there some complication I'm missing?

If you're putting them in series with the low side MOSFET, you'll only put current through them part of the time.  But sizing them to handle the whole motor current rating is probably reasonable (you don't want them to get too hot, after all).

... I'm getting something like a couple of mOhms of resistance that I want tops...
Also thinking of going with 4 termination style resistor for more accurate sensing.

At the very least you need to be careful with layout.  You can make a resistor footprint where the main currents connect to the outside of the pads and the sense connections tap off the inside of the component pads. However, you may have 1mOhm or more of resistance in each solder joint (depends on package size), so a 4-wire shut would be more accurate.

An important consideration is offset drift.  A basic offset can be calibrated out (e.g. at room temperature), but the drift is unpredictable. Smaller shunt resistor values dissipate less heat but also produce less output voltage and a more susceptible to drift.

Assuming a 5 mOhm shunt (or maybe a bit less - 4.5W is a lot of heat!), you get 5uV/mA into the sense amps.  The sense amps are rated for an offset voltage drift of 10uV/K, which corresponds to 2mA/K.  Assuming a 60 Kelvin temperature rise (from 25 deg C to 85 deg C), that's a drift of 120mA.  For basic current protection that might be just fine, but for fancy torque control applications that could be a problem.
 
The following users thanked this post: anvoice

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #10 on: March 28, 2018, 06:28:07 am »
Thanks! Does Kelvin sensing (using 4 terminal sense resistors) improve the situation in any way? Or is that essentially what you're suggesting? I'm still reading about that so not sure how much of an improvement that will give.

It would be nice to have a bit of torque control. Although if I do go for a 30A stall current motor, I'd have to switch to a higher power dissipation resistor to handle the higher resistance values. Not out of the question of course, Mouser has some higher power rated resistors with what looks like 4 terminals: https://www.mouser.com/ProductDetail/Bourns/CSS4J-4026R-L500F?qs=sGAEpiMZZMtlleCFQhR%2fze%252bwwzj9NwmYay4NatDfQtBTHNHGTdcLEw%3d%3d
Actually, the above turns out to be a 0.5mOhm resistor, which doesn't work for me. Another error on Mouser website. So if anyone has a good source for 4-terminal, 5mOhm, 5W (at least) current sense resistors, I'd really appreciate hearing about it.
« Last Edit: March 28, 2018, 06:56:42 am by anvoice »
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: Current sensing in BLDC motor driver
« Reply #11 on: April 07, 2018, 03:47:49 am »
Sorry for slow response!

Thanks! Does Kelvin sensing (using 4 terminal sense resistors) improve the situation in any way? Or is that essentially what you're suggesting? I'm still reading about that so not sure how much of an improvement that will give.

Yeah, I did mean Kelvin sensing.  It will improve gain accuracy by reducing gain drift over temperature.  I don't think it does a lot for offset drift.

It would be nice to have a bit of torque control. Although if I do go for a 30A stall current motor, I'd have to switch to a higher power dissipation resistor to handle the higher resistance values.

Yeah, tradeoffs are a thing.  Bigger resistor values give better sense accuracy (to a point!) but dissipate more power... If you're willing to experiment, it might be possible to read the current value while the corresponding MOSFET is off to calibrate & null out some of the offset drift, which could save you some trouble.

Are you set up to simulate your driver and motor?
 
The following users thanked this post: anvoice

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #12 on: April 08, 2018, 04:20:45 am »
Yep, I already started another thread about Kelvin sensing in particular. Seems that a 4-terminal resistor may be the way to go, they appear to provide advantages over Kelvin sensing done with a 2-terminal resistor.

What do you mean by simulation? Software or hardware? I will have the actual motors in about 3 weeks, while the driver is essentially designed in Kicad (was going to put up the designs for criticism in a short while).
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: Current sensing in BLDC motor driver
« Reply #13 on: April 08, 2018, 05:52:07 am »
I meant simulation of control SW + driver + motor.  It does require software that is normally quite expensive (e.g. Matlab + Simulink, PLECS etc.) but can be very helpful.  I was going to suggest you could simulate your control software with different amounts of DC offset error in the current sense signals and see what happens.

You can of course do this experimentally by deliberately adding some DC offset to the relevant signals in the firmware.  It could be quite informative.  I think that, up to a point, adding DC offset will just result in torque ripple which may not be a big deal for you.
 

Offline anvoiceTopic starter

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: Current sensing in BLDC motor driver
« Reply #14 on: April 09, 2018, 01:32:25 am »
I don't have that software package yet, and it's a bit of a leap to get it considering the price... I'm sure it might be more useful than what it costs though.

I can try that. I'm in the process of writing the firmware (studying the ATSAMD21 reference manual and refreshing my C skills at the same time) but once it's ready that's definitely an experiment I'd be willing to do. Torque ripple might be acceptable as long as it's within reasonable levels.
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1128
  • Country: nz
Re: Current sensing in BLDC motor driver
« Reply #15 on: April 09, 2018, 08:26:53 pm »
I don't have that software package yet, and it's a bit of a leap to get it considering the price...

And by 'a bit of a leap' we typically mean "I could buy a nice new car for that."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf