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:

5189789768_5d22872dc2.jpg

Mmm… precision drilling… mmm…

5189794370_df3121f944.jpg

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:

5189852958_52f8c2b13c.jpg

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:

5189856170_9721a9d040.jpg

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:

5189208843_dab63107b9.jpg

Drill a hole in it:

5189213185_54718da781.jpg

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

5189216497_7d05396c92.jpg

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

5189818064_78a2bc1f69.jpg

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:

5189223283_8773f55215.jpg

First: X-axis stuff

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

5189772160_edc134604b.jpg

One of my dodgy motor couplings:

5189177011_aeea1d7857.jpg

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.

5189778846_e35a6342da.jpg

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

5189782210_781e5f3695.jpg

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!

5189187635_339e433847.jpg

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:

5189825932_70e981b453.jpg

5189829754_23cfb6c43a.jpg

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

5189234421_e5de6802dc.jpg

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

5189860810_782cc058fa.jpg

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:

5189846494_1a16ee41f0.jpg

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

5189251777_e6c0bed2b4.jpg

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.

5189869752_1b5359ef55.jpg

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

5189872842_2534ca2d69.jpg

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:

5189198115_801bb137d0.jpg

5189199623_a47d55c969.jpg

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

5189201283_69a27a0fc0.jpg

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

5189800662_118625fe7c.jpg

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

5189205345_49d198c056.jpg

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:

5189839622_c928036127.jpg

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:

5189245495_f28b462a81.jpg

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:

5189236883_c960742d6d.jpg

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!

5189284021_ceaf0e4e4b.jpg

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:

5189877446_732b1ab2e9.jpg

Mmm… circular… [drools]

And just to test it can handle more complex stuff:

5189288009_a4cacaa6b3.jpg

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:

http://makeyourbot.org/ - The site that inspired me to have a go, and convinced me that plywood could work.
http://buildyouridea.com/ - 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 :)