Raspberry Pi Pico mooted for low-cost open-source CNC controller

The open-source grbl project has produced software that allows an Arduino to control a three-axis CNC machine – it is the software within ‘3018’ and related low-cost Chinese-made CNC desktop routers.

Admired for the capability that its developers have squeezed into a 16MHz 8bit AVR microcontroller, and their ingenuity in doing so, the associated hardware has started to show its age as people have adopted it as a basis for more and more complex and advanced CNC projects.

Engineer in Wonderland cnc-related blogs are indexed here

grblHAL is one of the open-source 32bit progressions from grbl, and is becoming increasingly popular as it interacts with its host computer in the same way as grbl, while running on various 32bit processors at over 100MHz.

From the CNC mechanics point of view: grblHAL-based hardware can output many more step-and-direction-pulses per second than grbl-on-AVR, to more than three stepper motors.

EinW grblHAL diagramgrblHAL is in two parts: an easy-to-port hardware abstraction layer (where the HAL in the name comes from) and an instruction-reading number-crunching core (diagram right).

Although below the radar for many ‘serious’ CNC users – more used to Mach4, Mach3 or LinuxCNC on PCs – my guess is that grblHAL will rapidly get noticed when people realise they no longer need export high rate pulses from a PC right next to the milling machine or router.

In my limited understanding, a PC (or a Raspberry Pi) will still be needed to send instructions to grblHAL, but this can be over a less taxing standard USB or Ethernet connection to the grblHAL hardware. And being smaller, the grblHAL hardware can now be located right next to the stepper drivers, keeping the fast pulses within short local connections.
Please correct me in the comments if I have got this wrong.

The community has already ported it to multiple processors, and ‘terjeio’ is developing a branch aimed at Raspberry Pi Pico board, making specific use of its use the novel PIO serial data co-processors built into the on-board Raspberry Pi’s RP2040 MCU to make appropriate signals.

It looks like ‘phil-barrett’ is co-operating, and developing a breakout board called PicoCNC that will accept a Raspberry Pi Pico and convert its IO to the correct voltages for driving four stepper controllers plus ancillaries, as well as opto-isolating inputs from the CNC machine and handling the Pico’s power supply.

EinW BrookWoodDesigns Tindie Teensy grblHal boardThe reason phil-barret is important, is that, as Brookwood Design, phil-barrett has already sold hundreds (Update: almost 600, see comment below) of a similar, well-received, CNC breakout board (right) for the powerful (600MHz Cortex-M7) Teensy 4.1 MCU-on-module – which will control up to five axes and is available as a partial kit though Tindie.

Hats off to the innovative grbl open-source community.

BTW, the only productive comment I might be qualified to make to anyone designing a break out board for an electrically noisy environment (and do correct me if you know that this is a waste of time – Mr Kurt? ), is that rather than having a single resistor in series with the LED of an opto-coupler for an isolated 12V or 5V input, I would split the resistor in two equal halves and put one in each lead to the opto-coupler led to prevent noise from having a low-resistance route onto the pcb (down the non-resistor connection).

Web pages:

The grbl project

grblHAL RP2040 on GitHub 

PicoCNC GitHub discussion page

Brookwood Design’s Teensy 4.1 CNC board on Tindie

The images were taken from the linked grbl and Tindie pages. If this use is inappropriate, my apologies, please get in touch and I will remove them.


Comments

2 comments

  1. Steve, Thanks for the write up. Your comments are all spot on. The only minor correction I would make is that I’ve sold almost 600 of the Teensy based boards and there are lots of users out there.

    Your noise comment about splitting the resistor into 2 parts has merit. Though, because it is on the isolated side the noise won’t make it into the digital section.

    I am excited about the picoCNC board as the all in cost of a CNC controller will be barely above cost of an Arduino plus a shield and have about 10X the performance. But the real benefit is broadening the accessibility the grblHAL software that is on a par with Mach 4 and LinuxCNC in performance and capability.

    Phil Barrett

    • Thanks for the update phil-barrett – now included above
      You have an impressive project between you and terjeio – forgive me if I have missed other major contributors.
      On the subject of split resistors, I take your point about it being a digital board. I would be more worried if it was an RF or sensitive analogue circuit – it is amazing how low-impedance fast edges couple around between tracks on a pcb. Hopefully wise Mr Kurt will comment as he is most knowledgeable in the Dark Arts of EMC.
      Best of luck with PicoCNC

Leave a Reply

Your email address will not be published. Required fields are marked *

*