CNC Shield V3 Expansion Board for Engraving Machines and 3D Printers - Compatible with A4988 Driver Modules Module:
|
|
Product Introduction:
This expansion board can be used as a driver expansion board for engraving machines, 3D printers, and more. It features 4 slots for stepper motor driver modules (please note that the A4988 stepper motor driver modules are not included and can be purchased separately from our store). It can drive 4 stepper motors, with each motor requiring only 2 IO ports. This means that 6 IO ports can efficiently manage 3 stepper motors, making it extremely user-friendly and eliminating the complexity of traditional stepper motor operations.
II. Introduction to the IO Port Mapping Between UNO and the Module
The basic control of the stepper motor requires specific pins, while other pins are used for engraving machines or 3D printers. We will not go into detail about these here. The IO mapping is as shown in the figure above.
Arduino UNO ---------------------- 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 step control) 3 ---------------------- Y.STEP (Y-axis step control) 2 ---------------------- X.STEP (X-axis step control)
Simple Stepper Motor Control Program:
#define EN 8 // Stepper motor enable, active low
#define X_DIR 5 // X-axis stepper motor direction control
#define Y_DIR 6 // Y-axis stepper motor direction control
#define Z_DIR 7 // Z-axis stepper motor direction control
#define X_STP 2 // X-axis step control
#define Y_STP 3 // Y-axis step control
#define Z_STP 4 // Z-axis step control
/*
Function: step
Purpose: Controls the direction and steps of the stepper motor.
Parameters:
dir - Direction control,
dirPin - DIR pin of the stepper motor,
stepperPin - STEP pin of the stepper motor,
steps - Number of steps
Returns: None
*/
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); } } void setup() { // Set the IO pins used by the stepper motor as output pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT); pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT); pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT); pinMode(EN, OUTPUT); digitalWrite(EN, LOW); } void loop() { step(false, X_DIR, X_STP, 200); // X-axis motor reverses 1 rotation (200 steps per rotation) step(false, Y_DIR, Y_STP, 200); // Y-axis motor reverses 1 rotation step(false, Z_DIR, Z_STP, 200); // Z-axis motor reverses 1 rotation delay(1000); step(true, X_DIR, X_STP, 200); // X-axis motor rotates forward 1 rotation step(true, Y_DIR, Y_STP, 200); // Y-axis motor rotates forward 1 rotation step(true, Z_DIR, Z_STP, 200); // Z-axis motor rotates forward 1 rotation delay(1000); }
Experimental Phenomenon:
The stepper motor reverses one rotation, pauses for 1 second, then rotates forward one rotation, repeating this cycle. ---------------------------------------------------------------------------------------------------------------------------------- Important Notes: * When connecting the A4988 module, ensure it is not inserted incorrectly. * The stepper motor wiring is as follows: * 2A, 2B are one group (red, green). * 1A, 1B are another group (blue, yellow). * To change the direction, swap one group's position, e.g., exchange 2A and 2B. |
CONDITION | BRAND NEW |
WARRANTY | 180 DAYS |



