First of all, sorry for another questions about B_G431B_ESC1, I’ve look at many discussions in the forum and couldn’t find a solution for my problem.
I’m getting started with SimpleFOC and just trying to do open loop velocity control. Running in PlatformIO (also tried Arduino IDE but have the same problem). I am using a hoverboard motor.
Issue: Jerky motion of motor at low rpm (target velocity between 1-3). When target velocity is around 6, it runs much better.
The power supply is set at 12V, and current drawn is under 0.8 Amps at low RPM, it decreases as I increase the speed.
Things to note:
If I set the motor voltage limit to 3V in the code, the current drawn caps out at 1A and voltage drops to ~7V
Motion is not consistent. I will let the motor run for a while and there will be moments where jerkiness will get worse, when this happens, current drawn decreases.
I tried a second hoverboard motor and see the same problem.
Even in open loop, there are some default PID values working in the background. They are optimized for small gimbal motor and don’t match well for hoverboard motors.
I don’t remember which variablenames they have, but when you check the threads tagged hoverboard you will gather them eventually.
Reducing driver.dead_zone can help but you need to be careful not to reduce it too much.
And then deadtime compensation would help but it’s not implemented in SimpleFOC yet.
Yes, that’s a good power supply for testing, because it will limit the current. We can assume you have the current limit on the power supply set to 1A?
You could try increasing the current limit on the PSU a little bit to 2 or 3A, the B-G431-ESC1 should be able to handle that.
Or you can decrease the voltage limit on the motor to 1V or so - but maybe it will be too low for the motor.
Basically you have a problem if the PSU voltage drops to 7V it’s too low for the ESC1. And if the voltage limit is set too low it might not be enough to move the motor.
So you have to find a good combination of current limit (on PSU) and voltage limit (in software) to ensure:
motor moves
power supply voltage doesn’t drop (too much)
current stays low enough so B-G431-ESC1 does not burn up
Thanks for the help. I increased the current limit in the PSU to 4A, and it runs much better.
Another thing I noticed is that I can’t increase the motor.voltage_limit too much. If I set it to 7V, the PSU reaches the new limit of 4A. Motor vibrates a lot. I’m guessing I need to increase the current limit even more? Is this expected?
I’d like to eventually drive this system with a 24V battery, wondering if that would be possible
I only used openloop-velocity to test the motor connection is right. When the motor vibrates it’s more a sign of too much voltage/current. IMHO it overshoots.
Go further and test the hall sensors. If that works, switch over to closed loop.
At the moment you’re in open loop mode, and current consumption is much higher for the same situation than if you can run in closed loop mode with field oriented control…
However, you have to consider the whole system and the “extreme” conditions it might encounter. You’ll want to use a voltage which gives you the speed and torque you need in your application, and tune things so the motor runs smoothly. Using closed loop control the currents will stay lower in “normal” or lightly loaded situations.
But when you have sudden changes in load or direction of motion, or if the motor becomes stalled, then currents can rise very high as the motor is driven to high torque to deal with the situation. So driver and software also have to be sized and configured to deal with these situations to prevent things burning.
Its also worth mentioning that the B-G431-ESC1 is very small and quite sensitive - you will have to add some cooling to get to higher current levels, and may find that voltage spikes encountered when running at higher voltages give it trouble…
After more reading, I realize the cooling issues with B-G431-ESC1. I would like to get the most torque I can out of the hoverboard motor (speed is not the main factor), so maybe this is not the right board for my application as I don’t want to have to come up with a complicated cooling solution.
Can you recommend a different board that might be a better fit (but still on the affordable side)? Maybe the DRV8302?
Yes, a board based on DRV8302 could certainly work. There are some available on AliExpress, which should be able to handle a decent amount of current and may be enough for your needs…