simplefoc / Arduino-FOC

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

[BUG] Strange behavior on ESP32 #338

Open DemiurgZ opened 7 months ago

DemiurgZ commented 7 months ago

Using very simple setup. Actually, limited it to just ESP32, trying various drivers and AS5600 sensor. Motor running ok in velocity mode and angle open-loop.

Even though in the open loop it gets too much current is fed to the motor, and motor gets hot quickly.

When angle closed loop mode set, then everything gets really strange. As soon as I add motor.initFOC() in setup - it looks like ESP starts freezing loop cycles. Or maybe skipping these. All serial output gets frozen, while motor behaves strange: FOC passes correctly (with slight smooth movement of motor) and then it starts quickly jumping between positions (always clockwise)..

Describe the hardware setup For us it is very important to know what is the hardware setup you're using in order to be able to help more directly

IDE you are using

Tried the Getting started guide? - if applicable YES

runger1101001 commented 7 months ago

Hi,

Not sure what is going on here...

Could I ask you: