Friday, November 19, 2010

Amateur CNC mill show and tell

Thought I’d have a go at something a bit mechanical for a change. I bought a cheapy pillar drill from Screwfix a while back - around £50 if I remember right. It’s a lot of machine for the money:


Mmm… precision drilling… mmm…


OK, back to me: CNC mills are all the rage at the moment - loads of people seem to be building them, from huge ones through to tiny little ones you can knock up for very little money. If you can get the parts.

I’ve got loads of electronic junk in boxes, so I had a dig around. These are full of useful bits:


It’s a scanner - a disco/nightclub light that can change colour and, using a motorised mirror, shine the beam around the room in carefully choreographed patterns. The motors it uses are stepper motors:


These things are the heart of a CNC machine - you can control precisely how much its shaft rotates, unlike a normal motor that spins freely when you give it power. These ones are a bit small… still, worth a go.

I managed to scavenge a load of bearings and rods from old printers. Old dot matrix printers (if you can find them) tend to have lots of beefy bits and pieces in them, from linear bearings/bushings to chunky stepper motors. My ‘Never Throw Anything Away’ ethos is finally paying off…

I bought a few lengths of leadscrew from Marchant Dice (yay! UK supplier of CNC bits! Not as cheap as you can get stuff in the States, mind. Sometimes seems like every house in America comes with a fully equipped machine shop and every town has a specialist hardware shop…)

I also bought a matching tap, to make the nuts that’ll be driven by the screw. Cheaper in the long run than buying a load of pre-made nuts. Here’s one being made - cut off a bit of nylon:


Drill a hole in it:


And here it is after being tapped to match the screw:


A few more threaded holes so I can fix the nut to the moving bits:


Here’s one threaded onto the screw and mounted on a motor. This will be part of the Z-axis, moving a drill up and down over the thing I’m milling:


First: X-axis stuff

Here’s the X-axis, so the drill can move left and right over the workpiece.


One of my dodgy motor couplings:


These are the main source of problems on my mill so far. You’d think it would be fairly straightforward to put a little hole all the way through a bit of nylon, then drill the hole out to a larger diameter for half its length. Not for me - no matter how hard I try (and believe me, I’ve got through a lot of nylon) I can’t get the holes to be perfectly in line, so the leadscrew is always slightly wonky; it’s not a big problem but if means the motor has to work harder and it makes the machine a bit noisy.

One thing that helps mitigate the problem is having nice solid linear bearings. The rails and carriage here have to carry a fair bit of weight - the Z-axis carriage, motor and drill all have to be mounted on it, and I didn’t want it twisting or binding.


To test it all worked, I made up a quick and dirty motor-controller circuit with an Arduino and a darlington array:


It’s extremely simplistic but it works well enough to drive the motor backwards and forwards. This is the first real milestone - seeing something move under computer control! Woo!


Next: Z-axis stuff

The drill has to be able to move up and down over the work, so it runs on two rails scavenged from old printers. To make sure the rails are absolutely parallel, I drilled the holes for both ends of the supports at the same time:



The rails stick in the holes. Nice and simple, perfectly parallel. These rails are 6mm diameter rods taken from an old scanner.


The motor mounts on one end and turns the leadscrew which will lift and lower the drill:


The bearings that run up and down the rails need a larger diameter hole to mount them, and no matter how carefully I measured and drilled, I couldn’t get the holes in the right places; they were always out by some little fraction, and wouldn’t run smoothly. So I had to bodge it: I drilled holes larger than they needed to be, fitted the bearings to the rails and put it all together, then cemented the bearings in place with some two-part metal putty:


The carriage runs nice and smoothly up and down the rails.


I made an extremely crude mount for a Dremel mini-drill - it’s just a slot hacked out of some plywood, but it seems to grip the Dremel tightly enough. We’ll see.


I mounted the drill to the Z-axis carriage and mounted the whole lot onto the X-axis carriage:


It’s bloody heavy. I’m pretty astounded it actually moves - they’re tough little motors.

Y-Axis stuff

So - the drill can now move up and down and left and right - all that’s left is forwards and backwards. Rather than move the drill forwards and backwards, I’ve chosen to move the workpiece instead: it’ll sit on a little platform on runners. I picked up some cheap bearings from eBay and fixed them to a bit of angled aluminium:



Each bearing needs a nut and bolt and loads of washers to space it correctly:


A complete one (there’s two of these runners, one for each end of the work platform):


They sit nicely on top of a round bar. Again, scavenged from a big printer :)


I initially thought it would all work fine if I had the runners sitting over the bar at 45 degrees (as I’m holding it above), but once I had the machine going it was too easy for the motor to pull the runners off the bar sideways. I ended up redesigning the platform so the runners could sit at 90 degrees, like this:


This way the platform and bearings are kinda jammed inbetween the two support rails, stopping it from twisting when the motor tries to pull or push it. It’s not perfect, but it works. The other end:


I really struggled with the motor coupling for this axis: if the leadscrew isn’t mounted perfectly in line with the motor shaft, it tends to wander in a circular motion and push the platform up and off its runners. I managed to codge a flexible coupling together:


The white stuff in the middle is polystyrene foam to act as a shock absorber and spring. It works better than nothing, but it’s damn noisy. Sounds like something’s grinding - it’s just the threads of the little screws rattling against their holes but it sounds much worse :/

Up and running!

So the machine is complete!


Complete to a minimum level of functionality, that is: it needs limit switches so the computer driving it can tell where the carriages are, and it could do with having various probes and tool-depth sensors before it can be used properly. But still - I loaded up TurboCNC on an old laptop (after spending a day and a half trying to get the laptop to wake up in DOS rather than Windows) and connected it all together and did my first computer-controlled engraving:


Mmm… circular… [drools]

And just to test it can handle more complex stuff:


So that’s where I’m at. Gotta say a huge thanks to everyone who’s put so much information about their own CNC mills online - I knew next to nothing about these things before I started, but there’s a ton of info online if you want to have a go. It’s unbelievably exciting watching it work and knowing that I made it :) Yay!!!!!!1111!1!!!!!!1!!!PONIES

More updates on this on my blog here

Thanks to: - The site that inspired me to have a go, and convinced me that plywood could work. - This guy is astounding - he not only knocks up CNC machines but he casts his own parts from aluminium too. The site is full of interesting stuff, you’re likely to lose a few hours there.
… there should be a load more links here but I can’t remember them all. Google ‘DIY CNC’ and you’ll find loads of stuff to get you going :)