Computing > Programming

Synchronize stepper motor movement

<< < (3/3)


--- Quote from: beanflying on April 11, 2021, 02:05:26 am ---I haven't used that library so I just google'd it for a bit of a look and this turned up and the link to AccelStepper

If you have a long run on one axis then take a look at this instead of running belts. It will make packdown and transportation so much easier as the rest of the gantry/gimbal could be removable with no tools. Concept implementation below.

--- End quote ---

The Multistepper class is what I tried in the meantime. While it manages to synchronise the speed of the motors, it does not support acceleration and jumps straigt to full speed, which just causes more problems.

The rack an pinion solution looks nice and I will keep it in mind for future projects. The mechanical design of the slider is already finished and works fine with a belt.

Having a quick flick through the AccelStepper.h having a good read of the comment lines if nothing else might be worth it for you. So rather than use it as a Library see if there is bits of the Acceleration code in particular to incorporate into the Library you are already using?  Also make

While I get the ease of Libraries and I use them a lot sometimes doing it from scratch or hacking them is the right solution too  :)

Apparently, you don't care about the exact path taken so 2D interpolation isn't required.  This isn't a CNC problem.

I would look at the relative displacements and set the axis with the largest displacement to run at full speed.  I would then calculate the other axis as some percentage of full speed based on its relative displacement.  I'm assuming that the control will eventually get to the proper endpoint.  It would probably be important to run out the small move before the large move.  Getting both axes to the end point simultaneously might not be all that important.

If you care about the exact, step-by-step, motion, then you need some kind of CNC style interpolation and that kind of stuff is all over the Internet.


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version