-
Notifications
You must be signed in to change notification settings - Fork 597
Motor stops due to direction change - voltages NaN #192
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
Comments
Could this be realted to this issue #177 ? |
Doesn't seem so - it's STM32 rather than ESP32, and Adharsh doesn't have the phase resistance set. |
I did some debugging, and void |
Yes @markovica, the value Uq is being fed NaN, The problem is coming from
where |
For a quick fix you can modify the function
|
Thank you @kadharsh I moved your fix to HallSensor::getVelocity() as it makes more sense to me since this seems to be a hall sensor issue and it seems it's working perfectly.
|
Yes, you are right, I just put it there just in case. |
That's nice work and you guys are able to solve the issue, but I was looking at the source code, and over there vel is not declared. Kindly you can highlight where you declared the vel value. Thanks |
just replace it with this:
And it should work! Happy hacking : ) |
This is a simplified template, feel free to change it if it does not fit your case.
Describe the bug
The motor stops sometimes when it changes direction. The calculated voltages are NaN - causing this behaviour.
See: https://community.simplefoc.com/t/inrush-current-problem-with-our-bldc-driver-board/2052/25
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
See forum post - we've been trying to get the motor driver running, and have run into this problem.
The text was updated successfully, but these errors were encountered: