Product Details:
This product is an expansion board which can be employed as a driver expansion board for engraving machines and 3D printers. It features four slots, facilitating the control of four separate A4988 stepper motors. Importantly, each stepper motor only requires two IO ports for control. As a result, an efficient management of three stepper motors can be achieved using only six IO ports.
Please note that the A4988 and UNO R3 modules do not come included with this version of the expansion board.
The package includes a single 3D Printer Expansion Board.
The following IO pins correspond to the UNO for the module on the expansion board:
8 – EN (stepper motor driver enable, active low)
7 – Z.DIR (Z-axis direction control)
6 – Y.DIR (Y-axis direction control)
5 – X.DIR (X-axis direction control)
4 – Z.STEP (Z-axis stepper control)
3 – Y.STEP (Y-axis stepper control)
2 – X.STEP (X-axis stepper control)
Below is a simple stepper motor control procedure in code format. The code demonstrates how to define and control the direction of the stepper motor, with the number of steps. The function parameters include dir direction control and the corresponding stepper motor DIR pin and “step” pin. This function does not return a value.
void step (boolean dir, byte dirPin, byte stepperPin, int steps) { digitalWrite (dirPin, dir); delay(50); for(int i = 0; i < steps; i++) { digitalWrite (stepperPin, HIGH); delayMicroseconds (800); digitalWrite (stepperPin, LOW); delayMicroseconds (800); } }
Please exercise caution when inserting the A4988 module. Stepper motor wiring is as follows: 2A, 2B make up one group (red, green), and 1A, 1B make up another group (blue, yellow). To change direction, simply exchange the positions of one group (e.g. 2A and 2B).