An Arduino-based cnc controller for separate stepper drivers?

grbl is stepper motor controller firmware for three-axis cnc machines, intended to run on Arduinos with a motor driver add-on board.

Engineer in Wonderland cnc-related blogs are indexed here

It is the result of an amazing open-source project, and once more I am thankful to those who have put there time and expertise into such endeavours.

Update: The Cronos grbl board mentioned below gets analysed in this further EinW blog

My small cnc mill project needs motors (so I am told) that are too powerful for the normal drivers included on grbl Arduino shields (or integrated Arduino+drivers equivalents), and so I have been considering designing my own to link to external motor drivers.

The (hypothetical) brief was to keep it as simple as possible while provide proper RFI-resistant ground-loop tolerant hardware interfaces for everything that grbl can do.

Which means:

  • No microcontroller pins directly-connected to the outside world
    = buffered inputs
    = buffered outputs
  • EMC and ground-loop protection on inputs
  • Inputs for end-stop and homing switches
  • inputs for stop, pause and continue
  • Support normally-closed switch inputs – the largely fail-safe option used in professional CNC machines.
  • no more off-board 0.1in header connections – only proper connectors
  • Power from the ~36V motor supply rail
  • Isolated USB if there has to be USB
  • Connection for an ‘off-line controller’ (see below) if there is no USB
  • Enclose-able – so no heat that needs a fan

Opto-isolators on all inputs will go a long way to solving input EMC and ground loops.

Official GitHub gnea grbl limit switch connectionThis is even an official GitHub/gnea/grbl isolation circuit for folk to add to typical commercial grbl boards

With grbl, both limit switches for any axis are wired to the same input (hence only three optos), and a series connection is the only reasonable connection as it is more likely to fail-safe.

Anyway..

EinW Cronos 3-axis grbl controller ebay add photoImagine my glee when I discovered almost exactly this, from Chinese parts supplier Cronos via ebay (ebay photo right) – the advert said the processor was 32bit (see below) but I was pretty sure it was a standard low-hassle 8bit processor-based board.

Unable to do due diligence, I just paid the money, and it has now arrived and does indeed appear to be 8bit – I have not powered it up yet, but the processor is marked 328P.

Even better, it came in a DIN rail-mount enclosure and the whole thing lookks ‘proper’ rather than bargain basement tat.

EinW Cronos 3-axis grbl controller ebay add photoJust looking around, the board’s inputs (ebay photo left) are opto-isolated, and its off-board buffers seem to to be the HC245 devices I have seen used elsewhere – which are not really line drivers, but they are far better than asking the ATmega to drive off-board. There are also some opto-isolators near the outputs – not sure where they come into the equation yet.
BTW, the inputs in the associated motor drivers are opto-isolated and so ground lops will not be formed with the HC245 outputs.

32bit disappointment? 

The glee was slightly tempered by disappointment that the board was not 32bit, as this would have given it the ability to cut native g-code curves, for example, because of the far higher processing capability of 32bit processors with their associated higher clock speeds.

But it was not much disappointment – I don’t want this to turn into a software project, and 32bit grbl is a bit like that at the moment, whereas 8bit grbl 1.1 has been stable for more than a year ond only requires basic Arduino skills.

FYI, at least two projects: grblHAL and Grbl_ESP32, have taken what was the 8bit grbl project and extend it to 32bits – I have previously admired a Raspberry Pi Pico based grblHAL project, initiated by Phil Barrett (Brookwood Designs), the person behind the grblHAL projects ‘official’ break-out board, which is itself based around the powerful Arm-based Teensy 4.2 board. This official board seems to be available in kit form today, while many others have fallen by the wayside.

If you are interested in 32bit grbl, a French project on MakerFr will also be worth a look, which has an isolated controller board, and what looks like a well-thought-out ‘off-line controller’ (grbl-speak for a human-machine interface) which wires into a Nintendo Wii Nunchuk hand unit – both based around ESP32 modules.
I was on the verge of buying these boards when I discovered the more basic Cronos option.

I am not advocating the board I bought as I have not tried it yet (so caveat emptor), but if you want a look the ebay advert (from where 2 of the photos above were taken) is currently here. The same company seems to do a sort-of-similar four-channel 32bit board, which ticked fewer boxes for me.


Leave a Reply

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

*