Stepper motor library

#1

Does anyone have any solution to control multiple stepper motors simultaneously? The Step/Dir library avalaible does not allow that feature.

0 Likes

#2

I remember some discussion of stepper-motors and did a search on this forum. Do any of these help you?

https://forum.xod.io/search?q=stepper

0 Likes

#3

The main problem is that there is no way of controlling two steppers simultaneously that I can think of. In arduino IDE there were couple of libraries, that could accomodate this. All of the topics about seppers till this day in forum i’ve read, unfortunately with no success.

0 Likes

#4

Yes, I was trying to remember the discussion about multiple-steppers. The problem was timing, if you want continuous/smooth movement, which needed to be tight, and thus (probably) use interrupts. But, there are a limited number of those, and they are used for multiple things.

Techniques based on “pulsing” every loop() seem problematic. A transaction in XOD is analogous to loop() (clock set to always), but I wonder if that’s fast enough to create smooth motion, given the rest of your program? What are the timings needed for that (when do you need to send the next pulse, with what tolerance)?

What are the Arduino IDE libraries that can do it? I could look at them and see if they’ll work in XOD world. I looked at AccelStepper, which appears to do smooth motion by sending pulses at the right time in loop().

If you can use extra hardware, and offload the “move-n-steps” logic:

Something like “Digilent chipKIT Motor Shield. It’s an I2C controller allowing several shields to be used.” or https://www.pololu.com/category/120/stepper-motor-drivers

What else have you looked at that would help with this?

1 Like

#5

One of possibilities might be the grbl library, of those I remember. Controlling three steppers was superb even in high speeds, but now I have another project in which there’s a need to control two independent steppers from program inbedded in arduino module. Thing is that while one motor moves, the other does nothing. When I get to my PC, I will get to look at previous projects in arduino IDE and tell, which library also works with multiple steppers. Thanks in advance!

0 Likes

#6

External hardware is last resort and it takes a lot of time to get hands on and there’s a need to keep simplicity in project.

0 Likes

#7

This is the library that worked using two steppers simultaneously: https://github.com/HobbyComponents/HCMotor unfortunately I lost the sketch to show. It was a simple program to control two independant mixers for brewing and it worked like a charm. Thanks for any help! :slight_smile:

0 Likes