# GRBL/HAL - what I've been doing lately.



## PhilBa (Sep 25, 2014)

I'm a big fan of open source software and hardware. In the last couple of weeks I've been focusing on an interesting development in CNC control, new 32 bit versions of GRBL.

As many know GRBL is open source motion control software for CNC which runs on the 8-bit Arduino family. Several people have been porting GRBL to 32 bit ARM processors. Some of these are quite good and one in particular, GRBL/HAL, really stands out as done right. The designer (terjeio on Github) has done a very good job of factoring out the processor specific parts to make it much easier to port to different machines (that's the HAL part - Hardware Adaption Layer). Currently, he has ports for 12 different processors including several Arduino ARMs and the Teensy 4.0 (600 mhz Arm M7). In addition he has added hooks for a number of extensions. With the added memory and speed of ARM processors, more high end features will be making their way into GRBL. The one I am most excited about is ethernet support but lots of other are coming.

Anyway, doing my part to help push the GRBL world forward, I have been designing a series of open source motion controller boards based on GRBL/HAL. This will help a system builder to put together a CNC machine for a fairly low cost. The goal is to have pre-built firmware that the user just loads onto the machine, unlike GRBL Arduino which requires installing the Arduino development system and building GRBL. Low friction is the goal.

My first board is for the Teensy 4.0. It supports 4 Axis, the standard GRBL inputs (limits, e-stop, door open, ...) all optically isolated, Spindle 0-10V control, PWM, direction and enable outputs. Supports up to 7 external relays including Spindle, Coolant Flood and Coolant Mist plus a Spindle slaved relay output for dust collection. And uses screw terminals for reliable connections. I'm testing the board now but it appears to be quite solid. I have a few minor changes and will be doing an update soon. I have a similar 4 Axis PCB for the Arduino MKRZERO getting made right now in China and have an Arduino Due' based board in layout right now (though may not finish it, I hate the Arduino form factor). In the planning stage is a 6 Axis board based on the Teensy 4, though I may wait for the Teensy 4.1 to come out in the next couple of months - more pins. Here's a picture of the 4 Axis Teensy 4.0 board. Once each board completes testing, I will remove the copyright and release it as open source hardware.


----------



## honesttjohn (Feb 17, 2015)

You lost me at "open source software".


----------



## difalkner (Jan 3, 2012)

That's a very good looking board, Phil! Do you have any video or photos of creating the PCB? That would be cool to see. Are you doing wave soldering of components and connectors?

It's been ages since I did any bread boards or my own circuit boards and it was a lot more primitive back when I did that, so my questions may have 'age' on them and be outdated for today's technology.

David


----------



## PhilBa (Sep 25, 2014)

Thanks. Pretty happy with how it turned out. Not a single error other than a couple of silk screen issues. And, of course, the inevitable "wish I'd done this" things. Those are in V1.1. Sorry, no videos or photos. All hand soldered this time round. It's not too bad because I'm using big SMDs. If there is cause to make more than a few, I'll get a stencil, solder paste and do toaster oven reflow. I'll take a few photos of that process


----------

