top of page

So, what's wrong with Grbl on the Arduino?

Arduino Uno vs Pico Smackdown?








In a word, nothing is wrong with the Uno. But, there is nothing wrong with the original IBM PC. Though, I wouldn't want to use it either.


Grbl running on an Arduino Uno was an amazing feat. I am in awe of the original Grbl team that was able to shoe horn a complete CNC control system into a pokey little 8-bit microcontroller and make it work pretty well. Sure there were some trade offs - step rate for one and not all features could be included at the same time due to memory constraints. But it worked and there are millions of machines out there that run it.


But like with the IBM PC, the world has moved on. Microcontrollers have made leaps and bounds. Compared to the original Atmel ATMega in the Uno (and Mega), things like the $4 Raspberry PI Pico make it look positively primitive. The new ARM chips have 32-bit performance, memory and processing features. They have sprinted far ahead and allow amazing improvements in CNC controller software. Grbl has been moved to the 32-bit microcontrollers. In particular grblHAL runs on a number of them. Today, I want to talk about the Pico vs Arduino and why the Pico is a totally obvious upgrade. But first, why not stick with the good enough Grbl on an Arduino? Tried and True. Well, first off, I would say for an existing machine, if it ain't broke, don't fix it. But for a new machine or if your machine lacks features you want, grblHAL running on a PicoCNC breakout board is an obvious choice in so many ways. The reasons break down into four main categories: performance, reliability, features and ease of programming .



Performance.

The old 8-bit Uno runs at 16 MHz, the Pico runs at 128 MHz - 8 times faster. A key result of that is an increased stepping rate. Stepping rate is the number of times per second that a stepper motor can move. The Uno can hit about 30 KHz while the Pico can exceed 200 KHz. This means a Pico based machine can have a much higher top speed. It also means that you can have finer microstepping which means a finer resolution of your CNC machine movement. Often that is referred to as accuracy. Of course, the devil is always in the details and it depends on your steppers and how much power they have at higher speeds. But, low stepping rate has been a major criticism of Grbl on the Arduino. That is gone with the Pico.


Another area where the Pico shines is available memory. A benefit of this in grblHAL is you can increase the motion planning buffer size. This really improves performance with GCode that has a lot of short moves - especially Laser machines.


Reliability.

One surprising thing about Grbl on the Arduino is the lack of high quality CNC shields. I'm sure that will anger some developers and there are a few well thought out shields but the vast majority of shields simply ignore electromagnetic interference, EMI. Since EMI can cause vexing job disruptions, one would think handling it is a key feature of any CNC shield. When I sit down to design a CNC breakout board, the very first task is making it resilient to EMI. Period. And that is what I have done with PicoCNC board. It uses opto isolators for all the inputs and allows use of a separate isolated power supply for the opto isolators. In addition, the Grbl Arduino connection is USB and that can be a significant pathway for EMI. The PicoCNC and older Teensy based breakout board allow use of Ethernet, which is highly EMI resilient. The Pico also supports WiFi (with the Pico W). And, while WiFi can be disrupted, it uses TCP/IP which has retry capability and handles disruptions. The vast majority of Arduino CNC shields basically have no EMI prevention and are pretty much sitting ducks for EMI. This that do have EMI prevention (like opto Isolators) still connect via USB which is often a pathway for EMI. I see a never ending stream of people describing EMI problems on Arduino based machines. And it truly surprises me that a lot of CNC machine manufacturers simply ignore the problem.


Features.

Because the newer ARM microcontrollers have a lot of memory and performance, it is much easier to add features than with the 8-bit Arduino processor. One feature that I find compelling is auto-squaring for moving gantry machines. This requires independent control of the two motors on a moving gantry. Basically, when you home the machine, the controller makes sure that both sides of the gantry are moved to the exact same distance from the front of the machine. This pulls the gantry square and makes sure that you have circles and not ovals, rectangles and not parallelograms. Grbl on the Uno can not do that because it does not support 4 independent axes. There is a fork of the 8-bit Grbl project that adds it though only for the Arduino Mega. It is unclear if this fork is maintained, grblHAL has active development and maintenance. Here is a blog I did on auto-squaring if you want to learn more about it. Other features are spindle control, store and run GCode on a micro SD Card, built in dust collection control, directly drive relay coils, auxiliary outputs, Canned Cycles and more. And, grblHAL has a large number of plugins for other features that are available.


Programming.

One surprising and delightful aspect of grblHAL for the Raspberry PI Pico is the utter simplicity of programming it. There is no extra software to download and no special hardware needed. To create the firmware, use the grblHAL web builder. You don't need to edit anything - just open the web builder page, select the options you need and hit the build button. After 10s of seconds, it will allow you to download the built firmware file. You just click a couple of buttons and drag-n-drop your firmware file on it! Easy. For the Uno (or Mega), you have to download and install the Arduino development environment, download and install Grbl software, edit the config.h file to select or change features, build the Grbl project and then upload to the Arduino. Even if you find a pre-built file, you still need to get the loader which is part of the Arduino development environment. Not hard but it takes a fair amount of time, maybe 30 minutes in all and installing a big pile of software you will use once.

Conclusion.

Well, I hope you see why I am so excited about the grblHAL PicoCNC as a replacement for Grbl on an Arduino.



About the author. Phil Barrett is a long time CNC hobbyist and designer of several breakout boards.





Featured Posts
Recent Posts
Search By Tags
No tags yet.
Follow Us
  • Facebook Classic
  • Twitter Classic
  • Google Classic
bottom of page