Author Topic: Driving brushless motors at low, or constant, current  (Read 5894 times)

0 Members and 1 Guest are viewing this topic.

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Driving brushless motors at low, or constant, current
« on: December 08, 2023, 03:42:19 pm »
I've been pondering some ideas involving driving small brushless (drone style) motors from a supply NOT capable of the large currents they typically require. As the motors are usually specified by a "kv" (rotation speed per volt) I can see this gets me a rather lower shaft speed, but that's ok for my ideas (small brushless motor used as an eternal lifetime equivalent of a brushed motor, feeding its output shaft to a reduction gear box and any load moved being after the gearbox) so long as there's enough force generated at lower currents to overcome any fricition within the motor's body. I don't need it whirling around at full speed and torque to power a propeller.

But given the currents they tend to draw (like 10A per phase for a small motor) the brushless motors obviously have utterly tiny resistances in their windings. Applying voltage to any given phase using a "normal" H-bridge (like used for brushed motors) would simply over-load the h-bridge's current driving capacity (and the current supplying ability of whatever is providing Vcc power to the h-bridge). 5V or 12V applied in such a way would give insane currents.

So I'm wondering about driving at constant current. If I could build a power supply which would just supply say 0.5A or 1A or 1.5A, to whatever load resistance it encountered (subject to a voltage limit where if the resistance it is driving in to is high enough it behaves like a constant voltage supply instead at 5V or 12V), by making the voltage smaller as needed, I might be able to do this.

But as far as I can tell most constant current sources and sinks use a BJT somewhere which gets a variable (big when the load resistance is small) voltag drop across it, and at any appreciable amount of current this means a lot of heat needing to be removed, and a massive waste of energy. I've seen low current designs for constant current supplies with op-amps too (programmable by varying an input voltage), but op-amps are only rated for low current, and even if they could handle high current I guess they'd heat up a lot too. And feeding an op amp's regulated output to a voltage follower transistor simply means the big voltage drop and waste of energy is now happening in that transistor.

What are the options? Is there a way to make a high efficiency constant current supply? Or would it be more plausible to build some sort of step-down buck converter to turn a lower current higher voltage supply it to a higher current low voltage supply (perhaps with some sort of input voltage control signal which could be varied to change what value that low current would have?

Thanks
 

Online shapirus

  • Super Contributor
  • ***
  • Posts: 1378
  • Country: ua
Re: Driving brushless motors at low, or constant, current
« Reply #1 on: December 08, 2023, 06:56:12 pm »
What are the options? Is there a way to make a high efficiency constant current supply?
Of course there is. What you described as a big BJT converting all the "unneeded" voltage to heat is called linear regulation. That's not what you want for higher currents, and that's where switch-mode regulators are used. They can easily be implemented as constant current with a voltage limit sources, and that's what you have in nearly any Lithium battery charging circuit.

In your case you'll need the motor control circuitry to properly drive the phases as required, but the power supply itself is easy. Check this out: https://www.aliexpress.com/w/wholesale-adjustable-constant-current.html
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #2 on: December 08, 2023, 10:23:52 pm »
You are talking about out-runner RC brushless motors.

The similar gimbal motors have many more turns in the windings and can be easily driven from lower power circuits.  Normally these don't have sensors so you'll need a way to choose when to commutate.

You can also rewind most outrunner motors you self (although this is perhaps a can of worms worth avoiding!).

Or simply find a commercial brushless motor (these are not out-runner, the rotor is internal) to meet your specifications, although this is likely to be more pricey.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Driving brushless motors at low, or constant, current
« Reply #3 on: December 08, 2023, 10:36:34 pm »
You seem to have a basic misunderstanding here. The winding resistance of a DC motor (brushless AND brushed) is very low, and it should be for it to work.
DC motors are not charaterized by their resistance, but the back EMF, which is governed by the RPM.
Winding resistance is pure heat loss, but is helpful for current limiting when "shock starting" the motor, aka DOL for AC motors.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #4 on: December 08, 2023, 10:47:38 pm »
The winding has to match the power source impedance roughly for best efficiency.  No point driving a 20 milliohm motor from a 5V 1A system, if you can get a 1 ohm winding version (which will have about 7 times the torque per amp!)
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #5 on: December 08, 2023, 11:47:52 pm »
I've been reading around a little more:
Is chopper driving the key to this? As the motor windings are inductors in and of themselves, can one just apply the voltage one has available (however excessively high), then cut it off when the current in the inductive load gets uncomfortably high. So long as one's chopping kept up in real-time with the rising/falling currents, and one had some sort of current limiting cut-off for protection if the real-timeness occasionally slipped, would this be the way to work?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Driving brushless motors at low, or constant, current
« Reply #6 on: December 09, 2023, 12:30:00 am »
DC, Chopper or PWM drive is just en efficiency factor in your driver system, nothing else. PWM is a way to generate an average voltage that would be equivalent to a pure DC.

A DC motor is voltage controlled, period. Higher voltage = higher RPM and vice versa. That's what KV is.
It will pull a current proportional to the mechanical load plus losses. The losses include winding resistance, iron lossen, bearing friction and other (minor) ones.

Imagine a variable power supply that provides voltage to a DC motor. The motor will spin up until its back EMF matches the supply voltage (minus losses).
That's how simple a DC motor is, brushless or brushed.
« Last Edit: December 09, 2023, 12:31:35 am by Benta »
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16626
  • Country: us
  • DavidH
Re: Driving brushless motors at low, or constant, current
« Reply #7 on: December 09, 2023, 01:18:17 am »
I've been reading around a little more:
Is chopper driving the key to this? As the motor windings are inductors in and of themselves, can one just apply the voltage one has available (however excessively high), then cut it off when the current in the inductive load gets uncomfortably high. So long as one's chopping kept up in real-time with the rising/falling currents, and one had some sort of current limiting cut-off for protection if the real-timeness occasionally slipped, would this be the way to work?

That is how it is done.  Stepper motors are driven at a constant current with a chopped voltage source.

If you have your own h-bridge, then it could be supplied from a low voltage source, like from a buck converter.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Driving brushless motors at low, or constant, current
« Reply #8 on: December 09, 2023, 01:23:55 am »
Who on earth talket about stepper motors? ???
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16626
  • Country: us
  • DavidH
Re: Driving brushless motors at low, or constant, current
« Reply #9 on: December 09, 2023, 01:40:40 am »
Who on earth talket about stepper motors? ???

Stepper motors use the type of constant current drive circuit that the OP is looking for.
 

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: Driving brushless motors at low, or constant, current
« Reply #10 on: December 09, 2023, 01:57:13 am »
How about picking motor with correct kV and torque characteristics from the start, or maybe using ESC with low torque mode/torque limiting capability. Driving BLDC with CC supply sounds like sure way to stall the motor or make the ESC malfunction.
 

Offline jwet

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: us
Re: Driving brushless motors at low, or constant, current
« Reply #11 on: December 09, 2023, 03:04:08 am »
>> A DC motor is voltage controlled, period. Higher voltage = higher RPM and vice versa. That's what KV is.

Torque, however is proportional to current.

To the original poster- you're in a sort of a common engineering trap where you have several variables that your think are independent and that you think you can take advantage of but they are actually linked sometimes in subtle, non linear ways.  Fundamentally, you're going to push some current to create a magnetic field that will produce some torque, you can play with this electromagnet, its inductance, resistance and drive it in clever ways (choppers, etc) but you're back to ohms law and faraday's law in the end.

This is a great board to answer implementation questions of existing solutions.  I've found it to be less good at these kind of blue sky ideas that require some real thought and maybe empathy- you won't find it here.  I asked a similar questions a while back about back terminating a high speed driver- I'm sure I had a valid point and I experimented with it and it worked but it landed like a lead balloon here. 

Good Luck.

 
The following users thanked this post: RJSV

Offline ArdWar

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: sc
Re: Driving brushless motors at low, or constant, current
« Reply #12 on: December 09, 2023, 03:44:37 am »
If you want to implement the drive yourself, most BLDC controller implementation allows for limited torque/constant torque mode. Mostly by chopping (basically PWMing) the drive waveform while maintaining the correct envelope to prevent outright stall (the kind of stall where the motor will vibrate due to driver desync). This in turn basically limit the drive (and supply) current.

But supplying with constant current is simply not the way to do.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #13 on: December 09, 2023, 12:35:02 pm »
Thanks everyone.

So, with a chopper driver, one can basically supply (to a low resistance inductive load) whatever voltage one has available, which might be relative limited in how much current it can provide (certainly far less than the low resistance load would draw a this voltage), but by chopping (with some hysteresis I guess) when the current goes above and below certain limits (set either at, or lower than, what your power supply's maximum current is) you can give the low resistance inductive load the current it would have got if you'd had a low voltage high current supply available?

I can see how it would apply in the same way to steppers, brushless DC motors (in both normally driven or FOC use cases) and to solenoid electromagnets. The difference between how they are operated (stepper, brushless normal, brushless FOC, solenoid...) would come at a "higher level" in terms of which way current gets driven at different times, with the "lowest level" of chopper control of the magnitude of that current at a given time being virtually identical?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #14 on: December 09, 2023, 12:37:59 pm »
A lot of unnecessary thinking. These motors must be driven by a motor controller which does current limiting; otherwise the controller just blows up in the first place. It's all a solved problem. See FOC for example; there are other control strategies as well, but in every one of them, current limitation is involved. Which is fairly easy because the motors have significant inductance so current changes slowly and is easy to sense and regulate.

Maybe the issue is buying absolute lowest cost controllers which simply lack a user input for current limiting? The solution is to buy/build a BLDC controller with not only speed regulation setting, but also current (torque) limit setting. Internally, the controller is as simple and there are no extra components involved, just access to certain variables in code, which are there anyway.
« Last Edit: December 09, 2023, 12:49:35 pm by Siwastaja »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Driving brushless motors at low, or constant, current
« Reply #15 on: December 09, 2023, 12:38:25 pm »
Torque, however is proportional to current.
True, but the causality is the other way around:
motor current is proportional to torque demnded by the mechanical load.
You cannot "force" torque by increasing current.

Limiting current "for protection" on the other hand will automatically limit available torque.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #16 on: December 09, 2023, 12:45:25 pm »
You cannot "force" torque by increasing current.

Of course you can - without a lossy mechanical load (say friction), the rotational speed is going to increase towards infinity, rise time of which limited by inertia of the rotating mass.

It's analogous how you can "push current" into a capacitor from an ideal current source, so that the voltage of the capacitor will increase until a failure.

Of course, at some point the motor BEMF equals your supply voltage and the RPM is maxed out, but then you are also not increasing current.

There really is no correct order of causality here. Physical fundamentals work "both ways" and fruitful way of thinking depends on case. In motor control, using current to create torque which then affects motor speed is usually the simpler way of thinking.
« Last Edit: December 09, 2023, 12:50:29 pm by Siwastaja »
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #17 on: December 09, 2023, 12:55:34 pm »
"The solution is to buy/build a BLDC controller with not only speed regulation setting, but also current (torque) limit setting"

I'm asking this question specifically so I can design and build one for myself. Buying is neither so interesting a project, nor does it give many options for working with the kind of lower currents one can have when working from a regulated DC wall wart or a NiMH battery. Most brushless drivers available as modules are for running at low voltage and very large currents from a LiPo battery.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #18 on: December 09, 2023, 01:15:51 pm »
I'm asking this question specifically so I can design and build one for myself.

OK, then the keyword to get started is FOC. FOC is a very accurate and responsive current limitation system so the usual stuff is all you need. You can also look at some of my hopefully helpful replies in earlier threads, a recent example:
https://www.eevblog.com/forum/microcontrollers/bldc-control-foc-zerovectors-are-braking/
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6785
  • Country: pl
Re: Driving brushless motors at low, or constant, current
« Reply #19 on: December 09, 2023, 01:43:31 pm »
Very quick general theory: voltage is speed, current is torque. Motor impedance is a series connection of winding resistance, inductance and transformed mechanical load: friction (R), inertial mass (C), compliance of driven load (if applicable, L). Light load has high impedance, i.e. current causes the motor to spin fast increasing voltage drop. Heavy load is low impedance, i.e. current is pulled to maintain speed. Winding resistance is a loss, limits attainable current=torque from given supply voltage, reduces motor voltage=speed at given current. A motor can be driven CC, CV, CC/CV or or anything in between for varying results.

For 10x less torque you can go down from 10A to 1A, for 100x less to 0.1A.
For 10x less rpm you will go down from 5V to 0.5V. This may be problematic if you want high current at the same time.

I have no practical advice to offer, but here are the options I see:
- external buck converter, takes an extra inductor
- windings have inductance so with enough MOSFETs for synchronous freewheeling you could make a buck out of the winding itself
- use "lower impedance" battery technology like NiMH, with a boost to 3.3V for the control electronics
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #20 on: December 09, 2023, 02:30:58 pm »
I have no practical advice to offer, but here are the options I see:
- external buck converter, takes an extra inductor

This obviously has no chances of working. Where would you place this "extra buck converter" and how do you imagine it working?

Quote
- windings have inductance so with enough MOSFETs for synchronous freewheeling you could make a buck out of the winding itself

This is exactly what the controller already does.

Quote
- use "lower impedance" battery technology like NiMH, with a boost to 3.3V for the control electronics

Makes absolutely zero sense.  :-//
 

Online magic

  • Super Contributor
  • ***
  • Posts: 6785
  • Country: pl
Re: Driving brushless motors at low, or constant, current
« Reply #21 on: December 09, 2023, 02:53:01 pm »
If existing smart controllers do the job then fine.
Other option would be something in line with OP's initial idea, simple on-off switching of windings based on rotation alone with low voltage and limited current supply, I think this could work too.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Driving brushless motors at low, or constant, current
« Reply #22 on: December 09, 2023, 03:42:43 pm »
You cannot "force" torque by increasing current.

Of course you can - without a lossy mechanical load (say friction), the rotational speed is going to increase towards infinity, rise time of which limited by inertia of the rotating mass.

It's analogous how you can "push current" into a capacitor from an ideal current source, so that the voltage of the capacitor will increase until a failure.

Of course, at some point the motor BEMF equals your supply voltage and the RPM is maxed out, but then you are also not increasing current.

There really is no correct order of causality here. Physical fundamentals work "both ways" and fruitful way of thinking depends on case. In motor control, using current to create torque which then affects motor speed is usually the simpler way of thinking.

I hope you realize that this argumentation is circular? And as you also point out, useless in a real application.

 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #23 on: December 09, 2023, 05:34:40 pm »
The first task involved in the design would be to work out a circuit to provide a controlled, and variable according to a supplied signal, current (in either direction as required) in a low resistance inductive load (each phase's coil) from an arbitrary higher voltage supply? Assming minimal DC resistance in the coil the maximum torque I can get is therefore limited by how high I am able to let the current in the coil get, which must ofcourse be lower than the maximum current my higher voltage supply can provide? Only by using a separate buck converter as an "intermediate" supply to step down from low-current high-voltage to high-current low-voltage would it be possible to provide currents to the coil greater than the current which the initial high-voltage supply (right back to the wall wart or non-LiPo battery) can provide? If I develop this coil driving circuit first then actually controlling a brushless motor becomes a matter of building upon this "controlled current driver" module by deciding how much current to drive at which time, this later question being one which can be answered differently depending on whether the motor is beign driven by FOC, or by hall-sensored or sensorless control strategies?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #24 on: December 09, 2023, 06:50:09 pm »
The first task involved in the design would be to work out a circuit to provide a controlled, and variable according to a supplied signal, current (in either direction as required) in a low resistance inductive load (each phase's coil) from an arbitrary higher voltage supply?

Yes. This is usually: six MOSFETs in three half-bridge configurations, gate drivers (usually bootstrap type for such low voltage designs) for the MOSFETs, low side current sense resistors on lower leg (between lower MOSFET S and GND) of any two phases - third can be calculated; and current sense amplifiers to amplify the small voltage drop over said shunt resistors, amplification of 50-100x would be typical. Make layout tight and add low-ESR, low-ESL capacitance between the DC supply and ground close to the MOSFETS. Finally, use a microcontroller to read any position sensor(s), the amplified current sense signals and drive the MOSFET gates.

You will find plenty of example schematics online.

Quote
Assming minimal DC resistance in the coil the maximum torque I can get is therefore limited by how high I am able to let the current in the coil get,

Exactly! Note though that at some point, the motor cannot create as much extra torque per added ampere, as the motor iron saturates, so you design for your driver for a certain maximum current. Nominal motor current should be defined on the motor datasheet; if not for a cheap motor, you can roughly approximate by dividing nominal power (that hopefully is specified) by nominal voltage. Then you usually can overdrive by maybe 2x for short periods of time while still getting decent torque out of the motor.

Quote
which must ofcourse be lower than the maximum current my higher voltage supply can provide?

Actually, no - the whole thing acts like a buck converter. Let's say you run the motor at very low RPM, high torque low speed; high current, low voltage, so also low duty cycle of your bridge. In other words, the "synchronous" MOSFETs that just recirculate the energy stored in motor inductance, are on most of the time, and new energy from the DC supply is delivered only in short pulses. Let's say, your motor winding current is 10A, that actually means a pretty contiguous current through the motor (say, it actually varies in triangle waveform between 9A and 11A), but the DC input capacitor is seeing those short pulses of 9..11A; otherwise, current from the capacitor is zero. Now, having enough DC input capacitance, what the battery or wall supply sees is low average current, just 1A if you are running the motor at 10% duty cycle.

Quote
Only by using a separate buck converter as an "intermediate" supply to step down from low-current high-voltage to high-current low-voltage would it be possible to provide currents to the coil greater than the current which the initial high-voltage supply

No, intermediate supply does nothing useful. Motor inductance in the normal half-bridge configuration itself is enough, I can assure you. Motor inductance acts as the buck inductor, and mechanical inertia and BEMF of the motor acts as the output capacitor. You need the switching transistors and input (supply) capacitance, which is pretty crucial on a buck.

Quote
FOC, or by hall-sensored or sensorless control strategies?

FOC and having sensors are two orthogonal issues. I suggest having position sensors (hall or any other type) if at all possible, not only it makes the project much easier, it also provides much better low-speed performance. This is why helicopter ESCs do not have sensors, they only run at high speeds, but hoverboard controllers have hall sensors because low-speed performance is absolutely critical, even when they are low-cost devices.

FOC is much simpler to understand when you don't have to mix the uncertainty and algorithmic complexity of angle estimation in the mix, but know the electrical rotor angle at all times.

And if FOC seems difficult to grasp, you can come something similar of your own - I have done it in the past - but once you realize that FOC isn't that difficult after all, it is just the best way to do it. The math part is just a few lines of code, but of course with all the complexity of initializing microcontroller peripherals, handling errors etc.
« Last Edit: December 09, 2023, 06:57:30 pm by Siwastaja »
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #25 on: December 09, 2023, 09:30:57 pm »
Siwastaja, thank you for a very detailed reply, and it makes sense throughout most parts. I'm confident to start planning a circuit for the task.

But: "In other words, the "synchronous" MOSFETs that just recirculate the energy stored in motor inductance, are on most of the time"
Does this mean there are extra MOSFETs involved than just the two for each pin of the motor's Y topology? Each pair of Mosfets is acting as a half-bridge, with the ability to drive that pin of the Y configuration high, drive it low, or go high impedance. How do they let current recirculate through them?
Thanks
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Driving brushless motors at low, or constant, current
« Reply #26 on: December 09, 2023, 09:47:45 pm »
Quote
given the currents they tend to draw (like 10A per phase for a small motor) the brushless motors obviously have utterly tiny resistances in their windings.
You are aware that you can get brushless motors that have higher winding resistances (more and finder wire in the windings)?  These are very common as the spindle motors for CD and Disk Drives, for example.  In fact, there is a large amount of "literature" on converting CD spindle motors into airplane motors by stripping off the original windings and putting in new windings with fewer turns and thicker wiring (and perhaps stronger magnets.)  (https://www.casa.co.nz/motors/dc/brushless/BLDC-Project-SC-July2012_p1~2.pdf )
Presumably it would work fine in the reverse direction as well, although winding "many" turns of finer wire around the dozen stators sounds much less pleasant.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #27 on: December 10, 2023, 06:38:08 am »
Siwastaja, thank you for a very detailed reply, and it makes sense throughout most parts. I'm confident to start planning a circuit for the task.

But: "In other words, the "synchronous" MOSFETs that just recirculate the energy stored in motor inductance, are on most of the time"
Does this mean there are extra MOSFETs involved than just the two for each pin of the motor's Y topology? Each pair of Mosfets is acting as a half-bridge, with the ability to drive that pin of the Y configuration high, drive it low, or go high impedance. How do they let current recirculate through them?
Thanks

No, just the three half bridges. Either one of the two MOSFETs in each bridge is always driven to conduction and the other is OFF, so none of the phases would be in hi-Z - except when you want to let the motor freewheel, then you can turn all six MOSFETs off. If you use hi-Z state, then the motor inductance discharges itself through the body diode of the MOSFETs, which is effectively the same, but with higher voltage loss (Vf of the diode) and more heat generated in the MOSFET, so you don't want to do it during normal switching, only for a separate freewheeling state.

I strongly recommend you look at the analysis of synchronous buck converter because it is significantly easier to understand with only one phase. Once you understand what happens during on-time, off-time, how the inductor current behaves, how the input current goes, and so on... you can apply all this to the motor controller. For ease of analysis, you can just assume Continuous Conduction Mode. Of course in reality, even the motor would go to DCM with very low mechanical load if you let it, but in a motor controller you usually just drive the bridges '0' and '1' and not hi-Z, so run it in forced CCM.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #28 on: December 12, 2023, 07:26:06 pm »
Can you recommend any good descriptions of the Synchronous Buck Converter to read? I guess they'll also clarify where flyback protection diodes would go? For a single directional inductive load it's easy to understand that, but it will get a bit more complex when the load can be driven in either direction.
Thanks
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #29 on: December 12, 2023, 07:59:38 pm »
There is no such a thing as "flyback protection diode". All of these topologies share the common property that the inductor current is kept continuous by always offering a route for the current. If you open a switch, you need to close another switch to keep current flowing. Synchronous buck connects one end of the inductor to either Vin or GND alternatively. Non-synchronous does the same, but using a diode as one of the switches; it's still a switch, just automagic.

Maybe start at Wikipedia or do some Google searches.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #30 on: December 15, 2023, 04:55:47 pm »
"All of these topologies share the common property that the inductor current is kept continuous by always offering a route for the current"
What about when first starting up the circuit, and when shutting it down? I can see how FOC means that when starting and stopping the motor you'd keep the current flowing to make it hold position, but when the whole circuit gets powered on or off?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8180
  • Country: fi
Re: Driving brushless motors at low, or constant, current
« Reply #31 on: December 16, 2023, 04:58:38 pm »
Well, if you stop gate drive to let the motor freewheel, the energy stored in the inductance is being directed by the MOSFET body diodes (which is more lossy than keeping the MOSFET on) but this is only a short period of time (maybe a millisecond) before the inductance-stored energy simply runs out, torque and current decay to zero quickly.

And when you start it from zero current, current just starts to increase, no problem here.

Hmm, start-up and shutdown. If you use bootstrap gate drivers, start-up should begin with the low side MOSFET switching on first, so that the bootstrap capacitor charges up, although if you do it in the opposite order, it still doesn't matter, just the first high pulse gets missed. In any case, this is meaningless in big picture, but for complete understanding not a bad idea to grasp.

In shutdown, if you just remove input power supply and the motor is still rotating then the MOSFET body diodes conduct and rectify the AC BEMF; same when you rotate the motor while unpowered, the motor tries to power up your circuit, so better design your circuitry such that it does not do anything stupid with possibly very low and weirdly varying supply voltages; use stuff like microcontroller Brown-Out Detector to keep the microcontroller in reset during too little voltage.

Now the maximum voltage the motor can generate with drive shut down is just defined by the back-EMF constant of that motor; for example, if your circuit operates at 24V and is able to make the motor rotate at 5000rpm with this voltage (ignoring special thing called field weakening), then if you rotate the motor externally at the same 5000rpm, it would only generate that same 24V, which your circuit should obviously handle; so coasting to stop due to inertia is rarely a problem. But if there are external mechanical sources which can make the motor spin much faster than your inverter circuit ever does, then you need to re-think this. Think about an e-bike with maximum motor speed of, say, 25km/h, and then some daredevil coasting down a steep hill at 75km/h, generating triple the voltage the drive is designed to operate at.
 

Offline ifonlyeverything

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: Driving brushless motors at low, or constant, current
« Reply #32 on: December 16, 2023, 05:49:07 pm »
"The solution is to buy/build a BLDC controller with not only speed regulation setting, but also current (torque) limit setting"

I'm asking this question specifically so I can design and build one for myself. Buying is neither so interesting a project, nor does it give many options for working with the kind of lower currents one can have when working from a regulated DC wall wart or a NiMH battery. Most brushless drivers available as modules are for running at low voltage and very large currents from a LiPo battery.

I think most controllers use a PID-type control scheme to regulate speed, where it's actually 2 nested control loops. The faster inner loop is current control. Set a command current and the control loop modulates PWM duty cycle to track that commanded current. The outer slower loop is speed control. Set a command speed and the outer control loop modulates current to track that commanded speed... which then feeds into the inner loop. This might seem pointless but it allows for over-current protection, if you have a fast inner control loop constantly monitoring current.

So basically if you make a functional BLDC motor controller, torque control isn't a big deal. Just add an option in software for the user to directly input a commanded current (inner loop) rather than a commanded speed (outer loop.)

I've had a DIY BLDC controller project on my back burner for a while. There's a lot of cool stuff you can do with sinusoidal PWM, space vector PWM, field oriented control, resistive braking, regenerative braking, etc. but it's probably a lot easier to start as simply as possible if you're new to this. That's my plan at least: six step or trapezoidal commutation.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #33 on: December 16, 2023, 08:44:37 pm »
I'm thinking my best starting point might be to use 3 pins of a dual h-bridge I already have to hand. One can go to each wire of the motor. H-bridge chips like this, designed to be able to operate two brushed DC motors independently, usually already have protection diodes built in, and automatically have dead times between the upper and lower MOSFETS being on.

Here follow some rather rambling thoughts:

I'm trying to work out whether a h-bridge with a relatively low maximum current, with a relatively high voltage supplied, can be used. That is to say, a h-bridge chip designed to drive 2 DC motors, being used as three half-bridges, plus an unused spare output pin. Can the motor then have greater currents within its coils than the h-bridge is having to supply??? If I use a separate buck converter, before the h-bridge, to step down from high-voltage low-current to low-voltage high-current then the current in the h-bridge must be the same as the current in the coils, but can limting where the large curents flow work if the motor's coils themselves are acting as the inductor of a buck converter??? Kirchoff's current law would look to forbid "low current in any given half-bridge, but high current in coil", from a DC understanding. But I'm not sure if the way a brushless motor commutates means this law doesn't apply.

I'm thinking I might be using a 12V 1A power supply, but then might want to run the motor at something around 4A at up to 3V. If my reasoning is correct then I'd be able to get 4A worth of torque at stall, with this torque being reduced at higher speeds when the back-emf from rotation reduces the voltage which the coils "see" and thereby reduces the current which a, for example, 3V potential can provide. I'm assuming a motor with a very low DC resistance, and a rating of 10A or more, so driving 4A through it from a low voltage should be no trouble. I can envision how to handle this as a two stage problem, a buck converter to convert down form 12V 1A to lower voltage, higher current, then that feeding in to the H-bridge's V_motor supply pin, this would need a H-bridge rated for the 4A or so current I'd want in the coils though. It would also be really vital that voltage drops within the h-bridge's half-bridge units were negligible, when you're running a DC motor from 12V at say 0.3A then losing 0.3V doesn't matter too much, but at tiny voltages and high current these losses are both wasteful and risk over-heating the h-bridge chip. I can find H-bridges rated for 4A (per channel), but I have to hand, right now,lots of h-bridge chips rated for 1.5A max (per channel), so if there is a single-step buck-converter-combined-with-motor-driver way which takes in high voltage and keeps the high currents solely within the motor coils then I'd be interested in the principle.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16626
  • Country: us
  • DavidH
Re: Driving brushless motors at low, or constant, current
« Reply #34 on: December 17, 2023, 05:48:44 am »
Can the motor then have greater currents within its coils than the h-bridge is having to supply???

The h-bridge is operating as a synchronous buck converter so the average current through the motor winding may be greater than the average current drawn from the power supply.

The h-bridge must be sized to handle the peak current, peak voltage, and the average power dissipation.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #35 on: December 23, 2023, 07:24:34 pm »
Thanks for clarifying that.

I've been reading up a bit about sinusoidal driving and can see that, provided you don't drive it too fast for it to keep up, or require more torque from it that your supplied current can give, you can control the angle of a BLDC rotor by passing a current through each of its coils in an appropriate ratio derived from trigonometry.

This is done by PWMing each pin of the Y configuration with a wave which controls the average level of current. But I'm a little confused as to how this works when each pin of the Y is given a PWM signal, but the coils are in a Y, not each coil to ground. Therefore it would be the difference in the levels of the PWM signals at each pin which would control the current driven in each? This wouldn't give the ratios of current you would expect from PWMing each pin according to the trig calculations. Or is there an assumption that the PWM is so fast, compared to the rate at which the inductive load of each coil can pass a signal, that at the centre of the Y you'd indeed get DC currents, filtered in their magnitude by the PWM level at each wire's connection to your driver circuit? But you're still PWMing between driving high and driving low, no floating high Z state?

I've also been trying to understand how this is to be reconciled with the PWMing also required for limiting the motor's current.

I can imagine how you'd limit current below a maximum, and scale the currents in each coil, so as to sinusoidally drive a motor, if each coil was independent, but the Y configuration is making this concept a bit more confusing to me. Plus the way that most online tutorials seem to assume you have a power supply which will supply whatever colossal current the motor wants, and therefore don't concern themselves with limiting the current to a desired level. Any good tutorials online anyone can point to, which address how to both control currents in the coil to have them in the right ratio so as to driven sinusoidally (from which one can later do FOC once position feedback is added), and at the same time to limit the magnitude of these currents so as not to overload a power supply (imagine something like a 12V wall wart, 2A rated) despite the motor coils having a tiny DC resistance which would very quickly destroy such a supply from over-currenting (or atleast trip some sort of polyfuse for better built supplies).

It looks to be a matter of treating each coil as a buck converter, wth each being, at any given instant, set to  convert down to whatever low voltage is required to provide the desired current level for each coil, but how is this to be done when the coils are wired as a Y and not totally independently?

Thanks
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #36 on: December 26, 2023, 06:47:51 pm »
Some more thoughts:

So it looks like if each wire of the motor's Y configuration is connected to a half-bridge, then a half bridge run at a <50% duty cycle on a fast PWM setting will be sinking current from the motor. One at >50% will be driving current in to the motor, and at precisrly 50% duty cycle a half-bridge would cause no current to flow within the motor coil which it is connected to. So to give sinusoidal control I'd just need to adjust the duty cycles of each wire to the motor, and so long as the PWM is fast enough for the motor coils' own inductance to smooth the current out then it would be just like putting a desired current in to each phase of the motor.

But I can't see how the motor can act as its own buck converter, because that would require the current to go to ground and then recirculate back to a motor input wire, but those input wires would always be at a voltage higher than ground, due to the PWM, so current from ground could never flow "up" to them. This would mean I can't have more current flowing in the motor coils than the supply to the half-bridges can provide.

And where the PWM duty cycle, and how far it is from 50%, on each coil is the only thing limting the current, one could all too easily have a damaging over-current condition if the MCU monitoring the current in each phase and adjusting PWM accordingly to limit it, gets even slightly delayed.

If there was a simple circuit to act as a constant current outputting half-bridge, where an input voltage could adjust the magnitude and direction of that constantly output current, and the circuit itself would internally adjust voltages/duty cycles in real time to provide feedback and prevent overcurrent then that would work, but I can't see how this can be done without a pretty complex (and therefore slow) feedback loop involving an ADC*.

*a comparator is surely a non-starter as it would need to have an analog voltage input from something like a digital potentiometer against which the voltage across a current shunt is compared, and before you know it you've got huge numbers of chips involved to adjust these digital potentiometers up and down, all of which involves I2C or SPI commands being sent and slowing the feedback loop even further.

Thanks

Just as an extra note this (https://electronoobs.com/eng_arduino_tut176.php) is an example of the sort of control I'd like to do first, the page describes itself as FOC, but I don't think it actually is when done in the open loop manner. It looks to be just sinusoidal driving, but it would be a good basis for me to get working, then add sensors for proper FOC later. But that page assumes you are using a high current power supply, abel to supply as much as the motor draws at a PWM'd fraction of DC I think, and doesn't discuss current limiting. So I'd need to develop current limiting half-bridge methods first, then combine them for driving a motor.
« Last Edit: December 26, 2023, 07:02:32 pm by Infraviolet »
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #37 on: January 02, 2024, 03:53:42 am »
Ok, so I've come up with this:

This Falstad simulation

(yes the link text is long, it encodes the entire simulation setup within it, but I can share the link easily, so you can see exactly what I've been trying)

The potentiometer "resistance" slider lets one control the total current supplied by the power source, and the 3 "duty cycle" sliders let one set the relative current in each coil. In theory then, this will let one run a BLDC from a supply with limited current driving capability.

So now I'll list what I think might be wrong with the design, and problems which would occur when implementing in the real world:

I'm representing the half-bridges with analog switch units in the simulator, so these don't show the dead times you'd get when using real half-bridges of two mosfets. But I'd guess the diodes I've added to each wire of the BLDC would, in the real world, suppress any voltage spikes caused by the dead times in switching the currents coming through inductive coils?

I've used an op amp as a comparator in the sim, the real thing might need a proper comparator though (using the spare op amp in a package you've already included for other op amps is so convenient though) if slew rate matters. It seems an overly limited slew rate makes the current drawn from the power supply vary in a trianglular fashion, I tried with a "realistic op amp" option before using the ideal one in the sim. As this triangular waveform was still pretty fast compared to the timescales things will mechanically move on I suspect it wouldn't be too problematic really.

I've simulated the 3 PWM inputs with different frequencies, just to avoid having a situation where they stay in phase such that the high of one always aligns with the low of another. I think though that given the inductance of the motor coils they are PWMed fast enough for this not to matter. But during initial startup it will matter to ensure that the PWM signals are not all in phase with one-another and of equal duty cycle, else no current flow will be able to occur.

I haven't modelled anything in the sim to account for back EMF, because I'm initially consiering the "static" case of using currents of different magnitudes and directions in each coil as a way to control the angle of the rotor. To rotate the motor one adjusts the PWM duty cycles so that the currents in the coils draw the rotor to a different angle.

Inside the BLDC coils there can be >12 amps circulating even though the limited current from the battery is being kept around 470mA (in the example, the voltage set on the potentiometer in mV equals the current limit in mA).

The lack of control of current in the coils seems a problem, the exact curent within the coils can be quite variable (for any fixed current setting at the DC shunt) depending on factors such as the precise level of parasitic resistance (I modelled it as 0.01 Ohms on each coil, but it could easily be more when resistances of solder joints and wire conectors are accounted for) in the coils. I'd rather not design something where the torque I get for a given current is strongly affected by whether a connection is 10s versus hundreds of milliOhms, I don't think I can reliably control resistances that small.

The huge currents in the coils also mean I'd need to use much beefier half-bridges to handle them than if these coil currents could be directly measured and controlled. 10 amps is still a lot to deal with in a localised area even if one is free from the problems of having to supply it at the power source. These large currents could also be pretty nasty for diodes during the switching deadtimes. Is there a way I could control these currents, not only control the overall DC current? I tried having current monitoring shunts on each of the 3 coils, but they would need to work birectionally, and in the real world they would get exposed to voltages well in excess of those that the op amps I'll be using can tolerate. Current monitoring shunts per coil also don't seem feasible to be smoothed with a capacitor, the way the shunt at the ground end of the coils is here. And, monitoring within the coils doesn't give one such a clear idea of which half-bridge's state needs toggling so as to keep the current below a limit, it's nowehere near so simple a problem as taking all the half-bridges low when the ground end DC shunt current gets too high.

Has anyone got suggestion relating to these potential problems?
Or can anyone suggest problems with building this circuit in reality which I haven't foreseen here?

Also: BLDC motors. I've bought one, but the delivery time is slow, delivery chaos in my area continues for a while after the Christmas break. So before they arrive, can anyone give some very rough example specifications for a typical outrunner drone-style BLDC*? Particularly:
..inductance
..shaft torque at a few example coil currents

These sort of motors are usualy sold for drones or fixed wing RC planes, so the specs usually quote trhust, for given prop sizes, but not actual shaft torques or matters which will apply when one wants to fit a gearbox instead of a prop.

*kV of around 1000, 14 poles, "2830" or "2212" physical size,

Thanks
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #38 on: January 17, 2024, 02:55:40 am »
As regards controlling the current, I'm wondering whether I'm better to:
1. have the analogue current reading used to supply a proportional voltage (op amp for current measurement with voltage output) to a comparator, sending all half-bridges of the BLDC to the low position whenever the current goes above a threshold, and switching back, when the current gets below this threshold, to a state in which each half-bridge will be low or high as depending on the PWM driving it from another source (ANDing the "high if current is below limit, low if above limit" with the PWM for each half-bridge)
Or
2. having the analogue voltage reading derived from the current used to control the duty cycle on a separate PWM source, which is then ANDed with the PWM fed to each half-bridge. This way the duty cycle would decrease as the current in the coils rose, rather than sharply cutting off at the time the current went over the limit.

Either way the small inductance in drone syle BLDCs makes me think this is going to have to be operating in the 100kHz to 1MHz range tokeep the current under control? 
Thanks
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1023
  • Country: gb
Re: Driving brushless motors at low, or constant, current
« Reply #39 on: January 20, 2024, 10:00:13 pm »
A little extra note, I measured the motors and for the differnt motors I'd bought I got a end-to-end inductance of 450uH for one motor (a tiny one intended for camera gimbals), 11uH for another (drone style outrunner) and 4uH for another (RC car style inrunner). This was between any pair of the 3 wire end of the motors, if the motors are Delta config on the inside then the inductance per phase of the motor would look to be 2/3 of this, and if they use a Y config the inductance of each phase's coil would be 1/2 of the measured value.

I'm guessing the highest inductace one will be the easiet to limit the current in, it also has a 4ohm DC resistance compared to nearly zero ohms in the others, but with these kinds of inductances is there still hope for being able to limit current by taking all the half-bridge's to the low position whenever an op amp current monitor detects over-current in one or more of the 3 phase wires? Thanks
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf