simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
2.03k stars 521 forks source link

A confusion about the FOC algorithm #278

Closed techHappyWater closed 10 months ago

techHappyWater commented 1 year ago

Hello, I have a question, when using the sine mode to drive the BLDC motor, by changing the duty cycle of different phase PWM to equivalent a phase voltage to the voltage we need, but when all phase PWM levels are low at the same time, all low side MOS are on at the same time, the motor three-phase is equivalent to short circuit, which will not cause the motor to slow down?

runger1101001 commented 1 year ago

Hi,

Sorry for the late answer - I missed this issue.

We have the ability to set the phase state as well as the PWM for the BLDCDriver class.

This works in 3-PWM if you are using the 3 enable pins in the BLDCDriver3PWM class: BLDCDriver3PWM driver = BLDCDriver3PWM(a, b, c, en_a, en_b, en_c)

In 6-PWM it works with some of the MCU types we support: currently this is supported on RP2040 and STM32, and also the new Renesas A4M1 MCUs.

But you're right, it is an area of active development for us, and not yet well tested or documented.

Which MCU type are you using?

runger1101001 commented 10 months ago

If it is ok with you, I will now close this question issue - if you have more questions, please feel free to open more issues, or even better, post them to our community at https://community.simplefoc.com