CNC Arduino Shield

We will be using the Protoneer CNC Shield for the exercises and projects in the course utilizing stepper motors. This board attaches to an Arduino Uno and carries three Pololu A4988 stepper motor drivers.

Arduino Installation

The CNC Shield should be installed on an Arduino Uno as shown in the following image:

../_images/CNC_shield_on_Arduino_oblique_view.jpg

CNC Shield board installed on top of an Arduino Uno.

Note that the shield board has four fewer pins than socket positions on the Arduino; be sure that A4, A5, D0, and D1 are connected and the board outlines line up.

Jumpers

The default jumper configuration for the CNC shield includes all three jumpers installed underneath each driver module. This pulls MS1, MS2, and MS3 all high for full 1/16-step microstepping resolution. This trades off top speed for positional accuracy. If the application requires higher speed, jumpers may be removed; see the Pololu A4988 product page for details.

Driver Installation

The drivers should be installed in the locations and orientations as shown in the following image:

../_images/CNC_shield_top_view.jpg

Top view of CNC Shield showing USB cable, power leads, A4988 drivers, and motor leads.

Please carefully note the polarity of the motor supply wiring at the lower left of the image; these should be connected to a 12V power supply. Please be extra careful not to attach a 12V supply to the 5V Mini Maestro which we also use.

The colored wires to the right are the stepper motor leads for the KL17H248-15-4A. Either connector orientation works, although this particular orientation is recommended for consistency, with blue toward the top.

Note that each driver has a potentiometer adjustment for the current limit; this must be set as described below.

Current Limiting

The A4988 actively limits the current flowing through each stepper motor coil according to the setting of the current limit potentiometer and the active microstepping phase. This allows a supply voltage substantially higher than the rated motor voltage, increasing step rate performance.

The current limit must be set correctly for the particular motor installed on the driver. It is most easily configured by measuring the voltage on the wiper of each reference potentiometer while using a tiny screwdriver to adjust it. The wiper pin is in the center of the edge located toward the inside of the board. The 5V logic power must applied to the CNC shield, normally by making sure the Arduino is powered via USB. The correct reference voltage is as follows:

VREF = I_max / 2.5

For example, the preferred KL17H248-15-4A NEMA17 stepper motor has a rated current of 1.5 A, so the correct VREF = 1.5A / 2.5 = 0.6V.

NEMA17 Stepper Motor

We are using the KL17H248-15-4A NEMA17 stepper motor with the CNC Shield. This is a bipolar 200 counts/rev 1.5A/phase stepper motor in a square NEMA17 package. The shaft is 5 mm diameter with a flat, the mounting screws are M3 located on a 31 mm square.

Drawing: cnc-images/KL17H248-15-4A.pdf

Arduino Pin Assignments

../_images/Arduino-CNC-Shield-Grbl-Pin-Layout.png

Top view of Arduino with pin definitions labeled.

CNC Shield Circuit Diagram

../_images/Arduino-CNC-Shield-Schematics-V3.XX_.jpg

Electronic schematic of CNC Shield board.

CNC Shield Component Layout

../_images/Arduino-CNC-Shield-V3-Layout.jpg

Top silkscreen of CNC Shield board.