-
Notifications
You must be signed in to change notification settings - Fork 71
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
Inconsistent Pulse Output on ESP32 #240
Comments
Your code looks good and the result is surprising. Questions:
|
Thanks for the quick reply!
Something else that is interesting is that after running for ~30 minutes the steps become consistant? |
could you please upgrade to 0.30.10 ? Even the Changelog does not list a related issue, it is better to use the latest version. |
Upgraded my version and the inconsistancy appears to have been resolved, however there is slight drift in setpoints over time. I am waiting on some level shifters to arrive, so missed steps here could be chalked up to my servo needing 5 instead of 3.3 volts. |
sounds good and thanks for support. With an esp32 you could use a free pulse counter using |
Had some time to continue working on this project and the issue is still present; attatching a pulse counter verifies that steps were lost during movement, inconsistency is present in both directions. Code is here:
|
Sorry to hear that. I have set up an esp32 with a digital scope connected and I cannot reproduce your issue with either example code.:
FastAccelStepper uses mcpwm/pcnt module for the first six allocated steppers and then rmt module. The mcpwm/pcnt combo uses a feedback loop: mcpwm generates steps and pcnt counts those. The theory is, that the pcnt-module gets input from the actual pin. So any noise on the pin could lead to wrong counts. To verify this, please try:
If this does not help, then it will get tricky. |
Using rmt module seems to fix it, I will do some more testing to verify stability. Thanks for the help! |
Howdy,
While playing around with the fastAccel library I found that I was getting inconsistent step outputs from my ESP32 dev board. Switching to different dev boards results in the same issue, have not tested on AVR.
Using a scope to probe the step output I can verify this issue is not my servo motor (Yellow is step output, blue is enable):
I only have a moderate understanding of Cpp so I am sure there could be an issue with my code, however after spending countless hours trying to debug I have no clue where to proceed from here.
Here is the snippit of my code (Modified example sketch);
Any help would be greatly appriciated!
The text was updated successfully, but these errors were encountered: