GRBL CNC Controller Guide – Part 1: Hardware & Setup

Building a CNC controller can look complicated when the hardware, firmware, wiring and machine settings are all explained separately.

This guide brings the complete process together. We will use an UNO R3, CNC Shield V3, DRV8825 stepper drivers, GRBL and CNCjs to build a practical controller for a small DIY CNC router, engraver or similar machine.

We will explain each step and why the settings matter, so you can build and configure your own machine rather than copying somebody else's values. This is Part 1 of a two-part guide; Part 2 covers configuration and calibration.

Before you start: This controller is intended for small CNC systems. Work with power disconnected whenever you are fitting drivers, changing motor wiring or moving jumpers. Check polarity before applying power, and never connect or disconnect a stepper motor while its driver is powered.

What You Are Building

The control chain is straightforward:

Computer running CNCjs → USB → UNO R3 running GRBL → CNC Shield V3 → DRV8825 drivers → Stepper motors

The UNO handles the GRBL firmware. The CNC Shield distributes the step, direction and control signals. Each DRV8825 driver controls one stepper motor channel.

Stage What We Will Do
1. Hardware Identify the controller, motors and power supply
2. Assembly Fit the shield, jumpers and DRV8825 drivers
3. Firmware Install GRBL on the UNO
4. Control software Connect to the controller with CNCjs
5. Configuration Set steps/mm, speed, acceleration and direction
6. Upgrades Add limits, homing, an emergency-stop system and Z-probe

1. Hardware You Need

The CNC Online Basic CNC Controller Hardware Kit contains the core controller hardware:

  • 4 × DRV8825 stepper motor drivers with heatsinks
  • 1 × CNC Shield V3
  • 1 × UNO R3 compatible controller
  • 1 × USB cable

UNO R3, CNC Shield V3 and DRV8825 stepper drivers used for a GRBL CNC controller

The kit is suited to compact CNC builds using smaller stepper motors. CNC Online's DRV8825 drivers are adjustable-current drivers and support microstepping up to 1/32. They are rated up to 2.2A output with appropriate heatsinking and airflow, but the driver current still needs to be set to suit the actual motor.

Example Stepper Motor

A typical NEMA 17 motor uses a 1.8° step angle, which means:

360° ÷ 1.8° = 200 full steps per revolution

NEMA 17 stepper motor for a small CNC machine

As a current example, CNC Online's NEMA 17 stepper motor is rated at 0.69Nm, 1.7A and uses a 1.8° step angle (200 full steps per revolution). Product availability can change. Always check the motor's rated current, not only its NEMA frame size or torque figure, before setting the driver.

Power Supply

The CNC Shield accepts a separate DC motor supply. For a small build, a supply such as CNC Online's 50W power supply may be suitable depending on the number of motors, voltage selected and required current.

Do not size the supply from this article alone. Add up the requirements of the complete machine and remain within the ratings of the shield, drivers and motors.

2. Assemble the UNO, CNC Shield and Drivers

Fit the CNC Shield to the UNO

Start with all power disconnected. Align the CNC Shield carefully with the UNO headers and press it into place evenly. Do not force the boards together if the pins are misaligned.

CNC Shield V3 fitted to an UNO R3 controller

Choose the Microstepping Setting

Each axis has jumper positions below the DRV8825 driver. These set the microstepping mode.

DRV8825 microstepping selection table

Microstepping jumper positions on CNC Shield V3

Higher microstepping gives the controller more commanded positions per motor revolution and usually makes motion smoother. It does not automatically make the complete CNC machine equally more accurate. Backlash, frame rigidity, screw or belt quality, motor current, lost steps and calibration still affect real-world accuracy.

GRBL's own configuration guidance recommends using a microstep value that gives the resolution and running behaviour the machine needs rather than simply assuming the maximum setting is always best.

Write your microstepping setting down. You will need it later when calculating the X, Y and Z steps/mm values.

Install the DRV8825 Drivers in the Correct Orientation

Fit the heatsinks to the DRV8825 drivers, then check the orientation before inserting them into the shield.

Correct DRV8825 orientation on CNC Shield V3 showing enable pin alignment

Do not install a DRV8825 backwards. Compare the board labels and the shield markings before powering the controller. Incorrect orientation can damage the driver.

Set the Driver Current Limit

This is one of the most important steps that the older tutorial did not explain clearly enough.

The potentiometer on each DRV8825 sets its current limit. The correct setting depends on the motor's rated current and the exact DRV8825 board design. Do not simply turn the potentiometer until the motor "feels strong".

Use a multimeter and the correct VREF/current-limit procedure for your specific driver board; the formula depends on the current-sense resistors fitted to that board. Set the current limit to suit the motor and the driver's cooling capability, then check for overheating or missed steps during testing. For example, the 1.7A-rated NEMA 17 motor discussed above may need additional driver cooling if operated near its rated current; the usual DRV8825 carrier should not be assumed to deliver that current continuously without airflow.

Using the Fourth Driver for a Dual-Motor Axis

The shield has X, Y, Z and A driver positions. On a machine with two motors on one gantry axis, the A channel can be configured to duplicate another axis using the shield's clone/axis-selection jumpers.

CNC Shield jumper configuration for duplicating an axis on the fourth driver

This makes the fourth driver receive the same step and direction commands as the selected axis. It is useful for a mechanically linked dual-motor gantry, but it is not the same as independent auto-squaring with two separately homed motors.

Connect the Stepper Motors

A bipolar stepper motor contains two coil pairs. Those two pairs must be connected correctly to the driver's motor output.

NEMA 17 stepper motor connector on CNC Shield

Do not assume every stepper motor uses the same wire colours. Confirm the two coil pairs from the motor documentation or by testing continuity.

If an axis moves in the wrong direction, it is normally cleaner to correct the direction using GRBL's $3 direction-invert setting. If you intentionally reverse motor wiring, reverse one complete coil pair in a controlled way rather than randomly rearranging wires.

Connect the Motor Power Supply

The motor supply connects to the blue power terminal on the CNC Shield. Confirm positive and negative polarity before applying power.

DC power input terminal on CNC Shield V3

For this setup, the UNO can be powered from the computer through USB while the shield receives the separate motor supply.

Important: Never plug or unplug a stepper motor while the DRV8825 is powered. Inductive voltage spikes can damage a stepper driver.

3. Install GRBL on the UNO

GRBL is the firmware that turns the UNO into a CNC motion controller. It receives G-code and converts it into accurately timed step and direction signals for the motor drivers.

At the time of this update, the official Gnea GRBL release remains GRBL 1.1h.

You will need:

About the screenshots below: These are the original CNC Online screenshots from Arduino IDE 1.8.x, and we have kept them as useful visual references. Current Arduino IDE 2.x looks different, so menu positions may not be identical.

Legacy Arduino IDE window used for loading GRBL onto an UNO

Select the UNO and Serial Port

Connect the UNO to the computer by USB. In Arduino IDE, select the UNO-compatible board and the COM/serial port assigned to it.

Selecting Arduino UNO and serial port in legacy Arduino IDE

Add GRBL to Arduino IDE

Download the GRBL 1.1h source-code ZIP and extract it. Open the extracted folder and find the inner grbl folder containing files such as grbl.h and the examples folder.

  1. For Arduino IDE 2.x: open the IDE settings/preferences to find your sketchbook location. Copy the inner grbl folder into the sketchbook's libraries folder, so the structure is libraries/grbl/grbl.h. Restart Arduino IDE.
  2. For legacy Arduino IDE 1.x: the Sketch → Include Library → Add .ZIP Library menu can also select the extracted inner grbl folder, as illustrated in the original screenshots below.
  3. Check that grbl appears under File → Examples before opening grblUpload.

Common installation mistake: the entire downloaded GitHub source-code ZIP is not a directly importable Arduino IDE 2.x library, because the actual library is nested inside it.

Downloading the GRBL firmware source Adding GRBL library to Arduino IDE

GRBL library visible in Arduino IDE contributed libraries

Upload GRBL

Open the GRBL upload example. In the legacy interface this was found under:

File → Examples → grbl → grblUpload

Opening the grblUpload example in Arduino IDE

With the UNO and correct serial port selected, upload the sketch.

Uploading GRBL firmware to an UNO from Arduino IDE GRBL upload completed in Arduino IDE

Once the upload completes successfully, disconnect Arduino IDE from the serial port before opening CNCjs so that both programs are not trying to use the same port at the same time.

4. Connect to GRBL with CNCjs

CNCjs is the computer-side control interface. It allows you to connect to GRBL, jog the machine, view machine position, send commands, load G-code and run jobs.

Download a current build from the official CNCjs releases page. The original guide used CNCjs 1.9.x; current releases are newer, so the interface may differ slightly from the retained screenshots.

Open the Serial Connection

In CNCjs:

  1. Select Grbl as the controller type.
  2. Select the UNO's serial/COM port.
  3. Set the baud rate to 115200.
  4. Open the connection.

Connecting CNCjs to GRBL at 115200 baud

If the connection is successful, GRBL should identify itself in the console. Enter:

$$

GRBL will return the stored machine settings.

GRBL settings displayed in the CNCjs console

Good practice: Copy and save the complete $$ output before changing anything. That gives you a record of the starting configuration.

5. First Motion Test

Before tuning the machine, test one axis at a time.

  1. Make sure the machine has room to move in both directions.
  2. Keep the spindle or cutting tool safely clear of the work surface.
  3. Jog X by a very small distance.
  4. Repeat for Y and Z.
  5. Listen for smooth motion and check that no axis binds.

If a motor only vibrates or buzzes without rotating, stop and check the motor coil pairing, connector, driver current and driver installation.

If the axis moves smoothly but in the wrong direction, change the GRBL direction mask rather than immediately rewiring the motor.

Next: Configure and Calibrate GRBL

Once the controller is assembled, GRBL is installed and all three axes can jog correctly, the next step is to configure the machine itself.

Continue with Part 2: GRBL Configuration, Calibration, Homing & Z-Probe. In Part 2 we calculate and calibrate steps/mm, tune maximum speed and acceleration, configure limit switches and homing, add a Z-probe and work through the most common setup problems.

Need Help With Your CNC Controller?

Every CNC setup is different.

If you are unsure which controller components, stepper motors, drivers or power supply are suitable for your machine, tell us about your CNC build, the motors you are using and the type of motion system installed.

CNC Online South Africa can help you choose the controller hardware and supporting components that best suit your CNC setup.

Email: sales@cnconline.co.za
WhatsApp: 073 352 8930