Products

News

Contact Us

Phone

Current Position > Products

Product Name: Engraving machine / 3D Printer / stepper motor / expansion board / V2 for arduino

buy a viagra online viagra for sale uk where to buy viagra

Shipping list: 3D CNC V2       X1

I. Introduction

The expansion board can be used as engraving machines, 3D printers driven expansion board, a total of four slots stepper motor drive module (note that this board does not contain A4988 stepper motor driver module, you need to purchase another in the shop) , can not enter the motor-driven four, and each stepper motor road only need two IO ports, ie, 6 IO ports can be well managed three stepper motors, very convenient to use, say goodbye conventional stepper motor cumbersome operation.

2, UNO module describes the correspondence between the IO port for Arduino

The basic needs of the stepper motor control pin, the other pin is when the engraving machine, or 3D printer was used, where we do not make Detailed, IO corresponding figure above.
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 stepper control)
3 --------- Y.STEP (Y-axis stepper control)
2 --------- X.STEP (X-axis stepper control)
/ / The following is a simple stepper motor control procedures,
# 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 stepper control
# Define Y_STP 3 / / y-axis stepper control
# Define Z_STP 4 / / z-axis stepper control
/ *
/ / Function: step function: to control the direction of the stepper motor, the number of steps.
/ / Parameters: dir direction control, dirPin corresponding stepper motor DIR pin, stepperPin stepper motor step corresponds to the pin, stepping a few steps 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 () {/ / The stepper motor used in IO pin is set 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 reversing a circle, around 200 steps to
 step (false, Y_DIR, Y_STP, 200); / / y-axis motor reverse a circle, around 200 steps to
 step (false, Z_DIR, Z_STP, 200); / / z-axis motor reverse a circle, around 200 steps to
 delay (1000);
 step (true, X_DIR, X_STP, 200); / / X-axis motor forward a circle, a circle 200 steps to
 step (true, Y_DIR, Y_STP, 200); / / y-axis motor forward a circle, a circle 200 steps to
 step (true, Z_DIR, Z_STP, 200); / / z-axis motor forward a circle, a circle 200 steps to
 delay (1000);
}
Experimental phenomena: stepper motor reversal circle, pause one second, then True Story of a circle, and so on.
It is worth noting: In the patch A4988 careful not to insert the module when the anti-stepper motor wiring is:
2A, 2B is a group (red, green), 1A, 1B is a group (blue and yellow) to change the position, change the position of one group can be, for example 2A exchange and 2B.