DIY CNC milling machine

precision light duty 3 axis vertical milling machine

Similar projects worth following
Before this project I had built many small machines. These industrial gadgets were cool to look at, and useful too. The designs were good, but not always perfect. Eventually I learned an important lesson. The lesson learned was: 90% perfect is not good enough. So much effort is required to fabricate these parts. If the design is not perfected ahead of time, I end up with an expensive piece of "folk art". (rather than a quality piece of equipment)

The goal on this mill was to build myself a tool, as a tradesman. A serious tool built to last.

Some of the parts used in this project, I had collected in my early teens (~2005). I began designing in 2013. I began building in 2014. Three years later it is mostly finished, and in use.

The hardware uses BeagleBone Black as the CPU. To make a reliable machine, I wanted to use seperate power supplies for the motors and CPU. I designed a cape called Optocape for the job. Optocape is open source. You can buy one on Tindie.

Optocape includes isolated input/output hardware, along with an LVDS serializer for a LCD touchscreen. It's a great choice for any mid-sized equipment with big motors and a touch screen.

BeagleG is a bit of open source firmware installed on BeagleBone, allowing the machine to interprite G code and control the motors. The BBB PRUs are utilized for signal generation, so there is no risk of the CPU freezing while motors are moving. It also means plenty of computing resorces available for attractive graphics and touchscreen.

BeagleG runs from the shell, so I was able to write several scripts for various technical procedures. For example, when loading a new piece of material, it is necessary to "touch-off" the endmill on the workpiece, and set this position as Z = 0. I wrote a script to make this process easier, and it is activated by an F key on the on-screen keyboard.

The front panel includes two USB type A jacks. I use my desktop PC to write G code files, then transfer them to the machine via flash drive. A script actived by F key mounts the flash drive, loads the G file, and prompts for additional parameters.

Also on the front panel is a USB type B jack, connected through an FTDI interface to the BBB Serial Debug port. Software updates and customizations are easy over USB SSH.

Adobe Portable Document Format - 196.75 kB - 02/14/2017 at 06:25


  • 4 × StepperStack DGSSV2R5 stepper motor controller
  • 1 × Optocape photocoupler & video cape
  • 1 × BeagleBone Black SBC
  • 1 × Heatsink Extrusion

  • Upgraded Stepper Drivers to Gecko G201X

    Dean Gouramanis3 days ago 0 comments

    The StepperStack drivers looked unique, and I was proud to build a machine using my home-made drivers; but they were small for this machine. I finally could afford some Gecko G201X drives. Now it sounds like a propper CNC, rather than a fax machine.

    The CNC controlls are a fanless design. Notice the aluminum mount features large surfaces for heat transfer to the base plate. The back-side of the control box is a giant heatsink. No noise, dust or clogged fans to worry about.

    Another thing worth noting is the new purple PCB. I needed a way for BeagleBone to increase the drive current during a cycle, and decrease it during Idle state. So I designed this bit of Open Hardware. It can switch between two potentiometers for three channels (X,Y,Z). I would call it a Gecko Drive current switcher, but Gecko is proprietary. So the official name is "Current Set Resistor - resistance switcher". Get one on Tindie.

  • making of the CNC controls

    Dean Gouramanis12/13/2017 at 20:01 0 comments

    Now with the controls finished, I compiled a slideshow of images from the build process.

  • Video Explanation

    Dean Gouramanis12/09/2017 at 23:04 0 comments

    I'm trying to get a conversation started about this style of CNC controller. It can be used in 3D printers too.

  • Craftwork

    Dean Gouramanis09/23/2017 at 06:02 0 comments

  • Build complete

    Dean Gouramanis08/03/2017 at 04:45 1 comment

    It's pretty much done. I still need to install limit switches, and angular indexers in order to be able to home the machine. For now I can use it as-is. I have a feeling this machine will be a life long work-in-progress.

  • Control Unit finished

    Dean Gouramanis08/03/2017 at 04:42 0 comments

  • Custom analog panel meters

    Dean Gouramanis08/03/2017 at 04:40 0 comments

    Bezels made by machine, for machine. Here are the copper bezels for the custom panel meters. These analog panel meters show Axis and Spindle current in real time.

  • Wiring the controller

    Dean Gouramanis02/14/2017 at 07:04 0 comments

    The miniature milling machine will have a miniature electrical system. The power supplies, stepper drivers, NC controller, spindle driver, touchscreen and switches are all crammed into a 12" X 12" X 7" box.

  • New open source hardware

    Dean Gouramanis12/13/2016 at 22:42 2 comments

    The Opto buffer cape I hacked together last year worked fine, but it did'nt have enough I/O. So I designed a propper cape for BeagleBone black. It is called OptoCape.

    My CNC controller is based on #BeagleBone Black running LunuxCNC #Machinekit. The cape has 15 optically isolated outputs, 10 isolated inputs, optically isolated serial port (UART4) , and four solid state relays on-board.

    I also decided to merge a previous project of mine into the layout. So the OptoCape also contains a 12 bit color LVDS video output. This section is CMOS, and powered by the VDD SYS of BeagleBone (so not isolated...).

    The optically isolated outputs enable me to drive the stepper drivers, limit switches and other machine parts using seperate power supplies. My spindle uses a 24 VDC supply, and the steppers are using 28VDC power supply.

    I put OptoCape up for sale on Tindie, and already sold the first one. It's a good general-purpose cape.

  • Clean and relocate

    Dean Gouramanis07/03/2016 at 15:06 0 comments

    I cleaned and polished the cast iron base last week. It was very laborious, but very rewarding. This machine looks beautiful in my room. Now I have a clean dry place to work on the electronics.

View all 12 project logs

Enjoy this project?



Jerry Trantow wrote 12/15/2017 at 00:37 point

Why BeagleG instead of Machinekit?

  Are you sure? yes | no

Dean Gouramanis wrote 12/15/2017 at 05:21 point

There is a bug in Linux kernel version 3.8 preventing bypass of the HDMI hardware. I was unable to output parallel video until I updated to a 4.x kernel. Then it worked fine. Last time I checked Machinekit only runs on 3.8 kernel. BeagleG does not have a fancy GUI but it works great. I like the fact that it's light weight too. Simple is good.

  Are you sure? yes | no

Jerry Trantow wrote 12/19/2017 at 15:23 point

Thanks for the reply. I was able to get MachineKit to run with 4.4 but the GUI is slow on the BBB and I've found a bunch of bugs in the remote GUIs. I will take a look at BeagleG. Seems like a simpler setup for 3D printer. I wanted the lathe and router to be standalone with MachineKit but I'm not sure I could live with the display bugs.

The 4.4 kernel MachineKit uses new device tree overlays which probably fixes your bypass problem. But it seems like most BBB users are still using 3.8.

  Are you sure? yes | no

Robert Mateja wrote 12/13/2017 at 18:27 point

FANTASTIC! Those steampunk gauge also great.

I see that driver uses DRV8818 and micro? for jog mode.Can it be bypassed for direct step/dir for drv? 

  Are you sure? yes | no

Dean Gouramanis wrote 12/13/2017 at 19:54 point

Yes. This machine uses step/direction mode only (Passive mode). Active modes in StepperStack can be activated by serial command, but it boots up in Passive by default.

  Are you sure? yes | no

Boris van Galvin wrote 12/10/2017 at 02:03 point

Awesome Work!! Love your control unit!

  Are you sure? yes | no

Dean Gouramanis wrote 12/10/2017 at 22:30 point

Thank you.

  Are you sure? yes | no

georgefomitchef wrote 04/30/2016 at 20:04 point

Hello Dean!

We made some video tutorials: "how to make your own diy laser engraving / cutting machine".

Will be so great to know your opinion!Realy!

You can skype me :george.fomitchev  or  email me:

Than you!

Video 1 : How to assemble MakeBlock XY plotter

Video 2: How to assemble DIY engraver

  Are you sure? yes | no

Dean Gouramanis wrote 04/30/2016 at 20:49 point

Nice music.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates