This is an overview and guide to building the rigid CNC router I recently designed. The rigid router is based on 4590 aluminum extrusions and runs Linux CNC. All of the design files, software configuration, and build instructions are freely available here.
License: All design files, configuration files, and guides, including this post are licensed CC BY-NC-SA 4.0.
Keep reading for a detailed build guide or if you're just looking for the design files, here they are:
I also designed a simple Simple MPG Pendant. Finally, I created a physical button panel, which runs this stm32 firmware. Keep reading for all the details
Small, desktop or hobby size, CNC routers can be capable of cutting some metals, like aluminum, but are typically not designed for efficiently machining such metals. They are generally small in size, made of lightweight materials such as plastic, for example, the MPCNC, and can have a lot of flex. Alternatively, small milling machines can be converted to CNC, as I did with a Grizzly G0704 Mini Mill, but they use ways and lead screws that are not designed for the high speeds and accelerations of a CNC router.
My goal for the 4590 Rigid Router is to build a (large) desktop-sized machine that can efficiently cut aluminum and possibly other free-machining materials. The machine should be easy to assemble and square without special tools. I also wanted to use off-the-shelf components where possible to keep costs down and make it easy for others to build.
Yes, I can see the chatter in the video below. The machine is rigid, but it seems that there are still areas that can be improved, and I will work on improving. Note also that I'm cutting fairly fast at 1200mm/min.
I found that using a smaller endmill (and therefore lighter cuts) helps significantly with chatter and results in nice surface finish:
For some things like the spindle, I started with an off-the-shelf component, but due to the high minimum speed of the standard 2kw Spindles (which is around 10,000RPM), I decided that building my own was a better option, so I could run it in a more useful range of speeds. I've shared my spindle design below, which uses an ER collet holder shaft and two sets of angular contact bearings all in a custom-machined aluminum housing. can run between ~200RPM and 7000RPM (I run mine at 6,000RPM maximum) ended up using my own Vertile CFOCer Brushless Motor Controller and a C6374 2,900W Brushless Motor. Also, I have a surplus optical table to which I mounted the machine, however, the frame is designed to self-square and level so that it can then be bolted to any reasonably flat surface.
I did not design the first iteration with manufacturability in mind, so as I built the machine, I found it required quite a bit of aluminum material and machining. I hope that folks who build the router can help others machine the parts for their routers. In the future, I plan to make a more manufacturable version of the router, but for now, I'm sharing the design files and build guide for the first version. If you're reading this and you are a manufacturing expert, I would greatly appreciate help optimizing the design.
There are 2 main components in the design for the router: the frame and the spindle. Free free to use either or both. All designs and supporting files are licensed CC BY-NC-SA 4.0.
The design file is available as a Fusion360 Archive: Rigid Router CNC Design Files.
One quirk of the design is that I've mixed metric and imperial hardware. Being in the US, I have a lot of imperial hardware on hand and most of my tooling is imperial. While I used some imperial hardware, I put a list of alternative metric hardware in the BOM.
I've assembled the bill of materials (BOM) that I used in this Google Sheet: Rigid Router CNC BOM, however, this list is not guaranteed to be up-to-date or complete. I recommend checking the design files and making your own list.
The CNC-machined parts are not included in the BOM and should be machined based on the design files.
As detailed in the parts list, I used Stepper Online's closed loop stepper motors and drivers. Thanks to Stepper Online for providing a discount on these parts. If there is enough interest, they may offer a kit with all of the necessary motion electronics.
You'll also need a computer to run Linux CNC. I used an old p5gc-mx Motherboard that I had sitting around, but any computer with a parallel port will work.
If you have a computer without a parallel port, I've had luck with the AX99100 chipset-based PCIe Parallel Port breakout cards, such as this one. I used one of these for an extra parallel port for more inputs. I explain how to set it up in the Extra Parallel Port Setup section.
The rest of the electronics I used can be found in the BOM.
You'll want to start by collecting all the necessary parts from the BOM and machining the parts from the design files.
Here's a video of me machining some parts:
I also spent some time learning how to anodize the parts, which I may write up in a future post.
Begin by building the base. The CNC-cut parts are designed to be self-squaring, so you can assemble them without special tools on any surface.
Start with the 4x corner brackets and the 2x 4590 and 2x 4545 extrusions for the base.
Install the two corner brackets that attach to the front-side of the machine.
Because the bolts that fit the linear rails are much smaller than those typically used on 4590 extrusions, I used custom nuts. However, I found out after I made these nuts that these 1/4-20 Weld Nuts from McMaster look like they fit and are not too expensive. I recommend using them instead.
I put both alternatives, including the custom-designed nuts and the McMaster part, in the design files.
Before putting on the two back-side corner brackets, install the HGR20 linear rails with M5 bolts and the corresponding t-nuts. Retaining the linear rails requires M5 nuts that fit in the 4590 rails. While I made my own t-nuts, as shown in the design files, I later found these M5 T-nuts with 19mm length which should work equally well.
Then, insert the correct number of t-nuts on the outside of the 4590 extrusions while the slots are still accessible. On each side, insert 4x t-nuts for the BK12 pillow block and 2x for the BF12 pillow block.
With the linear rails installed and t-nuts inserted in the side slots, you can now install the back-side corner brackets. using the 1/2" socket cap screws.
Finally, install the y-axis motor mounts and the base is ready. In this photo, I've also started building up the gantry for the x-axis.
Once you've built up the base and the y-axes, build the x-axis gantry.
Separately build the z-axis. Start with the z-axis plate:
Then, build up the z-axis assembly:
Here's how things look when complete:
I found an old Mac Pro case, that I gutted and installed all the electronics:
This wiring diagram describes all connections: Rigid Router Wiring Diagram.
Also, see the LinuxCNC Configuration for the configuration files, which also specify the connections.
Some notes about the writing:
The two 48 power supplies are wired to the motor driver's +Vdc
and GND
terminals. Wire 2 motor drivers to each power supply.
Motor driver wiring (wire colors) is shown in the wiring diagram.
PUL+
and DIR+
and ENA+
are wired together and then to the +5V
terminal on the breakout board.
12V power is drawn from the PC Power Supply.
I used an extra PCIe Parallel Port breakout card for some more inputs. This allowed me to connect a jog pendant with 7 buttons, a touch probe and a tool setter. In order to make wiring easier, I build this little breakout board:
Note: The pendant design file is here: Simple MPG Pendant.
The pendant is very simple. It has 7 buttons, 3 for jog axis, 3 for jog speed and 1 which is used as a dead-man switch to enable jogging, all in a 3D printed case. The dead-man's button inputs are on both sides, pressing either one will enable jogging. It also has a rotary encoder for jogging. These buttons and the rotary encoder are wired to the extra parallel port.
I also added buttons around my monitor matching the soft buttons in Gmocappy along with some potentiometers for adjusting the feed rates and spindle speeds with a physical dial, which is really handy while machining. There are also 6 LEDs in the panel that indicate the currently selected axis and jog speed on the MPG pendant.
The monitor panel is driven by a separate microcontroller and communicates with the LinuxCNC computer via serial over USB. The code for the microcontroller is in the stm32f103-buttons-panel repository as an STM32Cube Project for a STM32F103 BluePill microcontroller. The LinuxCNC side is in the main linuxcnc-router-config repository. The configuration instructions are below Configure LinuxCNC.
I originally tried the ManualMatic open-source pendant, however, because this is not a real-time component, the jogging was not smooth, so I switched to the directly wired encoder.
Begin by installing LinuxCNC 2.8.4 using the preempt-RT kernel
.
Enter your BIOS and enable the parallel port.
Also, in the bios, disable all power management features to ensure maximum consistency in the real-time kernel's timing.
I set the user name to cnc
, use the same username if you want to follow the below directions exactly.
Once installed, you can check the kernel with:
cnc@router:~/Desktop$ uname -a
Linux router 4.19.0-21-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.249-2 (2022-06-30) x86_64 GNU/Linux
Disable screen lock per this guide.
Enable auto-login by editing /etc/lightdm/lightdm.conf and adding the following lines:
[Seat:*]
autologin-user=cnc
autologin-user-timeout=0
Disable screen power management by installing xfce power manager: sudo apt install xfce4-power-manager
, then open the system settings power management page in the GUI and disable screen off (slide all the way left).
Install the 2nd parallel port with (AX99100 chip based):
Install the driver: https://github.com/MPeebles/asix_ax99100_linux.git
Checkout the driver code:
cd ~/src/
git clone https://github.com/MPeebles/asix_ax99100_linux.git
Install the build dependencies:
sudo apt install -y linux-headers-4.19.0-21-rt-amd64
Then, install the driver:
cd ~/src/asix_ax99100_linux
make
sudo make install
depmod -A
chmod +x ax99100
cp ax99100 /etc/init.d/
ln -s /etc/init.d/ax99100 /etc/rcS.d/Sax99100 || true
modprobe ax99100
Run stepconf
and check the base period jitter. Mine was 17000.
Check out the configuration from GitHub:
cd /home/cnc/linuxcnc/configs/
git clone https://github.com/nathantsoi/linuxcnc-router-config router
Compile the MPG Jog Pendant code:
sudo halcompile --install mpgbtns.comp
You should be ready to run LinuxCNC!
Launch LinuxCNC and you're ready to go!