Blog

An Arduino-based cnc controller for separate stepper drivers?

By Steve Bush 28th September 2022

grbl is stepper motor controller firmware for three-axis cnc machines, intended to run on Arduinos with a motor driver add-on board. Closed Loop Stepper Motor 3d Printer

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.

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.

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

This 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.

Imagine 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.

Just 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.

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.

Tagged with: Arduino EinW Engineer in Wonderland machinery microcontroller

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

Download the Elektra Awards 2022 media pack and book your sponsorship package to be part of the most prestigious awards event celebrating its 20th anniversary this year!

Get our news, blogs and comments straight to your inbox! Sign up for the Electronics Weekly newsletters: Mannerisms, Gadget Master and the Daily and Weekly roundups.

Read our special supplement celebrating 60 years of Electronics Weekly and looking ahead to the future of the industry.

Read the Electronics Weekly @ 60 supplement »

Read the first ever Electronics Weekly online: 7th September 1960. We've scanned the very first edition so you can enjoy it.

Read the very first edition »

Electronics Weekly teams up with RS Grass Roots to highlight the brightest young electronic engineers in the UK today.

Read our special supplement celebrating 60 years of Electronics Weekly and looking ahead to the future of the industry.

Read the Electronics Weekly @ 60 supplement »

Read the first ever Electronics Weekly online: 7th September 1960. We've scanned the very first edition so you can enjoy it.

Read the very first edition »

Tune into this Xilinx interview: Responding to platform-based embedded design

Tune into this podcast to hear from Chetan Khona (Director Industrial, Vision, Healthcare & Sciences at Xilinx) about how Xilinx and the semiconductor industry is responding to customer demands.

Dual Stepper Motor Controller By using this website you are consenting to the use of cookies. Electronics Weekly is owned by Metropolis International Group Limited, a member of the Metropolis Group; you can view our privacy and cookies policy here.