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
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.
No, there are not coupled mechanically.
I need to drive them individually.
I don't think that would work particularly well, no two motors are identical.
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.
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.
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 ?).
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.
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.
Those igbt modules they have look pretty nice for some quad copter applications.
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.
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!
Thanks for your inputs.
Yes, the goal was to transpose VESC firmware for 2 motors, not using STM32 dual BLDC library.
For this point, I totally agree !
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