Friday, June 17, 2011

And now for something completely different....

As is becoming customary with this blog, just as one thing really starts getting going, another thing comes along and knocks it into a cocked hat. The same thing happened again this week. Only the thing that came along was pretty impressive and deserved some real attention.


It was a CNC Machine!

Yay! CNCs are great. They can cut shapes out of all kinds of materials. Laser cutters are great too (we have one at BuildBrighton) but they're limited to relatively thin material (acrylic, sheet mdf, thin plywood) and can't cut anything metallic. So for making enclosures, shapes, plastic objects and so on, a laser cutter is a pretty cool tool. But etching and drilling PCBs is where they fall short.

A CNC router, however, can do all the stuff of a laser AND drill PCBs. Ok, the cutting head is quite a bit fatter than a pin-point laser, so shapes aren't as intricate, but did I mention that it can drill PCBs? That's what we found so exciting about having a massive wooden crate arrive last night with said CNC machine inside it.

After it was unpacked, assembled and gingerly switched on, the big sturdy metal gantry sat there, filled with potential energy. When the control panel was switched on, the stepper motors on each axis suddenly had resistance and the rods were difficult to turn by hand (when switched off, you can easily move the gantry by turning the rods manually).
The motor control gear looked somewhat homemade, but very robust - the control board had a great big fan on it, and plenty of heatsinks all over the place! The CNC came with a genuine copy of RoutOutCNC and a few sheets of paper with some handwritten notes. We fired up the software but with no idea how to use it (and no inclination to read the instructions!) we quickly got bored with just pressing buttons and getting no response from the machine.

The control gear lives in it's own enclosure, unlike a lot of cheaper CNCs which have it under the machine, where it can clog up with swarf and cutting debris

Laser Steve from botbuilder had previous experience of CNC machines, having built one of his own, and suggested we install Mach3 and use that to control the machine. We duly got the demo version of the app and tried it out. With partial success, we managed to jog the gantry to the left, by pressing keys on the PC keyboard. With the gantry at it's limits, we had to find a way of getting it to return again! This meant poking about in the Mach3 config screens - specifically the Ports and Pins section, making sure that the stepper motors used to drive the X,Y and Z axis were connected to the appropriate pins on the parallel port (or, rather, we told the software which pins on the port each axis stepper motor was wired up to!)

Yes, the Mach3 interface is seriously horrible!

Luckily Tom from almostobsolete.net was at BuildBrighton last night and he's spent some time playing about with stepper motors too. It didn't take long for him to have the machine jogging backwards and forwards along all three axis.

Something that did cause a problem was after a few seconds of movement, the stepper motor(s) started making a "slipping" sound - they would spin the leadscrews for a short while and then make a nasty screeching sound and the motors would stop spinning. At first we put this down to the couplers (the bit of nylon connecting the stepper motor to the leadscrew) slipping, but we soon discovered that it was the motor itself that had stopped spinning.
By slowing down the ramp up and down times in Mach3, it seemed that the software was trying to control the motors too quickly - while they were ramping up, they span perfectly well, until they hit a point where they would slip and screech. By reducing the spin speed of the motors down from 120 inch/min to about 20 inch/min, this rather distracting noise was eliminated.
(this might be a bit overkill and too slow, and we've yet to discover where the speed issue lies - it might be the old PC we used as a controller can't send the data quickly enough, it might be that the driver board can't handle the data arriving any quicker than 20"/min or it might be the stepper motors themselves: we don't know enough about any of the hardware to say what the problem is just yet!)

But with the ports & pins settings adjusted and the motor max speeds reduced, the CNC finally came to life and could be controlled properly.

We tested it be loading some g-code for simple shapes - starting with a square, which we then amended (by hand using Notepad) to draw a triangle, and finally a circle. Tom even went so far as to create his own g-code to draw arcs and connect points with lines and paths!

Drawing PacMan with a marker pen instead of a router installed. We figured that if we could change the paper quickly enough between frames we could even play a game ;-)

We've got great plans for this machine and hope to be turning out machined shapes and components and PCBs in the very near future.....

No comments:

Post a Comment