You are here

Driving 2 BLDC motors with one MCU

14 posts / 0 new
Last post
Pimousse
Offline
Last seen: 1 month 3 days ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101
Driving 2 BLDC motors with one MCU

Hello electronics gurus ! :)

Since a while, I had in mind a project of building a VESC that could drive 2 differents BLDC motors with one MCU. Time has come ! :D

I selected a STM32F405 LQFP100 to manage the additional IO, but still I'm stucked in how I'll be able to deal with the 3 injected ADC channels and 6 phases.

The current firmware uses an injected ADC per motor phase.

Is there a trick ?

Should I use an external IC ? If so, which one ?

Thanks a lot !

 

Pimousse

Addy
Offline
Last seen: 8 months 3 weeks ago
Joined: 2017-09-06 01:53
Posts: 13

What is your application? If the two motors are the same model and are mechanically coupled together, you can drive them in parallel using a single controller.

Pimousse
Offline
Last seen: 1 month 3 days ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

No, there are not coupled mechanically.

I need to drive them individually.

TheFallen
Offline
Last seen: 1 hour 11 min ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 195

If the two motors are the same model and are mechanically coupled together, you can drive them in parallel using a single controller.

I don't think that would work particularly well, no two motors are identical.

Addy
Offline
Last seen: 8 months 3 weeks ago
Joined: 2017-09-06 01:53
Posts: 13

As long as the motors have the same pole count and kv (ie same model of motor) I don't see why they would need to be identical. It is important to synchronize the two motors properly before mechanically locking them together. This can be done by wiring them in parallel and applying a DC current through one phase to magnetically hold the motors in the proper position before mechanically locking them together.

tul00985
Offline
Last seen: 1 day 14 hours ago
Joined: 2018-06-11 13:13
Posts: 18

with the ST Motor Control Workbench you can drive 2 independent Motors with one MCU. Of course you will need 2 Gate drivers and and 6 Half bridges.

But ST do this with STM32F417 or with the STM32F446. Maybe the have more (spezial) peripherial?

And the max ERPM will be lower with two Motors, because you have less time for calculating.

Pimousse
Offline
Last seen: 1 month 3 days ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

Thank you Tul00985 !

I need around 53k ERPM, would it be ok ?

I found STM Motor Workbench documentation stating that 2 motors can be driven with 3 shunts topology (manual UM1052)

However, in the case resources are not shared between both current sensing, the MCU needs to have 4 ADCs (Why only 4 ?).

Danny Bokma
Offline
Last seen: 4 days 9 hours ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

We had two motors of the same type and coupled them together, it worked, even under load:

https://www.youtube.com/watch?v=GZkbB82-YBM

We synchronized them by driving them with a drill and measuring the phase voltage with a scope and by adjusting one of the bells until the phase angled matched.

tul00985
Offline
Last seen: 1 day 14 hours ago
Joined: 2018-06-11 13:13
Posts: 18

Hello Pimousse,

 

i had a Seminar by ST about ST's Motor Control Souloutions. And there they told us everything to know. And there was a picture showing the MCU from F0 to F4 with al the features and the max. RPM

 

You can find it here on Page 43:

https://www.st.com/content/ccc/resource/sales_and_marketing/promotional_...

Maximum DUAL FOC RPM = 45kHz (Rotation per Second)

I'd never testet it! I think i is tested under perfect parameters.

 

And (2 Years ago) ST just used 2 Shunt's in the Configuration Tool. So you just need 4 ADC for 2 Motors.

TechAUmNu
Offline
Last seen: 8 hours 28 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 510

Those igbt modules they have look pretty nice for some quad copter applications. 

Roger Wolff
Offline
Last seen: 1 month 3 weeks ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

To drive two BLDC motors, you need to build hardware that has all the right drivers on all the right pins (places). THEN you can use ST's proprietary BLDC driving libraries to drive those two motors. 

The VESC has many advantages. For example, you don't need to compile the motor you're going to use into the binary. 

Benjamin may say that the CPU is more than 50% idle, but htat's not the only resource that is limited. So porting the VESC software to support two motors is going to be difficult. If you want to use ST's software, then it has nothing to do with VESC anymore. different hardware, different software. 

josh
josh's picture
Offline
Last seen: 1 year 2 months ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

Yeah, I agree porting the software over will be difficult. No doubt it is possible, but a deep understanding of the firmware and a lot of time would be required. Also with one MCU there is not as much redundancy in a failure. Keeping the motors independently controlled is still the most reliable solution imo.

Cheers!

Pimousse
Offline
Last seen: 1 month 3 days ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 101

Thanks for your inputs.

Yes, the goal was to transpose VESC firmware for 2 motors, not using STM32 dual BLDC library.

 

Keeping the motors independently controlled is still the most reliable solution imo

For this point, I totally agree !

wkt
Offline
Last seen: 1 year 11 months ago
Joined: 2018-03-27 18:23
Posts: 5

Check out this project, it does control 2 motors from one STM running a modified version of VESC, just the speed seems to be lower.

https://github.com/madcowswe/ODrive