grbl: high-performance CNC motion control on Arduino Uno
The classic open-source g-code interpreter that turns an Arduino Uno into a 3-axis CNC controller.

Key Facts
- Board: Arduino Uno (ATmega328P)
- Axes: 3 (+ spindle)
- Input: g-code over serial
- Companion: CNC Shield V3 + DRV8825/A4988
About This Project
grbl is the firmware that made DIY CNC mills, laser cutters and pen plotters practical. Running on an Arduino Uno (or compatible) plus a CNC shield and stepper drivers, it accepts g-code over serial and generates precise step pulses. Although development has moved to grblHAL for 32-bit boards, the original Uno port remains the most common starting point for hobby CNC.
Source & Attribution
Parts Needed
- Arduino Uno (ATmega328P)
- CNC Shield V3
- 3x DRV8825 or A4988 stepper drivers
- NEMA 17 stepper motors
- 12-24V power supply for the motors
- Limit switches (optional)
- PC with a G-code sender (e.g. Universal G-code Sender, CNCjs, Candle)
Steps
- 1
Use the current version
The README notes that development has moved to the newer gnea/grbl repository (v1.1). Use that version unless you specifically need this one.
- 2
Flash Grbl
Copy the grbl folder into your Arduino libraries folder, then open the grblUpload example in the Arduino IDE and upload it to the Uno.
- 3
Assemble the shield
Fit the CNC Shield onto the Uno, insert the drivers the right way round, and set each driver's current limit. Connect the motors and the motor power supply.
- 4
Mind the pin change
From v0.9 the Z-limit switch is on D12 and spindle enable is on D11 (for PWM spindle speed). Old wiring guides show these swapped, and homing fails if Z-limit is on the wrong pin.
- 5
Configure
Connect at 115200 baud with a G-code sender and set $100-$102 (steps/mm), max feed rates, acceleration and homing options with $ commands.
- 6
Tips
Test each axis with small jogs before your first cut. $RST lets you restore the default EEPROM settings.
Not included: 3D-printed case, wire, solder, USB cable
Related Projects


