Max speed from Accelstepper vs GRBL

609 views
Skip to first unread message

David Glicksman

unread,
Aug 9, 2017, 5:57:20 PM8/9/17
to accelstepper
Hi all,
I'm running a SparkConcepts CNC xPro, which is a one-board equivalent of an Arduino Uno plus 4 DRV8825 drivers.

The board comes preloaded with GRBL 1.1 and is capable of running my 4 wire NEMA17 motor at lightning speed. 20,000mm/m (the equivalent of... I don't know, thousands of steps per second). But that's using G-code, which precludes any kind of realtime control. So AccelStepper to the rescue.

After flashing it with AccelStepper (thanks for the advice, Gregor!) I'm able to control my steppers, but at a much slower top speed. I'd say it maxes out at a tenth or a twentieth of what I can do with GRBL. I don't have my code handy (at work) but I just used example sketches and increased max speed until it topped out. Other posts on this group mention that AccelStepper doesn't use PWM, can only run one step per code loop cycle, etc. but I don't know what that means in terms of this board with its proprietary pinouts. I've mainly found my current pin settings with trial-and-error.

I will try changing my minPulseWidth tonight, but I feel like I'm missing some more fundamental concept. For what it's worth I got much better result specifying my motor in step-and-direction mode with
AccelStepper stepper(1,5,2)
as opposed to the default definition.

Thanks for any advice

David Glicksman

unread,
Aug 10, 2017, 10:27:38 AM8/10/17
to accelstepper
Ok, minPulseWidth(20) was the last piece of the puzzle. I can now run my steppers at (or close to) the same speed as GRBL.
Reply all
Reply to author
Forward
0 new messages