-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ESP32 current sensing readings not synced with PWM - Not reproducible #381
Labels
Comments
Hey @byDagor , |
askuric
changed the title
[BUG] ESP32 current sensing readings not synced with PWM
[BUG] ESP32 current sensing readings not synced with PWM - Not reproducible
Apr 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Sometime after SimpleFOC2.2 a bug was introduced that made the phase current reading bad, the symptoms were bad stability and noisy FOC Torque mode. The phase currents looked discontinued instead of a smooth sinusoidal wave.
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
Narrowed down the bug to this function:
Different from the previous implementation, timer1 does not appear to be used. This produces discontinuous current measurements in a center aligned PWM 3 or 6 driver because all readings will only be synced to phase A.
I wrote a simple patch that works for my two phase system, it's MISSING the logic to understand if a third phase is being used.
And changing the following function to ensure we use timer1:
The text was updated successfully, but these errors were encountered: