Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

switch off phases completely

Open m84u opened this issue 4 years ago • 3 comments

To 'deactivate' the driver/motor, to save batterie energy, we should have the possibility to do it by using the api.

m84u avatar Jan 04 '21 08:01 m84u

We'll make sure to implement it with the next release. Here is the full discussion: https://community.simplefoc.com/t/high-current-when-motor-isnt-spinning/414/7

askuric avatar Jan 27 '21 12:01 askuric

https://community.simplefoc.com/t/b-g431b-esc1-freewheeling/1183/4

askuric avatar Sep 16 '21 18:09 askuric

Looking at the code, I think driver->setPwm(0, 0, 0) doesn't wind up turning the FETs completely off in all cases, for example in Software 6-PWM for STM32. It's because of the way we do the constrain with the dead-time

runger1101001 avatar Sep 16 '21 19:09 runger1101001

Hello friends. It's been almost two years. Has the function of disabling all phases been added?))) I use 6 pwm and esp32. I wanted to use it for a bicycle. But when I want to roll, the mosfets of the lower side open and the motor windings are switched, which is why I instantly lose speed

Iurii-Dolgorukii avatar Nov 26 '22 12:11 Iurii-Dolgorukii

Hi @Iurii-Dolgorukii , we've actually been working on it, and there is a PR here waiting to be tested and merged:

https://github.com/simplefoc/Arduino-FOC/pull/231

So you could try this code, and help us to test it, if you want, or else if you are patient for a little longer, we will try to merge this soon.

runger1101001 avatar Nov 29 '22 16:11 runger1101001

The code is in the dev branch now. Its a combination of pull requests: #231 and #213 For now switching phases off works for stm32 in 6pwm mode both in hardware and softrware 6pwm. It also works for atmega328 and atmega2560.

askuric avatar Dec 22 '22 14:12 askuric

@askuric Hi. For stm32 this works when calling motor.disable(); ?

Iurii-Dolgorukii avatar Dec 26 '22 14:12 Iurii-Dolgorukii

Hey @Iurii-Dolgorukii, Yes this will work with the library version from the dev branch.

askuric avatar Dec 26 '22 16:12 askuric

This is now merged to the main branch, and released in version 2.3.0 of the library :-)

runger1101001 avatar Mar 21 '23 23:03 runger1101001