Thursday, 23 June 2011

Software updates

No pictures in this one as my only real changes have been software ones.

I started by adding more and more functions to the python file I'm using to command the CNC pen machine, but after a while I realised that the control software I'd written was really bad, and the backlash was really really bad. I hunted for an algorithm to control the motors better than they had been, and after many dead ends, found a video referencing PID control which then lead me straight to the wikipedia article...

So, I planned to implement this algorithm in my arduino, only to find someone had already done it... so, I dropped it in, and after only about an hour of tinkering, managed to get it to control all three axes with much greater accuracy and speed than I had managed with my home grown pile of ifs. Excellent, now I had a machine that was quicker and more accurate at it's own motor control.

Backlash is still a major issue, and because of the speed of the new system (the new code makes it quicker) the bendyness is more of an issue too. I set to figuring out a final solution to this problem last night, looking over my collection of lego and trying to find something that looked like it might keep backlash at a minimum, but even though I prototyped a few designs, they all had problems. Some were just clumsy, some where not large enough to provide enough motion, some where just as sloppy as the gears I'm currently using, and one turned out to be impossible.

However, there is still one technique that I haven't tried that might solve it, and that is using cables. I haven't got any real cables, but lego beams with cotton thread as my pulley and belt system might turn out to be good enough. I'll see how it goes, and use the left over pieces to reinforce the Z-axis (which has been the source of the problem with respect to bendyness)

No comments:

Post a Comment