T219-L2D11
Baru
WARNA ELCO MUNGKIN AKAN BERBEDA/TERGANTUNG STOK
24 Barang item
Pemberitahuan: Barang terakhir di stok!
Tanggal ketersediaan:
Jumlah | Harga | Anda menghemat |
---|---|---|
10 | Rp. 21.000 | Sampai dengan Rp. 10.000 |
The expansion board can be used as engraving machines, 3Dprinters driven expansion board, a total of 4 slots channel stepper motor driver module ( note that this board does not include A4988stepper motor driver module ) can drive 4 -way not stepping motor, stepper motor and each way takes only 2 Ge IO ports, ie . 6 Ge IO ports can be well managed 3stepper motors, very convenient to use, farewell conventional stepping motor cumbersome operation.
the UNO and the module IO port correspondence between presentation
Basic stepper motor control needs of other pins in the engraving machine, or 3D when the printer was used, here we do not explain, the IO corresponding to the above.
Expansion board Arduino UNO ----------------------
8 ------------------------ EN (stepper motor driver enable, active low)
7 ----------------------- Z.DIR (the Z-axis direction control)
6 ----------------------- Y.DIR (the 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)
// Here is a simple stepper motor control procedures,
#define EN 8 // stepper motor enable, active low
#define X_DIR 5 // X-axis stepper motor control direction
#define Y_DIR 6 // y-axis stepper motor control direction
#define Z_DIR 7 // z-axis stepper motor control direction
#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 stepping motor, the number of steps.
// Parameters: dir direction control, dirPin the corresponding stepper motor DIR pins, stepperPin stepper motor step corresponding to the pin, the number of steps of the stepper 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 stepping motor used in IO pin as an 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 reversal circle 1, 200 steps to circle
step (false, Y_DIR, Y_STP, 200); // y-axis motor reversal circle 1, 200 steps to circle
step (false, Z_DIR, Z_STP, 200); // z-axis motor reversal circle 1, 200 steps to circle
delay (1000);
step (true, X_DIR, X_STP, 200); // X-axis motor is rotated one revolution around 200 steps to
step (true, Y_DIR, Y_STP, 200); // y-axis motor is rotated one revolution around 200 steps to
step (true, Z_DIR, Z_STP, 200); // z-axis motor is rotated one revolution around 200 steps to
delay (1000);
}
Note: When inserting the A4988 module, must be careful not to insert opposite. Stepper motor wiring as follows:
2A, 2B is a group (red, green), 1A, 1B is a group (blue, yellow), if want to change direction, can be change the position of one group , for example 2A, 2B mutually exchanged