Saturday, 1 September 2012

CNC drawing and drilling

Tonight we got the z-axis (drill up/down) servo working and managed a full test using a felt-tipped pen in place of a drilling head. The test was almost a complete success!
Ok, not entirely, but pretty much there, except for a bit of tweaking...


There's still the small issue of backlash to compensate for (the motors have a massive amount of "slop" in them, meaning they get less accurate each time you change direction with them).

Instead of a "traditional" cnc controller, we built our own PIC-based board, which doesn't use g-code but rather accepts an x- and y- co-ordinate (distance to travel in each axis, counted in steps) and a "go" command, then moves from point-to-point. At the end of travel, when the machine sends back a "arrived at point" signal to the PC, we send a "peck" command to perform the drilling action (this will be modified with an actual cutting head).

The results were pretty impressive, even in this rough-and-ready form. Here's the input file:


And the actual output drawn on the cnc machine:


You can see the output is pretty similar. Where some of the dots don't line up exactly, we can see how this relates to one (or either) axis changing direction - this is where the backlash compensation needs to be implemented, to keep these turns as tight as possible.

Hopefully we just need to do a little bit of tweaking to get a 100% accurate output from an NC drill file. But for a first-run test, it's very encouraging. Obviously replacing the steppers (with better/more expensive ones) and introducing a belt rather than rack-and-pinion should give us a bit more accuracy - but this flies in the face of the original design brief, to make the machine as simple (and as cheaply) as possible. So we'll do a little more work on this design to see how tight we can get it before exploring alternatives....