Introduction: DIY Desktop 5-axis CNC Mill

OK, you bought your router and you are happy with it. If you are an artist.
But... if you are an engineer... you probably are not so happy.

You cut some 2D stuff. Then try some 2.5D and start getting excited. And then, there comes a day when you start wondering... What if I can make something more out of my 3-axis router?

Then it comes to your mind that you can always convert one of the axis from linear to rotary! Yes this is it! You start doing it... you succeed, but deep down inside you know it.

You have to go all the way to the end and do it properly. You need to make the conversion to a full 5-axis machine to be satisfied! If you feel like it, then follow my lead...


  1. One CNC router (CNC 2417 Mini)
  2. One MACH3 USB CNC Interface Board (BL-UsbMach-v2.1)
  3. Five Stepper Motor Driver Controller Boards (TB6600)
  4. Two NEMA 17 Stepper Motors
  5. One Relay module
  6. One ATX PC Power supply
  7. Two GT2 Timing Belts (2mm Pitch 6mm Width, one 224mm 112 teeth and one 200mm 100 teeth)
  8. Four 608RS 8 x 22 x 7 mm Deep Groove Ball Bearings
  9. Screws, Nuts, Shafts, Cables and Connectors...
  10. A 3D printer

Step 1: Do the Basics

First things first, buy and assemble a router.

I bought the CNC 2417 Mini. There are lots of different models out there. Some of them come with a Laser module too. Just mind to pick one that matches these table slots, if you do not want to re-design my 3D parts.

It's like lego, you see the picture and you build it.

I don't have much to say on this, as you will find tons of info on the net.

If you feel like going with the linear to rotary y-axis conversion (the one that moves the table back and forth), I can give you some ideas with this picture. You can also see it in action in the video. If you need further info just ask me in the comments.

Step 2: Ta-Daaa! a Trunnion Table!

To convert a router to a 5 axis mill, you need two additional rotational axes.

The most common layout is a trunnion table mounted on top of a router's table.

So I thought, OK, I have to use a trunnion. Then I thought, why build a 3D printer (prior years project) if you are only to use it for fancy stuff. I have to 3D print something really useful: a trunnion table!

Apologies for being such an infidel using OnShape for that, but I like using different platforms when designing new ideas. So I did a first design, then a second and I ended up with something that might actually work.

It consists of many parts that are mostly printed flat on the bed to be sturdy enough for this application. Of course lots of bolts and nuts (all are M3) were used to assemble the thing together. I also used some 608 roller bearings and 8mm diameter smooth shafts.

Feel free to browse and see assembly here: trunnion

For the printed parts (all greens and reds) I used ABS plastic. Grab the attached STLs and print all of them 2 times, except for Part3 which is needed only once and Part9 4 times. Mind to align Part9 with the T shape flat face on the bed (screw hole aligned with Z).

The belts though, you can not avoid, you have to buy them. I tried printing some ninjaflex material but it is not suitable for this application, you need the belts to be really stiff in terms of tension to increase the machine's accuracy.

Step 3: Firmware and Cabling

And now... what now? I did the hard work (hardware). The easy thing should be the software. Searching the net I found out that things are not this way when we are talking CNC.

Not to mention the even bigger problem that stands in between, the firmware.

Of course I knew that the board that came with the router is only for 3 axis and I should replace it. So I found out that the closest thing to making 5 axis work simultaneously (other than using any old-fashioned parallel ports) is a MACH3 usb board.

So I got the BL-UsbMach-v2.1 and five stepper motor drivers TB6600. I know, these drivers are an overkill for the small NEMA 17 motors, but these were the ones I found to be plug and play for the MACH3 board.

For this thing to work, you need some serious power. The power supply that came with the router would not suffice. So I got one of my old ATX power supplies and used the 12v output. An intermediate board to supply 12v to all stepper drivers and the spindle was custom made. Really simple stuff just connect + with + and - with - for all components (parallel power supply of 12v to all drives).

The control board also needs to control the spindle. I did not make any sophisticated circuitry to control spindle speed. It is just ON/OFF but through a relay module, controlled by the output pin #1.

I include a wiring schematic.

Step 4: Ready to Test Hardware and Firmware

Once the controller board and stepper drivers are ready, the next step is to see if a PC can drive the thing.

The board comes with a CD with a bundle version of MACH3. Note that a USB plugin needs to be installed for the board to run.

Install it, set up the pins input/output, do the motor tuning (mind to check the total number of steps for your NEMA 17 motors), and you are ready to jog the machines axes all at once!

I was so excited that I did some testing by sending commands like G0 X10 Y10 Z10 A90 B180 and video the thing moving!

Step 5: Software

If you have the machine, it doesn't mean you can use the machine.

As I said in the beginning, if you are an artist you are just fine with a router. You can even use Inkscape to generate g-code.

But if you are an engineer you know you have to think deeper. You need to get involved with CAM (Computer Aided Manufacturing) and aim for the 5-axis tutorials to see if the software you are targeting is even capable of producing code for such machines.

Fortunately enough Fusion 360 is good in that and comes with an educational version too!

Some minor changes are needed in terms of machine layout settings and post-processor coding, to match the machine geometry and axis layout. But thanks to some really good tutorials online I was able to overcome this and generate 5-axis code!

Some testing needed to be done now. I quickly made a simple but really easy to debug geometry when looking at the g-code. I tried the Flow toolpath with multiaxis enabled and the code looked really good. So I sent it to the machine and... success!

Step 6: Simulation

I had a 3D scan of my face. So I though, if I can carve this thing on a piece of foam then I could do anything (evil laugh)!

So I imported it in Fusion 360. Unfortunately the Flow toolpath only works on geometry, not on mesh. So I had to use some basic toolpaths, but OK this is still 5-axis. I did some adaptive cleaning and parallel finishing toolpaths and tested the simulation.

The code seems to be nice!

Step 7: And Now Let's Put It to the Test

This is a time-lapse video I took while performing the first two adaptive cleaning operations, in opposite sides.

Step 8: Result...

5-axis Milling is not an easy thing to do. I know I still need to find a robust way to zero the machine before I start cutting. Maybe add probes to make some basic homing and calibration possible. But I think overall this project was a nice and productive way of putting some really advanced CNC techniques to the test.

Step 9: ...and for the Ring Engravers...

I attached the STLs of the parts shown in step 1.

CNC Contest 2020

Runner Up in the
CNC Contest 2020