Stepper Testing
Contents
Testing of open source stepper hardware/firmware
status
x
grbl
I am starting with grbl v0.8 "edge" branch forked from https://github.com/grbl/grbl at https://github.com/chuck-h/grbl/tree/edge . ChuckH 09:19, 24 September 2012 (CEST)
grbl requires an appropriate config.h file and a patch to the stepper-enable polarity in order to work with StepperNug.
I intend to take advantage of ongoing grbl development, so I have tried to structure the fork so that merging from upstream is not too cumbersome. For example, config.h is lightly edited but largely overruled by config_ose.h .
Relevant parts of config.h (pin assignments):
// Define pin-assignments #define STEPPING_DDR DDRB #define STEPPING_PORT PORTB #define X_STEP_BIT 5 // Uno Digital Pin 13 #define Y_STEP_BIT 3 // Uno Digital Pin 11 #define Z_STEP_BIT 1 // Uno Digital Pin 9 #define X_DIRECTION_BIT 4 // Uno Digital Pin 12 #define Y_DIRECTION_BIT 2 // Uno Digital Pin 10 #define Z_DIRECTION_BIT 0 // Uno Digital Pin 8 #define STEPPERS_DISABLE_DDR DDRD #define STEPPERS_DISABLE_PORT PORTD #define STEPPERS_DISABLE_BIT 4 // Uno Digital Pin 4 #define STEPPERS_DISABLE_INVERT // Logic low out for disable (e.g. steppernug) #define LIMIT_DDR DDRD #define LIMIT_PIN PIND #define X_LIMIT_BIT 7 // Uno Digital Pin 7 #define Y_LIMIT_BIT 6 // Uno Digital Pin 6 #define Z_LIMIT_BIT 5 // Uno Digital Pin 5 #define SPINDLE_ENABLE_DDR DDRD #define SPINDLE_ENABLE_PORT PORTD #define SPINDLE_ENABLE_BIT 3 // Uno Digital Pin 3 #define SPINDLE_DIRECTION_DDR DDRD #define SPINDLE_DIRECTION_PORT PORTD #define SPINDLE_DIRECTION_BIT 1 // Uno Digital Pin 13
(Note: I assigned SPINDLE_DIRECTION to an unused pin as a quick hack.)
To reverse the polarity of the stepper enable pin, I added the STEPPERS_DISABLE_INVERT flag (above) and changed stepper.c to honor it (lines 104, 124).
timing
Measured timing performance (execution time of stepper interrupt) ChuckH 21:06, 16 December 2012 (CET)
- Standard interpolator, linear movement block, 3 axes moving, ~29.5 usec
- Independent-axis (homing code), 3 axes moving, ~54 usec
This suggests maximum step rate in standard mode is ~30K steps/sec; homing mode ~15K steps/sec.
Measured timing performance of I2C GPIO unitary read: 148usec. (TWI_FREQ 400kHz). This is the approximate latency from a limit or home switch actuation to its becoming visible to the grbl firmware.
Test mule
I am not building a torch table but I need a breadboard "mule" to test software functionality. I purchased four of these 34-frame steppers for $10 each.
These are split-winding (8 wire) motors so each phase can be driven either series or parallel. Each individual coil seems to be rated 3V, 1.7amp.
Got my "test mule" put together. Checking out homing functions. ChuckH 04:47, 14 October 2012 (CEST)