SimpleFOCMini Over Heating - Arduino - BLDC

Hi I am using Arduino Uno and SimpleFOCMini and have used the example code for open loop velocity control to test my motor and SimpleFOCMini board, but the motor will turn fine but after a few seconds the SimpleFOCMini chip will get really hot so I turn off the power. I’m using around 8V with the motor [Sunnysky X2204 KV1800] in the following URL:

https://vi.aliexpress.com/item/4000604405617.html?spm=a2g0o.order_list.order_list_main.5.63f91802l18V0T&gatewayAdapt=glo2vnm

Please could you help so I can then start the process of getting the closed loop design working. Also I can provide the code I am using and the pictures of hardware and wiring configuration.

Thank you.

// Open loop motor control example
#include <SimpleFOC.h>

// BLDC motor & driver instance
// BLDCMotor motor = BLDCMotor(pole pair number);
BLDCMotor motor = BLDCMotor(7);
// BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional));
BLDCDriver3PWM driver = BLDCDriver3PWM(11, 10, 9, 8);

// Stepper motor & driver instance
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);

//target variable
float target_velocity = 5;

// instantiate the commander
Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }

void setup() {

// driver config
// power supply voltage [V]
driver.voltage_power_supply = 8;
// limit the maximal dc voltage the driver can set
// as a protection measure for the low-resistance motors
// this value is fixed on startup
driver.voltage_limit = 8;
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);

// limiting motor movements
// limit the voltage to be set to the motor
// start very low for high resistance motors
// current = voltage / resistance, so try to be well under 1Amp
motor.voltage_limit = 8; // [V]

// open loop control config
motor.controller = MotionControlType::velocity_openloop;

// init motor hardware
motor.init();

// add target command T
command.add(‘T’, doTarget, “target velocity”);
command.add(‘L’, doLimit, “voltage limit”);

Serial.begin(115200);
Serial.println(“Motor ready!”);
Serial.println(“Set target velocity [rad/s]”);
_delay(1000);
}

void loop() {

// open loop velocity movement
// using motor.voltage_limit and motor.velocity_limit
motor.move(target_velocity);

// user communication
command.run();
}

The Mini max current is about 2A.

The motor you use required about five times that much (over 10A).

You need a much more powerful board to drive that motor (about twice the max motor current, 20A).

You may try lowering the voltage

driver.voltage_limit = 1;
motor.voltage_limit = 1;

however this will also limit the torque. But the board probably won’t get that hot.

Cheers,
Valentine

1 Like

Hi, thank you soo much for your reply. Do you know which simple foc board will work with this motor? Also alternatively do you know any relatively cheap (small) bldc motor?

Thanks again :grinning:

Check out the High performance boards.

Cheers,
Valentine

the B-G431B-ESC1 is pretty good value, easy to get and a lot of the details are already working. If you go with one of the other boards you might get some surprises.

For good cheap motors just search aliexpress for gimbal motors, they are always different but they are a fraction the price of new ones.

im thinking of buying the motor driver you mentioned

but how would i wire it though, and would it work with arduino? if so what would the code look like.

also would either of these two different motors work?

https://vi.aliexpress.com/item/1005005494735327.html?spm=a2g0o.productlist.main.5.4e745f92hrtFP5&algo_pvid=3072bfe8-3c9b-4f78-b1a7-2de54d762c9f&algo_exp_id=3072bfe8-3c9b-4f78-b1a7-2de54d762c9f-2&pdp_npi=3%40dis!GBP!10.63!9.56!!!!!%40211bf3f816885122007235477d0797!12000033302995648!sea!GB!4464738407&curPageLogUid=XWUQyUzBh0ws

https://vi.aliexpress.com/item/4000604405617.html?spm=a2g0o.order_list.order_list_main.5.63f91802l18V0T&gatewayAdapt=glo2vnm

I fully agrre with @Anthony_Douglas statement regarding the B-G431B-ESC1 board, but would like to add a warning: You definitely need good soldering skills. Everything on that board is tiny and densely packed.

1 Like

What did you want to do with your motor? The motor you’ve bought is fast with very low resistance, do you need that speed?

Depending on your application, it may be worth considering a smaller (slow) gimbal motor that would work with the mini

I’m trying to build a quadruped robot dog, so I need torque.

Your motor is on the high side for kv. E.g at 10v it would be doing 15k rpm. Lower kv motors typically have higher torque. If you are wanting to do a powerful mit cheetah style dog then you may want a lower kv motors and some gearing
For example I think dagor uses 300kv motors with 9to 1 gearing:

If you’re dog is smaller you might be able to get away with gimbal motors (100kv)

1 Like

do you think this motor will be good?

aliexpress.com/item/1005002046611157.html?spm=a2g0o.productlist.main.87.4f497941aMo9m1&algo_pvid=58a75601-813a-4acd-b758-aa1a6dcfc952&algo_exp_id=58a75601-813a-4acd-b758-aa1a6dcfc952-43&pdp_npi=3%40dis!GBP!14.16!8.78!!!17.47!!%402102191b16885589384698069d0782!12000018542618261!sea!GB!4464738407&curPageLogUid=3sJh4LRkUoxq

I’ve been trying to make a quadruped robot for over 2 years now, but I keep facing problems.

You need geared motors for that, something like the MIT mini-cheetah. These bare BLDC motors you want to use don’t have the torque for the job you need.

Check this link below.

https://www.aliexpress.us/item/2255800382938470.html

You need the option with the MIT driver.

Problem is they are expensive.

Valentine

1 Like

hobby servos are incredibly cheap, I got metal geared ones for 5 bucks each on aliexpress. something 995 I think. M995 or something, very common model.

There is a ton of these ones kicking around too, as Valentine notes they won’t have the torque on their own, but the pulley is a 2 mm pulley so you can do something with that. https://vi.aliexpress.com/item/1005005246045403.html?spm=a2g0o.productlist.main.11.5c476cfc2HwALj&algo_pvid=a6562aeb-04bd-498b-8162-e6afbe14ec38&algo_exp_id=a6562aeb-04bd-498b-8162-e6afbe14ec38-5&pdp_npi=3%40dis!CAD!5.62!5.17!!!4.15!!%40212279a216885972360317851d0763!12000032346448560!sea!CA!2412066855&curPageLogUid=YdhWpEqgSNW4

If I may chime in on this thread:

The SimpleFOC mini is actually quite ok for the motor you picked, you can’t run this little motor at 10A anyways.
But as Valentine and others have pointed out, this motor likes to turn fast, and keeping the currents low enough using the SimpleFOC mini will require you to limit the voltage, and therefore torque.

You’ll go further with a lower KV motor, although as Valentine has mentioned, I have also never seen a direct drive leg. They’re always done with gear-down, often built into the motor itself (often called quasi direct drive, like the MIT cheetah) or via belts or capstan drives.
So I’d advise working in that direction, although of course if you want to try direct drive, you can give it a go… but I suspect you won’t hit the torque to mass ratios you’ll need.

Servos are not designed to be compliant, handle back-driving or sudden high currents. All the servo based legs I’ve seen (forgive me!) are just rubbish. If it’s to work at all then you need to use expensive robotics servos like Dynamixels, otherwise you’re likely to just burn out your servos all the time.

There’s some designs online you can look at:

MIT cheetah
Stanford pupper
James Bruton’s OpenDog

And a whole lot more that use Servos.

Even following or adapting an existing design will be super interesting and challenging project :slight_smile:

This same model is also available in 360KV. I’d go for that one. Here’s 6 for $100, so $200 for all 12 motors needed (assuming you use all the same), that seems quite a good price to me. :slight_smile:

https://m.aliexpress.com/item/4000510841212.html

I believe David has experimented with these ones… might be worth asking him about them…
In fact David might just generally be a good person to buy a beer and chat about this topic :wink: