Studio of Bill Ooms

Bill Ooms

Building A Computerized Ornamental Lathe

Stepper Control Software

For several years, I controlled the steppers directly from my own custom software. However, there were some severe limitations to that approach. You don't want start-stop motion when going from point to point -- you'll see marks in your work. You want the movement of all 3 steppers to be closely coordinated, and you want smooth acceleration/deceleration as you go through the points of a curve. The solution to this is called "coordinated motion" with "trajectory planning" as used in CNC equipment.

The two most popular CNC programs are LinuxCNC (formerly called EMC2) and Mach3.

After spending some time with Mach3, I came to the conclusion that it will not work for our application. The reason comes down to this: for very smooth curves, we will give a lot of closely spaced points to the program. Even though our cutting speeds are relatively slow, the fine resolution of the points means that we're sending out points very fast. Mach3 has some internal limit set on how fast they calculate the "trajectory". It seems to be about 5 times a second which is no where near fast enough. It has nothing to do with the speed of your CPU -- my CPU was idle 99% of the time. The result is that the first few points get cut smoothly and then you get jerky start-stop motion. I was unable to find any solution to this problem, and other Mach3 users told me that this is a known limitation to Mach3.

Fortunately, the other choice (LinuxCNC) works very well. Yes, it has some quirks and there are some things I dislike about it. But it does the job very well. Most important, it's well supported and there is a large user community out there. Many of the people on the forum know the inner workings of the software and have written special "patches" to the software for me.

Other things that don't currently work are Eckler Software's rt-stepper. I continue to monitor the progress of this work, but it's not there yet.

There are a number of hobbyists working on software to run on small Arduino-like boards. As of this writing, they aren't there yet either. Some approaches don't have any acceleration/deceleration control or trajectory planning. Some only do linear axes (not rotary axes). Some don't have any provision for limit switches or emergency stop switches (which I think is dangerous). But perhaps there may be some other solution coming for this approach in the future.

Given that we need to use LinuxCNC software to control the stepper motor motion, the rest of our task is to make all the CNC-like stuff hidden away from the user as much as possible. Our goal, after all, is ornamental turning -- not CNC. The good news is that LinuxCNC software is extremely flexible and can be customized to the point where it is largely hidden away from the user.

It's easy (and free) to download and install the LinuxCNC software. You can download and burn a CD that will install the Linux operating system (also free) along with the LinuxCNC software.

Note: I'm still on the older version of LinuxCNC 2.6.10. I've not yet tested the newer v2.7 but I plan on doing that soon. Others have reported that it is a stable version.

A few things to note: If you have 4GB of RAM (or more), DON'T be connected to the internet when you install the software. It will attempt to do an update that allows the use of the full 4GB+ of RAM, and that update doesn't work with LinuxCNC. Do the install from the CD, then connect to the internet to do any updates to the Ubuntu operating system.