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.
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
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
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.
Choose the Microstepping Setting
Each axis has jumper positions below the DRV8825 driver. These set the microstepping mode.
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.
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.
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.
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.
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.
For this setup, the UNO can be powered from the computer through USB while the shield receives the separate motor supply.
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:
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.
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.
-
For Arduino IDE 2.x: open the IDE settings/preferences to find your sketchbook location. Copy the inner
grblfolder into the sketchbook'slibrariesfolder, so the structure islibraries/grbl/grbl.h. Restart Arduino IDE. -
For legacy Arduino IDE 1.x: the Sketch → Include Library → Add .ZIP Library menu can also select the extracted inner
grblfolder, as illustrated in the original screenshots below. - Check that
grblappears under File → Examples before openinggrblUpload.
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.
Upload GRBL
Open the GRBL upload example. In the legacy interface this was found under:
File → Examples → grbl → grblUpload
With the UNO and correct serial port selected, upload the sketch.
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:
- Select Grbl as the controller type.
- Select the UNO's serial/COM port.
- Set the baud rate to 115200.
- Open the connection.
If the connection is successful, GRBL should identify itself in the console. Enter:
$$
GRBL will return the stored machine settings.
$$ 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.
- Make sure the machine has room to move in both directions.
- Keep the spindle or cutting tool safely clear of the work surface.
- Jog X by a very small distance.
- Repeat for Y and Z.
- 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