Saturday, 15 September 2012

CNC software update

One of the main problems with getting absolute accuracy with our CNC drilling machine is overcoming backlash. We've loads of it. Not only between the cogs and the gears on our gantries, but inside the cheap little stepper motors too. Because the motors themselves are geared down inside, there's loads of backlash/slack on the actual motor spindle - and that's before any slack we introduce with our plastic push-fit rack-and-pinion arrangement to drive the axes.

All that said, we're still getting pretty good results, by compensating for backlash whenever we change direction in each axis (for example, whenever the x-axis gantry is travelling left-to-right, and we need to reverse it, to move right-to-left, we add in an extra number of steps to the move command, to take up any slack in the system).

Looking over our software, the "move-to-nearest-point" may make pretty efficient use of time, but because of the number of times we change direction over the course of drilling a board, there are plenty of opportunities for backlash/slack to affect our accuracy.

We've changed our driver software to use calculate different paths now.
Previously, it started at one point and simply picked the nearest undrilled point to the current location:


Now, we're going to move the head to the top-left-most point on the board, and drill them in a strict left-to-right, top-to-bottom sequence:


Although not shown on the screenshot, we're also planning on "overshooting" any point when moving the gantry from right-to-left, before moving to the correct location. The reason?

Doing things this way, we should help reduce (if not eliminate) backlash/slack in the y-axis, since the bed will only ever be travelling in the top-to-bottom direction. By overshooting each point when travelling from right-to-left, we're also ensuring that every hole is approached from the top-left corner so the system should be tight when travelling from top-left to bottom-right.

Hopefully this will help reduce the amount of backlash in the system, and produce a more accurate drilling action.

That's the theory taken care of.
The software is almost ready for testing.
There's only one thing left to do - and that's try it out!