SimpleFOC Shield overheating

Hi, everyone

I am quite new to this, please, I need some guidance.
I am trying to control the position of a BLDC (T-motor F1204) but the driver gets very hot, fast. This happens with all sketches.

Kept thinking about these settings, I changed it around a bit, but nothing works.
My hardware: Arduino Mega, SimpleFOC shield 2.0.4, AS5600 [this reads fine].

driver.voltage_power_supply = 12;
  driver.voltage_limit = 6;
  motor.voltage_limit = 3;

What am I doing wrong, can someone explain, please? Thanks

Ps. Also, I need to mention that even the Standalone driver test 3pwm overheats the driver.

Hi @Denis_Manolescu , welcome to SimpleFOC!

The motor you are using will be very difficult to control…

You don’t say which model of the F1204 you’re using, but it has either 5000KV/240mA or 6500KV/120mA.

That’s a huge KV number and tiny resistance!!

So it will be very hard to control… at 6V it will be turning at approx 30000RPM.

If you really want to use this motor, here are some ideas to try:

  • Set your PSU as low as possible, the minimum voltage your driver can accept. Then set the motor.voltage_limit to 0.1V, and see if you can run the motor in open loop mode without things overheating.
  • I2C sensors are very slow. I think the AS5600 will be much too slow to control this motor. I2C gets you a response time of about 1ms. This motor at 6V will have turned through half a rotation within 1ms… but you have 6PP so that’s 3 full electrical revolutions! You need at least several sensor readings per electrical revolution, let’s say 10 minimum, more would be better… so you need a sensor that is at least 30x faster than the AS5600… I would recommend using an encoder, they have the lowest latency, or you could try with a SPI or SSI based encoder… forget about I2C for this motor… with a better sensor you could try closed loop modes, but still with a very low voltage limit.
  • you will also need a very fast MCU, the Mega will be too slow. You’ll have to achieve something like 20-30kHz loop iteration speed to command new positions fast enough to keep up with the motor if you want to reach such high speeds. The Mega will be 10x slower than this. A fast STM32 MCU, Teensy or ESP32 will probably have enough speed…
  • and to achieve higher voltages to go at these high speeds without the driver overheating, you’ll need to use current sensing and current control. Then you can raise the voltage and limit the current…

All in all, if this your first project with SimpleFOC, I would encourage you to test first with a higher ohm motor. A gimbal motor with 10Ohm resistance will make it much harder to overheat the driver, and will be possible to control with ATMega and AS5600.

Hi, @runger

The motor is F1204 with 5000KV.

Following your advice, I had some good results.
I’ve been running the open_loop sketch with driver_limit = 0.7V and motor_limit = 0.6.
If I increase the driver_limit voltage it would start to get very hot. The motor motion so far is alright. Once I get the AS5048A (SPI version) I will do further tests.

I also ran the above setup using a SimpleFOC Mini and it works fine.

For my project, I am looking to control the position of a single BLDC and the speed of 2x others.
If I’m not mistaken, the Mini works using SPI to Arduino, right?
I was wondering, can 2-3 Mini be stacked together? Or what MCU or other configuration would you guys recommend for such a setup?

I have an Arduino Nicla Vision and I want to try using it as the main MCU, replacing Mega. Any thought?


Hey @Denis_Manolescu ,

Cool :sunglasses: that you got it working!!

Yeah, that’s expected… you’ll need the current control with this motor, or at least closed loop with a good sensor…

No, the SimpleFOC mini does not have its own MCU on there. You have to control it with 3PWM from another MCU board.

It could work, but this board does not have many IO pins. Whether or not it can work depend on if there are three pins available that are connected to the same timer…
If yes, then it can work… but it won’t be the easiest MCU to work with, due to the dual core architecture. They don’t call it Arduino Pro for nothing :wink: but if you know your way around it, and the pins work out, then this will be a super fast, immensely powerful MCU with more than enough speed to handle your twitchy motor :grinning:

Pretty cool to see they have adopted the 7mmX7mm package. Although a tad expensive, I’m also curious about the pins. Keep us posted!