Fast & free stop-desk delivery from 4000 DA | Flexible payment | Technical support for your builds

BBJA212580-03

CNC Shield V3 for Arduino UNO - CNC Shield V3+A4988

DZD 3,000.00
Out of stock
Ships to all wilayas, cash on delivery available, real-time tracking included. Verified reference, live stock, and technical support at your disposal.
Share:

Technical summary

Features:
This expansion board, as a driver expansion board, can be used for engraving machines and 3D printers.
There are four slots in total, which can drive four stepper motors (a4988 for example). Each stepper motor channel needs only two IO ports. In other words, six IO ports can perfectly manage three stepper motors. Very practical to use.
IO port mapping setup for the UNO Arduino module.
Corresponding IO pins: (for reference only)

uno for Arduino ---------------------- expansion board
8 ------------------------ en (stepper motor 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)

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. Function: to control the stepper motor direction and the number of steps.
// parameters: dir direction control, dirpin the stepper motor's corresponding dir pin, stepperpin the stepper motor's corresponding "step" pin, steps the number 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 digitalWrite (stepperpin, high);
delaymicroseconds (800);
digitalWrite (stepperpin, low);
delaymicroseconds (800);
}
}
void setup () { // the io of the axis used by the stepper motor 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 reverse 1 turn, 200 steps is one full circle.
step (false, y_dir, y_stp, 200); // Y axis motor reverse 1 turn, 200 steps is one full circle.
step (false, z_dir, z_stp, 200); // Z axis motor reverse 1 turn, 200 steps is one full circle.
delay (1000);
step (true, x_dir, x_stp, 200); // X axis motor forward 1 turn, 200 steps is one full circle.
step (true, y_dir, y_stp, 200); // Y axis motor forward 1 turn, 200 steps is one full circle.
step (true, z_dir, z_stp, 200); // Z axis motor forward 1 turn, 200 steps is one full circle.
delay (1000);
}

Caution: when inserting the a4988 module, be careful not to insert it the wrong way round. Stepper motor wiring is as follows:
2a, 2b are one group (red, green), 1a, 1b are one group (blue, yellow); if you want to change direction, you can swap the position of one group, for example 2A and 2B exchanged with each other.

Recently viewed

Related products

RAMPS 1.4 CNC Shield for Arduino Mega
DZD 2,250.00
7 left