My intent is to increase the number of stepper being controlled to 10. The issue is, this library only allows the control of 6 steppers at one time. I am not doing any think fancy, just pre-set clockwise and counterclockwise turns the may-or-may not occur at the same time as the other steppers.
My question is: Has anyone else used this library and found a way around this limit? The total control limit for servos with the library is 16. If not is there a more suitable library that I can use to control 10+ stepper with overlapping movements? (As I said, I don't need the bells and whistles, just simple setting of speeds and directions.)
Opposed to the 16 Servo limit - which is really a hard limit because of the software structure - the 6 stepper limit isn't that hard. This limit is dependent on various facts - especially max speed of the steppers, use of SoftLeds ( which are processd in the same ISR ) and processor speed.
The actual limit is set by a define in MobaTools.h: #define MAX_STEPPER 6
Please show your sketch for a first estimate if it may be possible to set this higher.
Which Arduino are you using?
Thanks for the reply! I am using a mega 2560. Below is the script for 10 steppers. Just as a note, I am using the mega with a RasPi. Most of the logic is controlled at the RasPi, and it just sends a command to the mega, via serial, to turn the motors (i.e. the "arrival" variable is just a value sent from the RPI to initiate a turn sequence.) Currently, I am running the motors at 2,500 (steps/10 seconds, I believe), but I have run them at 6,000 (i.e. 60,000 steps/second) previously, so hoping I have some room to increase the # of steppers, due to the slower speed?
With regard to the limit set in MobaTools.h, that was my initial hunch. So hopefully I will be eligible to redefine that variable.
(Just seeing now that the 60,000 steps/second is obviously not correctly calculated haha. Division is hard some times for me apparently...)
But anyways, yes that was my hunch as well! Appreciate the help! Definitely feel more confident with a second opinion.
Out of curiosity before this form is closed. Under the conditions described above, what do you think is the max about of steppers I can control? I had some future plans to try and expand to 20, but not sure if I'm pushing my luck.
Hi all. Seems that you guys have alot of experience with MobaTools. I'm running a single Nema23+TB6600 set and it's kinda difficult to make it run without occasional missed steps and erratic behaviour. I've tried with different currents, different microsteps as well, but I actually need it to be on the 1 step configuration, otherwise the speed isn't enough for my purposes. When zero is set and make it run on loops back and forward the zero position is drifted slowly. Also if you make it run a certain number of turns sometimes it's not completing the round accurately, though by very little. What are your advices for running this system reliably? Thanks in advance.
@mogo4414: Sorry for the very late reply - unfortunately I completely overlooked your post.
20 steppers is definitely a lot - I never tried that much steppers by far. It's a question of the time the ISR needs to complete. That may be too long with that number of steppers.
@fbolzoni: You should not hijack other threads. Ask a moderator to move your post to a new topic. And your question has nothing to do with using a large number of steppers.
There may be different reasons for your problem. Please post your sketch that shows the problem and a schematic with all wiring and links to the used components - especially the stepper and the PSU.