How to Install/use GRBL With Your Cnc Machine!

231,500

138

33

Introduction: How to Install/use GRBL With Your Cnc Machine!

About: I build stuff.

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:

  1. Download the latest grbl sourcecode as .zip
  2. If you dont have the arduino ide yet, download and install it
  3. Open the grbl .zip and navigate to a folder simply called "grbl"
  4. Extract the folder to a known place and open the arduino ide
  5. In the arduino ide, navigate to sketch>include library> add .ZIP library
  6. 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.

CNC Contest 2016

Participated in the
CNC Contest 2016

First Time Authors Contest 2016

Participated in the
First Time Authors Contest 2016

1 Person Made This Project!

Recommendations

  • Sewing Challenge

    Sewing Challenge
  • Robots Contest

    Robots Contest
  • Made with Math Contest

    Made with Math Contest

33 Comments

0
AmberL94
AmberL94

Question 3 months ago

I'm having trouble with the grbl firmware not uploading??? Any help

0
Devinity
Devinity

Question 12 months 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

Old original board.jpgNew board.jpg
0
tasneemgohar
tasneemgohar

Answer 11 months ago

Check voltage at uno out put pin and on sheild pin out at driver input pins with multimeter

0
alecsilke
alecsilke

Reply 6 months ago

Hi thanks for your reply I am very new to all this can you explain what you mean I don't understand.

0
GomanDK
GomanDK

Question 7 months 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...

0
vmascarinhas
vmascarinhas

Answer 7 months 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.

0
Merlin11B
Merlin11B

1 year 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.

0
gscottconnors
gscottconnors

Question 1 year 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!

0
HasseB
HasseB

Answer 1 year ago

TB6560 is a popular option

0
adnraw
adnraw

Reply 1 year ago

does TB6560 compatible with cnc sheild?

0
ShaneA45
ShaneA45

Question 1 year ago on Introduction

laser is always on when engraving and burns every movement it takes.

0
ajeiras
ajeiras

Answer 1 year 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.

0
mohamedalazab76
mohamedalazab76

1 year 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..

0
asseryelisha06
asseryelisha06

Question 1 year 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).

0
AndreasK42
AndreasK42

Question 1 year 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?

0
Jean-Marcb10
Jean-Marcb10

1 year 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?

0
Bverysharp
Bverysharp

2 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.)

Completed machine.JPG
0
HasseB
HasseB

Reply 2 years ago

Glad to hear it!