I am new to this community and started today itself. Since today morning, I was trying to move the BLDC motor in open loop but was not able to move it at all.
Following is the snapshot of the code I have written so far:
#include <SimpleFOC.h>
// BLDC motor instance BLDCMotor(polepairs, (R), (KV))
BLDCMotor motor = BLDCMotor(4, 0.73);
// BLDC driver instance BLDCDriver6PWM(phA_h, phA_l, phB_h, phB_l, phC_h, phC_l, (en))
BLDCDriver6PWM driver = BLDCDriver6PWM(5,6, 9,10, 3,11);
void setup() {
// initialize driver
driver.init();
// link driver to motor
motor.linkDriver(&driver);
// set motion control type to velocity openloop
motor.controller = MotionControlType::velocity_openloop;
// initialize motor
motor.init();
_delay(1000);
}
void loop() {
// this function can be run at much lower frequency than loopFOC()
motor.move();
}
Do you guys see any obvious things in the code? Any leads would be appreciated. Thanks you.
Try motor.move(10); That should spin at about 100RPM (velocity is in radians per second).
You also need to set driver.voltage_power_supply and motor.voltage_limit. For starters, set voltage limit low enough to keep current below 1 amp. i.e. set it equal or less than the resistance of your motor. That usually won’t burn anything up
As my question title says, I am using Arduino Uno + IFX007T and simpleFOC library. I want to run the motor in open loop by not considering the hall sensors at the motor. Connections are simple that motor’s phase U, V and W are connected to respective pins at IFX007T and rest everything is ignored from the motor and the driver as well. One more connection that giving explicit 12V power supply to IFX0007T.
The driver, IFX007T is stacked up on Arduino Uno and above written program is flashed to Arduino UNO.
Hi Valentine, Trust me the code is same as the posted code. Were you not able to understand the setup from my writings? There is nothing in the set-up. Minimal set up. I would have to go to office for the photo.
@dekutree64 Yes, that is the shield actually, not board. Board is Arduino UNO. And you might be right about 3PWM for the driver. I was confused that Arduino has 6PWM so have to pass *6PWM but since it is for driver, it has to be *3PWM(9, 10, 11).
So, *3PWM is already tried today morning and the status is still same.
Please share the current state of your code so we can check what might be wrong…
Have you set the inhibit signals of the bridges correctly?
It would also be good to understand the PSU voltage levels and limits you have set. With this motor, the resistance is quite low, so you should set appropriate limits to stay within its current rating and prevent it overheating.