BLDC motor current control - Page 1
Forum section: electronics / projects

author: fx991ex
author_rank: Contributor
timestamp: August 16, 2018, 02:56:04 pm
content: I am designing a driver for a BLDC motor. The motor I am trying to control is Maxon 339267 (3 phase, 4 pole, 9V, hall sensors).Let's say that I do it with three mosfets and a microcontroller. I am trying to figure out what would be the best way of implementing current control. I would like to have adjustable current limit so I can control the motor's torque.

author: Benta
author_rank: Super Contributor
timestamp: August 16, 2018, 03:33:34 pm
content: You can't control torque. Torque is defined by what your mechanical load demands.What you can do islimittorque to protect either motor or load. This of course means that the load rotates slower or stops.The easiest way is to measure the current in either the positive or negative supply rail. There's no reason to measure the different phases individually (symmetry).

author: Dave
author_rank: Super Contributor
timestamp: August 16, 2018, 05:44:26 pm
content: Quote from: Benta on August 16, 2018, 03:33:34 pmYou sure as hell can.The thing you need to implement is field-oriented control (FOC). Whether or not you actually want to spend the time to develop it is another question.A brief introduction.This will hopefully give you an idea of the complexity of the application in question.

author: Benta
author_rank: Super Contributor
timestamp: August 17, 2018, 07:53:51 am
content: Quote from: Dave on August 16, 2018, 05:44:26 pmNo you can't. Imagine the (extreme) scenario where you tell an unloaded motor to deliver a certain amount of torque. It will accelerate to infinity.Apart from that, FOC is great for induction motors, for BLDC I consider it a complete overkill. Also, the OP's motor has Hall sensors, so it makes no sense.

author: Dave
author_rank: Super Contributor
timestamp: August 17, 2018, 02:08:34 pm
content: Quote from: Benta on August 17, 2018, 07:53:51 amYou really can.Your argument is the same ridiculous one that some people used in the constant current vs current limited supply debate we had on the forum the other day. The current is regulated within a limited output voltage range just like the torque can be regulated within a limited RPM range.If you request a torque from an unloaded motor, it's just going to spin the rotor up to its maximum permissible speed (configured within the FOC). The torque at that point is going to be close to zero (just enough to overcome bearing friction and air resistance) - the same way an unloaded current source would hit its compliance voltage and the current on the output would be zero.

author: Siwastaja
author_rank: Super Contributor
timestamp: August 17, 2018, 02:35:43 pm
content: I never understood the FOC, really. I have the bad habit that before I implement something, I want to understand it. I spent about a year reading on AC induction motor FOC (which, to be fair, is an order of magnitude more complex as a whole than BLDC FOC, including an additional "rotor flux estimator" black box no one was ever able to describe in any terms to me), trying to make sense, and the more I delved into maths, the more apparent it became that people writing all these manuals, appnotes, academic papers, etc., didn't have a clue either, just copypasting the same fancy math terms they had read about previously. And, you can't teach something you don't really understand! What became apparent was that I'd need to find someone who really understands it, and then have they personally teach it to me, so I can ask all the stupid questions I need to. I never found anyone.This hasn't prevented me from creating great and usable motor drives - including torque control (yes, you can only control itwithin limits, just like in constant current lab supply there are limits as well) - for both AC induction motors, and BLDC. They are very efficient, as well.FOC is typically presented as one huge black box with a massive "curriculum vitae" for "benefits" such as "high efficiency" over "competing" (what exactly?) control schemes.OTOH, "crap in, crap out" applies. Books have been written on tuning the FOC to work at all.And, for each person, the acronym "FOC" may mean completely different things.In BLDC, the FOC seems to sometimes mean sensorless operation where the phase synchronization happens based on current direct measurement of two phases.For me, the FOC seems an equivalent of compensating a voltage controlled switch mode supply - a great academic discussion of 1970's, difficult to achieve stability with, requiring careful tuning of PID loops. Other simpler schemes would be equivalent to current mode controlled converter, but I don't see much discussion on anything but FOC. "DTC" or "direct torque control" was a term I saw a few times in the induction motor world, and it made more sense to me, although I never understood that completely, either, just that it's closer to my "inherently stable, simpler current mode converter" analogy.In the end, I don't know. All BLDC controllers I have designed use low-side current sensing on two phases, just to support any control scheme requiring this. OTOH, every current limit I haveactuallyended up implementing would work from the DC bus current measurement as well, as long as it doesn't include too much bulk capacitance after the shunt. OTOH, I use hall sensing to sense the rotor angle for phase synchronization. I can imagine that a well tuned current measurement could get me more resolution than the limited 60 electrical degrees I get from the halls, especially during load changes at high speeds.TL;DR:FOC can really mean anything. The presentation is often unnecessary complex and involved in math. FOC, in any form, may not be necessary for you, or it may be the best thing ever for you. If you find it overwhelming, implement something of your own first, which is exactly what I have always done, and never ended up with FOC so far.

author: fx991ex
author_rank: Contributor
timestamp: August 17, 2018, 11:59:11 pm
content: Thank you all for the responses, it made some things clearer.I figured out that it would be a lot easier to control the fets with a dedicated drive than a microcontroller. I did some reaserch and I think I figured out what I need. So I would need a dedicated three phase BLDC drive which can be either integrated or gate drive with external fets. The drive needs input for three hall sensors. I need sinusoidal current supply because it produces lower noise and smaller torque ripple. Supply voltage for the drive should be 6V or more.I stumbled upon Allegro A5939-49 gate drive and based on the information on their website I think it fits my needs.https://www.allegromicro.com/en/Products/Motor-Driver-And-Interface-ICs/BLDC-Drivers.aspxI emailed Allegro for the datasheet but no response yet after 24 hours. I don't understand why they don't just publish the datasheet on their website.Is there any other drive similar to A5939-49 out there? What other manufacturers should I check out?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 18, 2018, 12:35:25 am
content: A micro with advanced timers, like the ATXMega series, and probably a lot of 16 and 32 bit MCUs, will do. Given that you need to implement all the control logic yourself, whereas a ready made chip does everything for you.Tim

author: Smokey
author_rank: Super Contributor
timestamp: August 18, 2018, 06:16:49 am
content: Not to be too much of a dick about it but based on what you are saying here, you are a long ways off from being successful on this one. You are better off going and buying an actual commercial servo amplifier from ebay. It will ultimately save you a TON of time and money. If this is for an real project where there is some volume, that's even a better reason not to screw around and just find a company that can sell you a servo drive.Here are the specs for that maxon motor (they make good motors by the way). At 9V and 3A peak you should be able to get a drive solution for a reasonable price.Values at nominal voltageNominal voltage 9 VNo load speed 3720 rpmNo load current 74.7 mANominal speed 2060 rpmNominal torque (max. continuous torque) 24.5 mNmNominal current (max. continuous current) 1.06 AStall torque 68.3 mNmStall current 3.06 AMax. efficiency 71 %CharacteristicsTerminal resistance 2.95 ΩTerminal inductance 1.61 mHTorque constant 22.4 mNm/ASpeed constant 427 rpm/VSpeed / torque gradient 56.3 rpm/mNmMechanical time constant 20.6 msRotor inertia 35 gcm²Thermal dataThermal resistance housing-ambient 12.1 K/WThermal resistance winding-housing 4.99 K/WThermal time constant winding 8.69 sThermal time constant motor 135 sAmbient temperature -40...+100 °CMax. winding temperature +125 °CMechanical dataBearing type ball bearingsMax. speed 10000 rpmAxial play 0 - 0.6 mmMax. axial load (dynamic) 4.8 NMax. force for press fits (static) 45 N(static, shaft supported) 1000 NMax. radial load 14 N, 5 mm from flangeOther specificationsNumber of pole pairs 4Number of phases 3Number of autoclave cycles 0ProductWeight 57 g

author: fx991ex
author_rank: Contributor
timestamp: August 18, 2018, 11:28:34 am
content: I am clearly not an expert in this field but I am trying to get some perspective of how it's done.I am developing a prototype of a mechanical device and I would rather go with a brushed DC motor since it is easier to control but I couldn't find one with similar size, speed and torque characteristics. The end goal is to have inputs for speed, direction and current limit. I am probably going to order ESCON Module 24/2 to use in a prototype but in the end I will need a more compact solution. ESCON Module 24/2 cannot be used in the final product because of space limitations.I am familiar with the motor specs. Why is A5939-49 drive from Allegro not compatible with my motor?