The Pi CNC Controller


Back in the olden days, the latest and greatest CNC machines had minicomputers bolted onto their frames, replete with paper tape readers and seven segment displays. For the home CNC machinist of today, these hulking electronic brains are replaced with something a little more modern – desktop computers with parallel ports. Having a box filled with computers and motor drivers is just too cool though, and this tiny Raspberry Pi CNC controller fits the bill quite nicely.

The controller uses a Raspberry Pi as the brains of the device, but there aren’t too many options out there for stepper motor control in Pi land. There are, however, dozens of CNC shields or the Arduino. The Pi AlaMode board is able to provide voltage level conversion between the CNC shield and the pi, and also has the nice bonus of a battery-backed real time clock.

With some proper connectors, lighted buttons, and a beautiful cable sleeving job, this Pi CNC controller would be well suited for any of the desktop CNC  or engraving builds we see from time to time.


25 thoughts on “The Pi CNC Controller

    1. I agree with the great execution but I was wondering what the RaspPi is actually doing. He mentions using Remote Desktop Connection on his laptop to connect to the Raspi which is in turn connected to the Pi Alamode board which is running GRBL. What advantage does this offer over directly connecting his laptop to an Arduino running GRBL.

      It seems like a way to use a wifi connection instead of a USB cable.

      1. It’s also possibly a good way to be able to leave a long running job going without the laptop open. Or even needing a desk near the CNC machine to set the laptop on. I wouldn’t call them huge features but it could be something that’d end up being nicer once you’ve got a flow going. He could be doing the modeling on a desktop machine even and not have a laptop near there, and it keeps from having a laptop exposed to lots of saw dust. too.

  1. I think a Beagle Bone + CNC cape would do it more simply and probably involve less grief. The reason the Arduino is in this setup is to make up for the fact the Pi just doesn’t have the I/O.

    This is an incredibly nice setup though.

    1. I think this setup is a lot closer to the original style of (desktop) PC wired to a basic controller through a parallel port with the Pi being the “PC” and the shield having an Arduino doing the low-level realtime lifting.

      Even more optimal would be using something like the Smoothieboard as you don’t need all of the headroom you get with the BBone but do get lots of IO and hard real-time interaction which you need for motor control.
      In ARM core terms, the Pi is using an application processor (an ARM11), the BBone is even more obvious as it’s a Cortex-“A” (for “Applications”) but you really want one that is intended for real-time/embedded usage so either an “M” class core (such as the Smoothieboard’s Cortex-M3) or a Cortex-‘R’ (probably ideal for this as they’re the ones with the “Real-time” profile but I don’t know of any examples).

      1. I can see that. The thing I like about the BBB setups over purer controller boards is that it’s more easily integrated with a GUI.

        All that said, I have a BBB (but no capes) and a SmoothieBoard, both sitting unused, waiting to be put into something.

        1. Ah. I was under the impression that there may be enough “spare” capacity in the Smoothie for a noddy UI? (okay, it won’t be a fancy high-res 3D whizzy afair but it’s for CNC control – what more is needed?).
          Actually, I may be thinking of the Smoothiepanel which will give the same sort of setup (core for display, core for stepping control) but the opposite way around in that the shield is for the display (rather than the realtime control).

          As for things sitting unused – yeah, I need to rip apart several printers to steal the steppers and put my Smoothieboard to some use rather than letting it sit feeling unloved in its box. :-(

          1. It may not be required, but a GUI would certainly be nicer, and help bring the CNC to something closer to the bigger industrial machines, which tend to have a computer & nice screen built-in.

            Smoothiepanel isn’t available yet. I had the impression it should be put on a crowdfunding site soon. The screen & inputs are about equivalent to a RepRap SmartGraphicalLCD.

  2. Why does everyone go nuts over a battery backed real time clock? I see this all the time on things like this and the open sprinkler pi. These are networked devices and NTP has been around for a long time. Seems like a waste of both pcb real estate and parts to create something that can be done more accurately with a network connection that they already have.

        1. Having onboard clock helps when your internet connection drops. Then only one reset will lead to total loss of functionality and after you return from your holiday trip you’ll find your home heating + plant watering system caused your water pipes to burst and plants to die.

  3. So this is a nice build, but I see the area of need is really in the driver boards.

    There are a lot of really weak stepper driver boards out there. Good ones are hard to find, and they are expensive. Gecko comes to mind.

    Many of the boards are low power and are not suited to the amps required for cnc machining. Maybe okay for 3d printing.

    1. The postage stamp style stepper drivers are good for the NEMA 17 sized stepper motors, and sometimes even that’s a strain.

      That Ox build uses a gShield, which offer 2.5A and pretty solid heat spreading design on the PCB – which is good for the NEMA 23 size stepper motors on the Ox.

  4. excuse me i want to make a 3d printer with rpi and arduino.every body say me that i will be crazy if iwant to make a new code for this. they say me that it is better to use grbl.i want to ask you what shoud i do?if it is better to use grbl for rpi,where can i found it?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.