User claims to achieve Syncd Starts & Ends with AccelstepperLibrary - help

This user claims to achieve synchronized starts and stops regardless of step counts with a simple formula. But his method is very unconventional and I don't really understand the way he describes it. Can anyone decipher it for me so I can achieve this in my own project?

I wish I could talk to him directly but the topic is closed.

There are a lot of posts on this subject, but no one has a good method of getting around this using accelstepper. I know that multi-stepper exists for this but I have issues with it too.

Thanks for any insight.

@shydevil

2 Likes

It isn't clearly spelled out in that code, but the point of the method seems to be to scale the accelerations of the slower motions by their distances so they all end up finishing at the same time.

The math ends up equivalent to using the d=0.5*a*t^2 formula from physics/kinematics, where if you identify the longest motion and it's acceleration, you then know t^2 for the full coordinated motion, and since, for the slower axis motions you know their distance 'stepperDis's you can then calculate their accelerations as axisAccelN= maxAccel*abs(stepperDis/distance).

1 Like

You can ask @shydevil to help you by including his / her username after @, as I have done, he / she will now get a notification about this topic and can join in if he / she wants to.

The general rule for this forum is to discourage adding new questions on to other people's topics, so, while I considered opening the topic for you I decided it better to continue here with your topic.

1 Like

Thank you so much for breaking this down for me. I'm new to Arduino and programming but this goal I have keeps me up at night haha. I'll be applying this formula to my code.

I have a really cool setup at the moment.

Controlling stepper motors over LAN with an Ethernet shield. Client is sending http messages to the Arduino with PS4 controller input over python script running pygame. The motor's speeds are mapped to those inputs.

It works great, but I want the functionality for adding point A and B. Wanted to figure out how this works before trying though. So I really appreciate it!!

(The goal is to have 3 motors that do this function)

Here is the functionality In a video :slight_smile: