Introduction: How to Install/use GRBL With Your Cnc Machine!
This instructables will teach you how to install and adapt grbl to your cnc mill/laser cutter.
So first thing first, What is GRBL?
GRBL is a firmware for arduino boards(uno,nano,Duemillanove) that controls stepper motors and spindles/lasers. GRBL uses gcode as input and outputs signals via the arduino pins.
Most industrial cnc machines uses parallel port controller that requires Those big purple connectors. Because GRBL arduino boards you just hook it up to a free usb port.
If you already have your hardware you can skip directly to step 3!
Step 1: Hardware
Grbl is compatible with all atmega 328 based arduino boards, meaning that you could use a uno or a nano but not the mega as its atmega 2560 based. The arduino mega is used in alot of 3d printer because of its more powerful processor but because of the relatively easy tasks of a cnc mill the arduino uno is enough.
To drive stepper motors you need some sort of driver. Some popular choices are a4988 and drv8825 for small motors like nema 14 or 17, but should not be used with more powerful motors like nema23 and higher. Its a good idea to stay clear of the easy drivers.
To connect your motor drivers and arduino you can use a pre-made board like the popular arduino uno cnc shield or build your own. Building your own is pretty easy but can take alot of time. There are also arduino nano based boards made specially for laser cutting.
To summarize:
you will need these parts for a typical cnc machine:
1x arduino board
3x stepper drivers(x,y,z)
1x cnc shield
Step 2: Installation
To Install grbl you need two things:
- Arduino IDE (download as .zip if you are on a school computer)
- latest grbl release
- Download the latest grbl sourcecode as .zip
- If you dont have the arduino ide yet, download and install it
- Open the grbl .zip and navigate to a folder simply called "grbl"
- Extract the folder to a known place and open the arduino ide
- In the arduino ide, navigate to sketch>include library> add .ZIP library
- Navigate to the grbl folder and click ok.
Grbl is now installed as a arduino library. Navigate to file>example>grbl>grblupload.
A new sketch will open with instructions on how to flash grbl to your board.
Step 3: Setup/Adjustments
Now with firmware on your board you need to adapt grbl to your specific machine. To communicate with your board you need to open the arduino ide serial monitor. You should see a message like this "Grbl x.xj ['$' for help]" if you dont see the message, make sure that your are connected to the correct port and use the baudrate of 115200.
Type "$$" and a list of commands should appear, like this:
$100=250.000 (x, step/mm)
$101=250.000 (y, step/mm)
$102=3200.000 (z, step/mm)
$110=500.000 (x max rate, mm/min)
$111=500.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec^2)
$122=10.000 (z accel, mm/sec^2)
$130=200.000 (x max travel, mm)
$131=200.000 (y max travel, mm)
$132=200.000 (z max travel, mm)
The most important part to change is the steps/mm. Steps/mm needs to be calculated and the easiest way of doing it is by using prusas reprap calulator.
To change a setting, type the identifier of the parameter (for example $100 for x steps) "=" and then the new value.
For example: typing $112=600 changes the z max rate to 600.
Make sure that your setting has been saved by typing $$ and checking the values.
Some settings (like corexy setup,variable spindle) needs to be changed trough the config.h. You find the config file in the arduino library folder for grbl. The file has instructions and should be pretty straight forward to edit. When you have edited the config file you need to reupload the sketch to your board.
Hopefully This instructables was helpful and your cnc machine is up and running!
If something is wrong/missing feel free to point it out in the comments.

Participated in the
CNC Contest 2016

Participated in the
First Time Authors Contest 2016
34 Comments
Question 7 months ago
I keep getting error message when adding the GRBL zip files to Arduino - something like library not valid. Can anyone help?
Question 1 year ago
I'm having trouble with the grbl firmware not uploading??? Any help
Question 2 years ago on Step 1
I have Purchased a 3018Pro from Bangood, it worked ok for a while then it stopped responding
on all the Axes, I could only switch on the Spindle. Thinking this was perhaps a fault on the motherboard I ordered a replacement. While waiting for the replacement board the machine started to respond again after installing all the software onto a New/old desktop PC.
Then two days ago it stopped responding again as before with only the spindle powering up.
The new motherboard arrived today so I installed that. No response at all, the originall board still gave me spindle control. I have reinstalled the drivers and all the other software etc that is supplied through the links on banggood site (Several times) with no success.
What am I doing wrong? I can't believe all the Stepper motors have gone wrong at the same time. I don't Know what an ardwino ?? is other than it is some sort of mother board. I enclose photo of the old and new boards. I hope someone Can help me please.
Thank you Dev
Answer 2 years ago
Check voltage at uno out put pin and on sheild pin out at driver input pins with multimeter
Reply 2 years ago
Hi thanks for your reply I am very new to all this can you explain what you mean I don't understand.
Question 2 years ago on Step 3
Hi there.
I've just bought and build my CNC milling machine.
It's the cheapest availble from E-bay, and the mainboard is named "Woodpecker CNC Camxtool v. 3.4", and it came with drivers and software to windows only.
I've been searching high snd low, in order to find a usefull CNC-program to act between my mill and my linux-computer, but all I could find either didn't work or required a com port as interface.
I've followed the instructions here on this thread, but when I try to find the controller-board in the Arduino IDE - program, I just can't find anything usable.
Hitting the "Board Info" option leaves me with
BN: unknown
VID: 1A86
PID 7523
SN: Upload any sketch to obtain it.
Is there anyone "out there" that can help me here?
What kind of board should I choose?
Or maybe even better:
Is there a stand-alone program, like LinuxCNC that supports my
machine, using USB interface and NOT Com-ports (there's no com ports on my motherboard...)? -I do NOT want to change my operating system to LinuxCNC, if I can avoid that in any way.
Operating system is Manjaro (latest version, as it's a rolling release)
I really hope there's a linux-"guru" somewhere that can guide me through this process, as I'm a totally newbee to linux, but I would really HATE to be forced back to Windows again...
Plz...
Answer 2 years ago
Hello there
I have the same machine. To upload from arduino IDE, you have to reduce the baud rate to 56k.
There are many Gcode senders for Linux. Try bCNC. Its kind of user friendly.
I am not a linux Guru :). But a friend helped me to setup the software on a raspberry pi.
Also note that if you are planning to install limit switches for homing function, please be careful as the board that i got has a wrong legend for X and Z axis.
I could identify it only through Universal Gcode platform and then i corrected it.
Goodluck.
2 years ago
I hope someone here has an answer, nowhere I’ve been as of yet has so here goes.
I purchased, stupidly, a CNC from Ebay, that runs on an Aruindo Uno, and CNC Shield, and DeWalt 611 router, X&Y axis seem to cut fine. However, the Z axis, no matter the cut depth I select, where I designate as Zhome, refuses to cut beyond 1/8 of an inch. It was purchased from an individual builder, not a company, so there’s no support or warranty, like I said stupidly. So any assistance would be greatly appreciated.
Question 3 years ago on Introduction
"Some popular choices are a4988 and drv8825 for small motors like nema 14 or 17, but should not be used with more powerful motors like nema23"
Soooo, what do I use for NEMA 23 motors? Thanks!
Answer 3 years ago
TB6560 is a popular option
Reply 2 years ago
does TB6560 compatible with cnc sheild?
Question 3 years ago on Introduction
laser is always on when engraving and burns every movement it takes.
Answer 3 years ago
Hi, I have the same problem in one PCB from cronos maker. But in the original PCB in 3018, I dont that problem, and the firmware is the same.
3 years ago
We try to make a wire bending machie, but we need to connect it with grbl to make any shape, how we can make its software(code), can you help us? , please..
Question 3 years ago on Step 3
Hi there. I'm Elisha Mbise From United republic of Tanzania. I'm about to build my punching CNC;I will need only X-Y motions to make any pattern I want. The punching stroke will be stationary as usual.
Would grbl be compatible? ( I wanna use Arduino and it's shield and drivers).
Question 3 years ago on Step 3
Ok. What's the next steps to print something?
Maybe I have a drawing in Inkscape. How do I tell it my Arduino?
Answer 3 years ago
Not sure what you are building but this should be applicable for most 2D CNC machines:
https://edutechwiki.unige.ch/en/Using_Inkscape_for_laser_cutting
3 years ago
Great tutorial,
Do you know if I can write a python script that would prompt the grbl controller for it's current position, then write this to a file?
Reply 3 years ago
Found this with a quick google search: https://github.com/bborncr/gcodesender.py.
Find the appropriate gcode, send it to your machine and dump the response you get to a file.
4 years ago
As usual, instructables to the rescue. After bashing my head against the internet wall for an hour, I found this instructable, and Hey, Presto, I was able to load Grbl with absolutely no problem. Thanks heaps!
(Here is a photo of the one I built.)