-
Notifications
You must be signed in to change notification settings - Fork 228
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
Fix SyncDriver for accelerated move #78
Comments
Now SyncDriver just tells StepperDriver to use the allotted time, instead of guessing rpms. The "move in time" functionality is not yet exposed through the other move* methods.
A little bit of quadratic equations and this is working correctly now, at least with regard to timing calculation (there is still a slowdown somewhere else but it's not related to the sync math). |
Hi there, I was having issues today with getTimeForMove() returning incorrect values when using Accel/Deaccel unless they were about ~2100. Working a-ok on constant speed. Didn't realise v1.2 was out, will upgrade library tomorrow and test, but am was wondering if the above fix might have also fixed this issue I was having? I also removed startMove from the function so that I could call startRotate on a deg, and then use other functions to work out the time remaining. Seemed to work fine for constant speed but again, not with Accel |
Yes, it does sound like the problem (issue #39 ) that was fixed in 1.1.4. Try the newest version. |
I did update the library last night but was still having issues. I'll remove all excess code and add here when I'm working on it again. From memory all my setting are like the below, rather low in general RPM: 10 Using MP6500 Polulu Driver, Arduino Mega. Great library btw, thanks a mil for making it. Should really make a seperate issue here but I updated Multidriver to run 4 motors, worked great. Planning to update to 12 later on. Think I'll run into any issue? |
With 12 motors you would see a progressive slowdown and a low rpm floor, but at the speeds you are talking about it should still work. I'd be more concerned about having enough GPIO pins. Consider using constant speed. The motor can start moving directly at 10RPM, unless it has a very large load. |
Hi Laurb9, The thing I'm building is here: https://twitter.com/jamesdelaneyie/status/1097319700235776000. A prototype atm, It's half of what the full installation will be. So 12 motors + 18 LED strips in total. The arms are about 50cm long, fulcrum about 4cm in from end, and weight about ~80g each iirc. Constant speed is a bit to sharp a movement, but might experiment with lower degrees of movement. I'll try get the data from the previous test tonight, but one thing I havn't tried yet and was going to test to night as well is, is it possible to call .begin() and .setSpeedProfile() in the loop and update the RPM, ACCEL and DECEL settings? |
Interesting application you have there. Indeed you might need acceleration or if using constant speed, you could try varying the rpm while moving with begin() you should only call once - it sets up the pins. If |
SyncDriver proportional rpm reducing method does not work well for accelerated mode because the timing for acceleration/deceleration phases is not linear.
Update the math to calculate plateau rpm correctly.
The text was updated successfully, but these errors were encountered: