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

Works perfectly for around 2 minutes. Then it spins randomly. #287

Closed AmExptl closed 9 months ago

AmExptl commented 1 year ago

Works perfectly open loop (velocity) both separately and together (both motor control and sensor readings). But, in closed loop (velocity) it only works perfectly for about 2 and half minutes. Then it spins randomly. This happens every single time. Starts perfectly after reset. Using the example code for Closed Loop Velocity. Used ...MagneticSensorSPI sensor = MagneticSensorSPI(10, 14, 0x3FFF); What am I doing wrong ???

Describe the hardware setup

Tried the Getting started guide? - if applicable Completed

runger1101001 commented 11 months ago

Hey, this has been traced to a bug in the velocity function, which has been fixed on the dev branch, and will be part of the next release.