Why use Linux CNC
I suppose the obvious answer is that a Linux CNC router software is FREE to use because its Open Source. This post shows how to get the OX CNC router from OpenBuilds working with Linux CNC and a TB6560 CNC controller. But this should work for most 3 axis CNC routers.
I’ve used Mach3 for several years and it always worked well for me. I did briefly try to get Linux CNC working on my Hot Wire CNC foam cutter but had a couple of issues that made me switch to Mach3. The issues weren’t major but I wasn’t very experienced in CNC and was keen to get my machine working. There was a good tutorial on Mach3 configuring a 4 axis foam cutter on YouTube , so I followed that and got my machine running. I then had to pay $175 for Mach3. But it always bugged me because I almost had Linux CNC working and vowed to revisit it when I had some spare time. Getting the OX CNC router from OpenBuilds working with Mach 3 was just adding a new profile and setting the slave axis option for the 2 steppers on the Y axis.
Getting the Hot Wire CNC foam cutter working with Linux CNC post is here http://www.rckeith.co.uk/foam-wing-free-cnc-software/ . All the steps up to “Stepconf for TB6560 Motion Controller” are the same. Which covers the install and Latency test Max Jitter figure, which you need for the hot wire machine as well.
So what’s changed now and why use Linux CNC. Well I don’t have to work anymore, I’ve managed to retire a few years early so I have plenty of time, wife permitting. I’ve had lots of feed back on my CNC machines and by far the biggest issue is always software. Cost can be a factor when you’re thinking of building a CNC machine and software can soon add up. Which may just put your build out of reach, Mach3 is $175. I’ve spent more money on software on my foam cutter than the actual machine. So Linux CNC may be just what you need to bring your build to life. It’s very easy to use and is some ways much simpler than Mach3, but best of all as said previously its FREE.
Is Linux CNC hard to use
No, in fact I think it’s a bit easier than Mach3. When you first open up Mach3 it can be a bit overwhelming. There are several screens which if your just a hobbyist like me without a CNC background it can look a bit complicated. Linux CNC looks less daunting but still fully capable.
If you grown up with Windows or a Mac then Linux may look a bit strange, but don’t discount it. I’ve worked with Linux from its early days and finished my working career as a Linux System Administrator. So I’m quite proficient in Linux. Linux CNC is just a piece of software that runs on top of Linux. Getting it working on the OX OpenBuilds router from Ozznest has been quite easy, I now have it working really well. Read on if you want to get yours working.
CNC Router Options
You have a few options depending on your requirements, how much you can afford and the amount of time you have to spare.
OpenBuilds OX router design from Ozznest in the UK.
I went for the 750mm by 500mm which is the smallest because I don’t have a great deal of space. It’s not cheap but has some improvements over the original design for rigidity. See my full build log on this site OX router from Ozznest
Buy a complete router from eBay or Amazon.
The Chinese 6040 seem to be very popular. Most come with a trial version of Mach3 which only allows 500 lines of G-code so using Linux CNC will save you $175. Like these below from Amazon and eBay
Build your own
If you have the time and none of the above suit your needs then this is a viable option, which I did consider myself before purchasing mine from Ozznest. Usually plans can be found for free on the Internet which quite often use skate board bearings and aluminium angle to create the linear motion and are mostly built with MDF particle board.
Linux CNC requirements
Like Mach3 you’ll need a PC with a parallel printer port. So it’s probably going to be an old desktop or one with a parallel port add-on card. Make sure you get a 5 Volt version and not a 3.3 Volt, which are not suitable for Linux CNC or Mach3. Here’s a link to a suitable one pci parallel printer
There are some special I/O cards you can get for Linux CNC called Mesa cards which can be used on more modern PC’s, but this post won’t cover that. I’ll assume you are using a parallel port. Linux is known to be less resource hungry than Windows so you don’t need a powerful PC. Check the wiki here for more details http://Linux CNC.org/docs/2.7/html/getting-started/system-requirements.html My machine is a Dell GX620 OptiPlex with 2GB of RAM, 80GB disk drive and a Pentium 4 3GHz processor.
CNC Controller hardware
I use TB6560 4 axis board which are easy to get hold of from Amazon or eBay The 4th axis is used to drive the 4th stepper in slave mode on the Y axis. These boards get some bad reviews but mine has been 100% reliable. I think some of it may be due to Chinese translation of the manuals and buyers not fully understanding how to configure the boards for their stepper motors.
The alternative is to use one of the Gecko CNC controllers which are a lot more money, but very good. If you’re on a budget then try one of the Chinese TB6560 from Amazon or eBay and if you have issues you can always send it back. If you order from other sources then check their returns policy. I had issues with a 3d printer I purchased direct from a China warehouse and it was very frustrating. It got resolved eventually but took a long time.
Installing Linux CNC
First of all its very easy to install. There are a couple of ways to do this and you can even run Linux CNC from a Live install CD to see if it will run on you machine, without actually installing it. You can use a 64bit PC but it will run as a 32bit application. I choose to swap out the hard drive on my Dell for a spare disk, so I could leave Mach3 untouched. The Dell has a quick release system for the disk and I can swap it out in about 30 seconds.
You can dual-boot your PC if it has Windows installed and you have no other machine, but I’d recommend using a separate disk.
Here’s my video on how I did my install and step configuration and cutting out a drone frame for a tricopter, build coming soon
It’s quite long about 45 minutes , but I’ve added sections if you check the description.
Here are the brief steps assuming you are installing on a dedicated disk drive.
Download Linux CNC http://www.Linux CNC.org/Linux CNC-2.7-wheezy.iso and burn the ISO to a CD/DVD or USB pen drive. USB is much quicker.
Boot your PC from the CD or Pen drive – press F12 on most PC’s or configure the BIOS to boot from CD or USB
Linux CNC is a Real Time Operating System unlike Windows. So what does that mean.?
It gets a bit technical but in essence means its guaranteed to service an instruction in given time without being interrupted. This is the purpose of the Latency test to determine what that time is. I think I may have over simplified this but it should help to understand why we need to do the latency test. Mach3 uses a special driver to help get around the fact because Windows isn’t a real-time OS. It does a similar test to determine if the PC is OK by looking at the interrupts. What we don’t want is the CNC software being interrupted while its making a cut and causing missed steps or errors in the cut path.
Before we start any configuration we need to run a Latency test to use in the Step configuration wizard. You need to abuse the computer, not physically. Open up several programs and move the mouse and open lots of windows. Let it run for about 15 minutes and then note the Base Max Jitter value. The test I did gave me 41801 which is OK but heading towards 50000 which is considered the maximum
Installation on a dedicated disk
Once you have the Max Jitter value we can install from USB drive
Select Install Graphical
Most of the option can be left at default values. Just give the machine a name when it asks and a username name and password. When it gets to the “Partition Disk” screen just select “Guided – use entire disk”
I would advise not enabling networking if you have a dedicated machine. When running the Latency test I found when abusing the machine as they suggest it made a significant difference. To get my g-code on I use a USB thumb drive. I prefer to have the machine dedicated to being a machine controller.
Just reboot and we are ready to configure, that was easy. Video shows each step if you’re unsure.
Stepconf for TB6560 Motion Controller with Linux CNC
I’m using the Chinese TB6560 4 axis all in one board the same one my Mach3 system is configured for.
From the menu select Linux CNC Stepconf Wizard
If this is you first configuration then select New and configure similar to below. You can call the Machine Name anything you like. Then add your value from the Latency test to the Base Period Maximum Jitter
This next screen took a few tries to get right. The OX has two steppers on the Y axis and as my controller board is a 4 axis I can use this to drive the slave stepper. You can see that the Y step and direction are on two sets of pins but one is inverted. Don’t test this axis as it doesn’t drive both steppers. While I was getting this working I had the belts slack so I could check the steppers were going in the right direction and both working. Once I was happy I re-tensioned the belt. My limit and home switched are all wired in series and on Pin 10.
Set your X axis as below, you can test this Axis by clicking on the Test button
Don’t test the Y axis as it doesn’t drive both steppers.
The Z axis is configured as below.
You should have a working configuration now. On the desktop you will see a Linux CNC logo icon with the name of your router, double click on that and Linux CNC will start.
Testing Y axis with dual stepper motors
If you switch on your machine and click the power icon and use the up and down cursor keys the Y axis should move. Holding shift will move it faster. Make sure it moves without any missed steps. See my video at https://youtu.be/F4xHCwtaS3w?t=26m17s to hear what it should sound like.
Cutting your first CNC part
This is what it’s all been about and if you watched the video and configured your machine correctly we should be ready to make the first part.
Here’s the gcode http://www.rckeith.co.uk/download/tricopter-frame-Linux CNC/ if you want to try it out. Just use a 3mm bit and 3mm or 1/8″ LitePly and it should work just fine.
I hope this helps getting to grips with Linux CNC. As I said it bugged me that in my early days I almost had it working but now it works really well. Linux CNC is a great piece of software and still evolving. CNC can be a money pit and as a RC hobbyist I like to have the tools to make good reliable parts, but don’t want to spend my life savings on CNC software and machines. Linux CNC can help here and luckily there is good free software to generate g-code such as Fusion 360.