Kunkune
Engraving 3D Printer CNC V3 Shield Expansion Board A4988 Driver for Arduino -UK

Product introduction
The extension board can be used for carving machine, 3 d printer driver expansion board, a total of 4 way of stepping motor driver module slot, (note that this board does not contain A4988 stepper motor driver module, need to order) separately in our shop, can not into the motor drive 4 road, and every step motor all the way only need two IO mouth, that is to say, 6 IO mouth can be very good management three stepper motor, use rise very convenient, bid farewell to the traditional stepper motor operation trival.
  
The corresponding relationship between UNO and module IO port is introduced
  
The basic control of stepper motor requires pins, other pins are only used in engraving machine or 3D printer, we will not explain here in detail, IO corresponds to the figure above.
Arduino UNO-- Extension board
-- EN (Stepper motor drive enabling end, low level effective)
-- Z.Dir (z-axis direction control)
6 -- Y.Ir (Y-axis direction control)
-- X.Dir (X-axis direction control)
-- Z.STEP(Step control of Z-axis)
3 -- Y.TEp (Step control of Y-axis)
-- X.STEP(Step control of X-axis)
// The following is a simple stepper motor control program.
Step motor enablement, low level valid
#define X_DIR 5 // X-axis stepper motor direction control
#define Y_DIR 6 // Y axis stepper motor direction control
7 // Z axis stepper motor direction control
#define X_STP 2 // X-axis step control
#define Y_STP 3 // Y step control
#define Z_STP 4 // Z axis step control
/ *
// Function: Step Function: Control the direction of stepping motor and the number of steps.
// Parameters: DIR direction control, dirPin corresponds to the DIR pin of stepping motor, stepperPin corresponds to the step pin of stepping motor, and the number of steps of steps
// No return 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);
}
}
Void setup(){// set IO pin used by stepper motor to 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 reverse 1 turn, 200 steps for one turn
step(false, Y_DIR, Y_STP, 200); // Y axis motor reverse 1 turn, 200 steps for one turn
step(false, Z_DIR, Z_STP, 200); // The z-axis motor reverses for 1 turn, 200 steps for 1 turn
delay(1000);
step(true, X_DIR, X_STP, 200); // The X-axis motor turns forward for 1 turn, and 200 steps for 1 turn
step(true, Y_DIR, Y_STP, 200); // Y axis motor is turning for 1 turn, 200 steps for 1 turn
step(true, Z_DIR, Z_STP, 200); // The z-axis motor turns forward for 1 turn, and 200 steps for 1 turn
delay(1000);
}
 
Experimental phenomenon: the stepper motor reverses for one turn, stops for 1 second, then passes forward for one turn, and so on.
It is worth noting that when connecting A4988 module, do not plug backward. The wiring mode of stepper motor is as follows:
2A, 2B are groups (red, green), and 1A,1B are groups (blue, yellow). If you want to change direction, change the position of one of the groups. For example, 2A, switch with 2B.


Dispatched with Royal Mail 24H Service
Check Out My Other Items. Click Here!




© Copyright 2022 Kunkune | All rights reserved
eBay design: MH design Lab