While 3D printing is all the rage at the moment with hobbyist tinkerers and the maker community, many components can still be manufactured more efficiently using subtractive technologies such as CNC machining. This series of blog posts will give you an insight into what is required to convert a relatively cheap manual milling machining into an automated machine run by a computer that can cut much more complex parts.

I’m going to do this article in a several parts, as it is a fairly long story.

 Background:

Since I first learned to use manual lathes and mills while studying engineering, I have always wanted machine tools in my garage. I have a lot of hobbies and I’m always wanting to make a little thingy to connect some widget to some other gadget. About 5 years ago, I put a hold on my design/drafting contracting business and joined forces with a manufacturer who was selling componentry into the defense and aerospace industries. My first project there was to design/fitout a prototyping lab. We bought a laser cutter/engraver, and an old 3 axis router that was dated, but mechanically sound. I quickly found that the ancient controller/software was a huge limitation and stumbled into the world of DIY CNC. For about $1000, I fitted a Geckodrive G540 Digital Step Drive and a new power supply. These components were less than a 10th of the size of the original controller and far superior in specification. Not only did they open up options to use other software, but they meant that the machine was now capable of simultaneous 3D machining rather than just 2.5D as we bought it. The machine was a dream to run after the conversion, and went from dimensional accuracy of +/- 0.5mm to +/- 0.1mm, which was more than accurate enough for the work we were doing.

After completing this project and moving on from that company, the CNC bug had bitten hard. I needed to have another machine, but this time I wanted more power, more precision, and the ability to work with harder materials. After saving hard for a while, I purchased a DM-45 3-axis 2.5HP dovetail-column mill from Scott Machinery in Christchurch. It was an exciting and nerve-wracking time lifting all 350kg of it off the back off a trailer with an engine crane. Before long though, it was happily in it’s new home at Gecko Racing HQ, bolted to the ground.

DM-45 Manual milling machine arriving at home

When it arrived, I noticed a rather annoying fault. Every now and then, the Spindle Stop button wouldn’t actually stop the spindle, and this highlighted an even more frightening design flaw. When the spindle was still live after hitting the stop, even the big red Emergency Stop button wouldn’t kill it. The only way to shut it off completely was to pull the plug. I quickly arranged for the supplier’s electrician to pay me a visit and he found the issue. He ended up changing the wiring so that the emergency stop was a true kill switch and we took photos of the process which have been used to change the design I believe. Another issue, was the tray that catches the coolant. It had been drilled to allow the machine’s hold-down bolts to pass through it into the base, but no attempt to seal around these holes had been made by the factory. A friend of mine welded some little tubes around the holes to keep the coolant from filling the cabinet in the base. With these mods done, I was ready to start using it properly.

After milling around (sorry) with it for a while, I was itching to begin the CNC conversion. Winding handles is just frustrating.

The Mechanical Conversion:

I spent a little while modelling up the main components in Inventor, and set to work designing the various brackets and drives for the motors that would take the place of the winding handles.

The Inventor Model of the DM-45

I decided early on, to opt for stepper motors as opposed to more expensive servo motors. Stepper motors are disadvantaged by the fact that they run “open-loop” which means that if the controller tells them to move to a certain position and something gets in the way, it doesn’t know. This means that the next move will start from the wrong position which causes all kinds of issues. This error can be very minor, where the system occasionally just misses a few steps here or there, usually from trying to accelerate the load too quickly, but the error can build up over the course of the CNC program and lead to large innacuracies. With all of that said, stepper motors are significantly cheaper, and if the system is setup and tuned correctly, the error can be managed or eliminated.

Another cost decision was to stick with the factory trapezoidal-thread leadscrews on the machine rather than immediately doing a ballscrew upgrade. The leadscrews are the threaded rods that turn when you turn the handles to move the bed forward and backwards, left and right. Ballscrews are far superior in terms of smooth, precise motion and reduced backlash, but also considerably more expensive. The machine already had pretty decent size leadscrews so I thought I’d do the conversion “as-is” and then decide on whether to upgrade later. This time has now come, and I’m just beginning the upgrade process. I’ll hopefully document this in a “Part 5.”

I found a supplier and selected some NEMA-23 Frame motors. I wasn’t very scientific about this step and basically just bought the motors I could afford that were of a size that was practical to mount. I figured that I’d then just gear them down to increase torque and sacrifice a bit of outright feed speed. After some basic torque calcs, I settled on a 0.75:1 ratio between motor and leadscrew. I wanted to use a toothed timing belt to eliminate any chance of slippage and keep backlash to a minimum. I found a suitable setup which consisted of T5 pulleys and the matching belt, one with 19 teeth and the other with 25 teeth providing a 0.76 ratio which was close enough.

I decided to do some checks to make sure the resolution and theoretical maximum feed speed would be sufficient. A stepper motor has a series of coils inside it which can be turned on in varying combinations to drive the motor in small movements, or steps. The motors I had chosen to use were 10x microstepping with 1.8 degree steps. This equated to 200 steps/rev or 2000 microsteps/rev. The leadscrews on the machine have a pitch of 3mm which means that for 1 revolution of the driven sprocket, the machine would move 3mm. Remembering the 0.76 drive ratio, for one turn of the leadscrew, the motor would turn 1/0.76 or 1.316 times. That 1.316 turns of the motor equates to 3mm of table movement.

1.316 revs x 2000 microsteps / rev = 2632 microsteps / rev of leadscrew

And because that 1 revolution of the leadscrew equates to 3mm of table travel, we get:

2632 microsteps / 3mm = 877.333 microsteps / mm of table travel

So you can see here, that while a large number of steps means you can theoretically move the axes a very small amount (1/877th of a millimeter or ~0.001), the flipside is that if you want to move fast, say 5000mm/min, you are going to need to generate a huge number of distinct steps very quickly. Let’s do some more maths:

(5000 mm/min) / 60s = 83.33mm/s

So if we want the table to move at 83.33mm/s, we will have to somehow generate:

83.33mm/s x 877.33microsteps/mm = 73,107.9 microsteps/s

Or in other words, we would need to generate a clean ~73KHz step signal.

So where do these actual steps come from? In a fancy commercial controller, there is a motion control board which generates the signals to send to the drive motors. In LinuxCNC however, a software step generator takes the place of the motion control board. In reality, the PC that I was using as the machine controller could only output about 1/3 of the steps/sec calculated above, which meant that the theoretical maximum speed of the axes was only about 1700mm/min. In actuality, I never managed to get above about 500mm/min without missing steps or stalling the motors. There are a large number of factors at play here, but speed is a frequent problem with software step generation.

Now if you’re not asleep after that, I’ll get back to the mechanics. After doing the motor calculations, I was happy with their performance on paper so ordered them along with the bits and pieces I needed for the belt drives and the aluminium stock to make the brackets to house them.

Eventually the components arrived, and I set to work machining (by hand of course) the mount plates:

One of the stepper motors and drive components

 

Machining the Mount Plates

Here you can see the mostly finished x axis drive assembly mounted on the table:

The (mostly) finished X Axis Drive

I followed a similar process for the y and z axes and got everything test fitted, before removing the whole lot and going back to manual handles while I designed and built the electronics. Details of that will be in Part 2.

Z-Axis Drive Mount Fitted

And there you have it, Digital Prototyping of modifications to a machine that will be used to make physical ones.

[subscribe2]