Adruino Uno to Slow for higher Stpper Freq. ?
I try to run my Stepper fast.. using 33 V@ .8 A and Big Easy Driver and Adruino Uno with Accel Libary...
But somehowe seems not possibel because the Stepper Signal is never higher than 1000 Stepps per secound when I measure with the osc.
When I hack the setup with an PWM Generator on the Stepper, the Stepper runs propper with higer Freuenzies than 1000 HZ
Here my code ... actually should bu it out 10 000 Stepps instead of only 1000 ?
#include <AccelStepper.h>
// Define some steppers and the pins they will use
AccelStepper stepper1(1, 2, 3);
If you look at the comments in the AccelStepper library it explicitly mentions performance is limited to
about 4000 steps a second.
If you haven't looked at the comments, start getting into the habit when you use a library (for instance
you find out which bits of hardware the library is using, which matters when you start using several
libraries).
[ and yes that's way too slow for serious stepper motors with microstepping - 50k to 100k steps/sec
is more what you want ]
thanks for help... now I switched for Arduino Due 84 MHZ and the accel libarry easy can kick out over 10 KHZ... so problem solve... Arduino Uno ... was just to slow
No, the AccelStepper library is too slow, with care you can get much better performance from an ATmega328,
but it does need to be interrupt-driven and probably DDS-based.
DjngocontraRapheal:
thanks for help... now I switched for Arduino Due 84 MHZ and the accel libarry easy can kick out over 10 KHZ... so problem solve... Arduino Uno ... was just to slow
which stepper driver do you choose?
the arduino due io is 3.3V?but I didnt found any stepper driver io below 5V.
I'm fiddling with a sketch on an Uno to drive 4 stepper motors for a 3D printer I'm trying to make. The part of the sketch that generates steps has a loop time of about 50 microsecs. That implies a potential step frequency of about 20kHz for 4 motors simultaneously (which does NOT imply 80kHz with 1 motor). And that's with no effort at optimization such as direct writing to the ports. And it doesn't use interrupts.
I don't have a stepper motor that can verify this. For the moment I'm quite content with about 1000 steps/sec.
I am posting this because I had the same issue and it is the top google solution for "accel stepper library too slow"
The answers here and several others are wrong. This issue of speed is due to your step mode on the big easy driver. The default (1,1) step mode is 1/16th of a step. The typical stepper is 1.8degrees per step. Do you need .1125 degree aka 3200 steps per rev accuracy?
First swap the step mode to 0,0 which is full step mode. Now 200 steps is a revolution. Now the 4000 steps per second limitation turns from 1 rev per second to 20 revs per second.
Your speed gets increased X20
Adjust the step motor to half or quarter step as needed for accuracy if your max speed far above what is needed for your application.
If you need faster then that you need to get a faster controller OR gearing to increase the speed.
For a reference look at ms1 and ms2 here on the creators page.