GRBL is a totally free, open-source software that was developed as motion control for a microcontroller board, making it possible to use an Arduino to operate computer numerical control (CNC) machines. Typically, people tend to use GRBL in combination with the Arduino Uno.

Initially released to the public in 2009, GRBL has since been adopted by several companies as their software of choice for motion control, beating out similar proprietary applications. The software was created by the Norwegian developer Simen Svale Skogsrud and is now maintained by the American developer Sungeun K. Jeon on GitHub.

Although designed for milling machines (subtractive manufacturing) with features like spindle control and coolant I/O, it can be used for a vast array of subtractive manufacturing uses. There are adaptations of GRBL that allow it to be used for a myriad of projects, ranging from laser cutting to making all sorts of home crafts. Some of these unique GRBL projects have been posted online with easy-to-follow instructions such as controlling a servo motor, building a drawing machinewood engraving, and many more!

In this article, we’ll give you an introduction to GRBL, what it’s used for,  and how you can get started using it yourself. Let’s get to it!

Back to Contents

GRBL Software: The Basics

Overview

Grbl pinout
GRBL pinout (Source: Koert van der Veer via GitHub)

The motion control firmware is a critical component of a CNC machine. It takes the commands in the file generated by CAM software and translates them into instructions for the motors as well as electrical signals, like turning on the spindle. What makes GRBL special is that you can download it for free, install it on an ATMega328-based development board, and be up and running in very little time with little cost or learning curve.

With GRBL, you also have an abundance of available support. It’s so widely utilized that someone has likely already solved any issues you may run into. You’re free to use it however you like without issue in a non-commercial setting, as the software is published under a GPLv3 license (V9 up).

GRBL has outputs to control most of the mechanical configurations you’re likely to want to build and makes good use of all the space on your Arduino Uno. Since the developers have carefully utilized the space and features available on the Uno, you get the advantage of platform-targeted optimization of GRBL and the ATMega328-series chips. This optimization means GRBL tends to run very smoothly and makes the most of the low-cost hardware.

Image of:
So many possibilities with GRBL and Arduino! (Source: Grasshopper333 via Reddit)

Once GRBL is configured on an Arduino Uno and integrated into your machine setup, G-code can be streamed to it via the Uno’s USB port.  Therefore, you’ll need a computer with a G-code compatible suite such as Universal G-code Sender (UGS). GRBL supports all standard G-codes but not macros; they have left the macros for the G-code sender on your computer. UGS is one of the best free G-code senders available and works great with GRBL.

For software that is all about interpreting G-codes, a nice feature of GRBL is its “look ahead” method for controlling the machine’s accelerations. It can track the upcoming motion in the G-code commands so the machine produces smooth transitions.

The latest version supports dual motor gantry systems, allowing you to home both sides of the gantry independently, as well as CoreXY layouts. It also includes support for safety features like door interlocks, and you’re free to repurpose any of the I/O ports for special tasks you may have.

Considering that GRBL is a free firmware, it’s flawless in terms of its operation. Most people will couple their Uno with a shield like the Protoneer or an Arduino CNC shield clone for low-cost DIY machines, but there’s nothing stopping you from attaching some fancy motor drivers and an expensive end mill with variable frequency drive to create a high-end machine.

GRBL is mostly used by people building their own systems, but there are pre-made machines and kits available that utilize it. Before we get into what you’ll need to get started, let’s check out whats already on the market.

Back to Contents

Advertisement
Advertisement
Advertisement
GRBL Software: The Basics

Commercial Devices

Image of: Commercial Devices
CNC mills are a quintessential maker project (Source: RSW via OpenBuilds Community)

As a testament to its abilities, GRBL is used in several commercial subtractive manufacturing machines. Although it’s most commonly used in hobby spaces or small workshops, the companies below run GRBL as their firmware in their CNC mills.

Carbide 3D Shapeoko

The Shapeoko line from Carbide 3D range uses GRBL as its firmware. These machines are primarily targeting wood milling. They come in a variety of sizes and configurations. You can opt for the Shapeoko Pro if you plan on using it in a work setting, but otherwise, the Shapeoko 4 may suffice. One nice feature of the Shapeoko Pro is its ability to automatically determine the tool length offset, which is useful if you need to change bits within one job.

3DTek XYZ-Carve

3DTek offers two different versions of CNC mills, and the lower-cost one utilizes GRBL. This model, called the “XYZ- Carve“, is meant for hobbyists while the more expensive variant is targeted toward workshops. The XYZ-Carve has a maximum cut depth of 95 mm and is capable of cutting wood, foam, plastic, and soft metals.

OpenBuilds C-Beam Machine

OpenBuilds utilizes GRBL in several of their machines, one of which is the C-beam machine. It was designed specifically for making small metal plates. This machine is run through GRBL panel, which is another G-code streamer like UGS. This leadscrew-driven machine can cut pieces 35 mm thick. With the XL version, which is more than twice as big, you can cut down to 63 mm.

Typically, you’ll find GRBL being used for CNC milling or laser cutting, but there’s nothing stopping you from creating something completely unique. Let’s take a quick look at getting GRBL set up in your project.

Back to Contents

Advertisement
Advertisement
Advertisement
GRBL Software: The Basics

Setup

Arduino CNC Shield
Arduino CNC Shield: like peanut butter and jelly (Source: Protoneer)

Broadly speaking, once you know what kind of machine you want to build, there are two main steps to getting GRBL operational: You’ll need to wire it up, then you’ll need to configure the firmware to suit your device. The steps below give you a quick overview of the easiest way to get started if you’re a beginner.

Wiring

Assuming you’re building a CNC machine, the easiest way to get started with GRBL is by using an Arduino shield that’s designed to work with it, like the one from Protoneer. The purpose of the shield is to handle the power-related aspects of running the machine, like moving a servo or turning something on.

Using a shield like this also has the benefit of being very tidy in terms of wiring, so you’re less likely to make mistakes. Since the pinouts on the shield are fixed, make sure it’s compatible with GRBL before you buy it.

Installing a shield is as easy as stacking the shield on top of your Arduino. Then, you wire your machine to the labeled outputs on the shield. This normally includes three or four motors along with a spindle on/off output. If you have some experience with wiring, this will be relatively straightforward.

Some shields will require you to install the stepper drivers yourself, so you may need a multimeter and a small flathead screwdriver to get this done. Stepper drivers are specifically for generating the signals that control the motion of a stepper motor.

These steps may vary a bit depending on exactly what kind of machine you’re building. But we’ve got a more detailed article on how to get set up with GRBL and Arduino to help you along the way.

Software Installation

Image of:
UGS configured with GRBL (Source: Protoneer)

To install GRBL you’ll need your Arduino and the Arduino IDE installed on your computer. Once you import the GRBL library into the Arduino software, you can connect a USB cable between your computer and the Arduino without the shield being powered on.

Then, you can go ahead with compiling and uploading it to the Arduino like you would any other Arduino program through the IDE. Once GRBL is installed on the Arduino, you’re done with the Arduino IDE.

Next, you open up your G-code sender with the shield still powered off. Once the connection settings are configured in the G-code sender, you can connect to GRBL running on the Arduino.

The final step is to configure GRBL through your G-code sender by sending a “$$” command. GRBL’s GitHub page provides a guide for this step.

The developers have made it very straightforward to get GRBL running on your Arduino, but if it’s your first time configuring this kind of machine, double-check all your settings like steps per mm, and test your endstops thoroughly.

Tips for CNC First-Timers

It’s worth taking your time and testing things as you progress. Make your first milling job a simple one using a soft material like plastic. Milling machines are much less forgiving and more dangerous than something like a 3D printer, so be sure to wear some goggles, strap down your working material securely, and keep your hands away from the end mill.

Back to Contents

Advertisement
Advertisement
Advertisement
GRBL Software: The Basics

Potential Issues

Image of: Potential Issues
Everyone was a beginner at some point (Source: CTJoriginal via Reddit)

If everything is wired and configured correctly, GRBL and UGS are pretty much error-free, but here are some of the most common issues and mistakes that tend to happen:

  • False triggers: It’s common to experience false triggers on endstops, but this is an electrical issue rather than specifically GRBL related. Sometimes, endstops trigger because of noise on the wire. This can be solved most readily by using a polarised capacitor connected to ground, which allows any voltage spikes to be eliminated before they trigger the pin. Having wiring limit switches can help you avoid this issue.
    • If you’re still experiencing issues with false triggers after you have wired your limit switches, it may be worth investing in some shielded cable or additional isolation.
  • Compatible software: There’s a myriad of software suites that you can use to control GRBL from your computer, and some may have their own quirks that don’t play nicely with GRBL. Universal G-code sender is a safe choice to get started with before venturing into more exotic interfaces.
  • Connection problems: Some people have had issues getting connected to GRBL in the first place, but it’s usually a setup misconfiguration like using the wrong baud rate. The latest version of GRBL runs at a baud rate of 115200, so double-check that as a first step.

Back to Contents

Advertisement
Advertisement
GRBL Software: The Basics

Alternatives

Image of: Alternatives
LinuxCNC UI has some more options than GRBL and UGS (Source: JLab)

So now that you’ve got a clearer idea of what GRBL is and what it can do, you may be wondering if there are other options out there. Let’s take a look at alternatives and when to opt for them over GRBL.

LinuxCNC

LinuxCNC is a computer-based G-code control suite. It can be used to control a variety of CNC-type machines including mills. This makes it more versatile than GRBL but also more complex with a steeper learning curve. LinuxCNC is a better option, however, if you’re interested in features like threading or if you need to control closed-loop servo motors.

For basic 3-axis hobbyist milling, you’re probably better off sticking with GRBL for its simplicity. In other words, if you want to customize the software, go with LinuxCNC. However if you have no experience with Linux and just want a simple setup, go with GRBL.

Mach 3

Mach 3 is a Windows PC-based control suite. Unlike LinuxCNC, Mach 3 is a paid app costing $175. It too can be used to control a variety of machines including CNC mills. It can run a 6-axis machine and macros, much like LinuxCNC.

There’s a limited version available for download prior to purchase so you can try it before you buy it.  If you’re looking for a Windows-based solution, then Mach 3 is a good choice.

Final Considerations

Both of these alternatives are considered more advanced suites than GRBL, but they take a whole PC and some additional hardware to include a real-time clock. So if GRBL can suffice for your project, it’s going to be the most cost-effective. The Arduino and CNC shield combination is hard to beat in terms of cost. Therefore, it’s a good option if it covers everything you need in terms of features.

Back to Contents

Advertisement
Advertisement

License: The text of "GRBL Software: All You Need to Know" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Topics
Advertisement