Skip to content
MCU Atlas

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.

Difficulty:IntermediateCost:Source available

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

Creator: grbl (@grbl)
Source: GitHub
License: unknown (custom/multiple – see repo)
Last verified: 10/16/2026
grbl: high-performance CNC motion control on Arduino Uno

Illustration

How to Build It
Grbl is the classic open-source CNC motion controller for the Arduino Uno's ATmega328P. It reads G-code over serial and drives three stepper axes with smooth acceleration, plus spindle and coolant control and homing and limit switches. It powers many hobby CNC routers and laser engravers.

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. 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. 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. 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. 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. 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. 6

    Tips

    Test each axis with small jogs before your first cut. $RST lets you restore the default EEPROM settings.

Parts List (BOM)
Parts list inferred by MCU Atlas — check the original
inferred
PartQtyRoleEst. PriceBuy
1main board$5–$28View
1shield$3–$8View
3drivers$2–$4View
3motors$8–$15View
Estimated Total$38–$93 USD

Not included: 3D-printed case, wire, solder, USB cable

Download CSV

Related Projects

SparkFun OpenLog: Arduino-compatible data logger
Illustration
ARDUINOATMEGA328P
A tiny ATmega328-based logger that writes serial data to a microSD card with almost no host code.
Beginner·Cost varies·Code
2 parts listed
SimpleFOC Arduino balancer: BLDC two-wheel balancing robot
Illustration
ARDUINOUNO
A modular two-wheel balancing robot using gimbal BLDC motors and the SimpleFOC library on Arduino-class boards.
Advanced·Cost varies·Code
5 parts listed
Arduino Uno e-ink home weather station
Illustration
ARDUINOUNO
A simple Arduino Uno weather station with a Waveshare 4.3in e-ink display, BME280 and DS3231 clock.
Beginner·Cost varies·Code
4 parts listed