Arduino Uno + IFT007 + SimpleFOC

Hi Team,

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
    // link driver to motor

    // set motion control type to velocity openloop
    motor.controller = MotionControlType::velocity_openloop;

    // initialize motor


void loop() {
    // this function can be run at much lower frequency than loopFOC()


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 :slight_smile:

You may also consider adding a

driver.pwm_frequency = 4000; // in Hz

because the IFX007T doesn’t like fast PWM frequencies in our experience.

Thanks for the follow up. It did not move. Just gives a beep sound after incorporating both your and runger’s suggestions.

Thanks for the follow up. It did not move. Just gives a beep sound after incorporating both your and dekutree64’s suggestions.

Could you please post the code as well as actual hardware, wiring, motor, etc.

Could you please post the code as well as actual hardware, wiring, motor, etc.

Hi Valentine,

Thanks for following 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.

Would be happy to answer more questions if any.

Please post the exact code and pictures /video of the driver and motor and setup.


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.

What kind of motor? And is this the right board?
Reading pages 7 and 11, it sounds like it needs BLDCDriver3PWM(9,10,11). IFX007T pin 2 toggles between high side on and low side on, so you don’t need 6PWM which has separate lines to the high and low side gates.

@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.

About motor:


Hi @bhargavah,

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.

1 Like

I don’t.

No, I was not.

That would help, thank you.

We need all details. Like, everything.


@runger Thanks a lot for being active on the question.

I generated the code from SimpleFOCGenerator and the code which I wrote above is the one which I got.

Let me write more about the setup.

Arduino UNO and IFX007T stacked up on it and motor’s three phases(U,V,W) are connected to IFX007T’s U, V, W pins.

Motor’s details are already posted.

@dekutree64 I hope you understood my writing now. :slight_smile:

Is it done? Is there any other information you would like to have?

Please share the current state of your code.