With the success of threading with the Arduino I quickly moved onto my next desired function which was to add a routine which could automatically take a simple chamfer on the end of the stock. Very soon I realized that this routine should include a simple taper.... at this time I'm thinking "Great, this is new function which can be easily accomplished without the need for a cross slide or dogs to hold between centers" - what great added value here. It didn't take me too long in creating this program that I realized what I was creating was simply point-to-point motion performed repeatedly and controlled with varying depth of cut.... and this is where my simple addition to the program ballooned up to a function 3x more difficult to create than the threading routine. The outcome is a function with accept ANY number of operator input points with roughing and finishing depth of cuts and automatically cuts the profile.
Under construction still..... Video will be posted soon - program works well but still working on a couple bugs.
OK - done and success.... see below video - will update post in coming weeks to detail how this is accomplished.
The above video goes a long way to explain how threading is done so I'll only add a few highlights below. The answer to the title question, "Threading with the Arduino Uno: Can it be done?", is a resounding 'Yes' (although I had to move to the Arduino Mega board due to storage space available for variable definition). Honestly this function has far exceeded my expectations and I now welcome jobs with threads where previously I dreaded the gear change and table lookup required with the original geared lathe - it's a joy to use.
There was a few key points I needed to establish to realize this function. (will expand in the future)
Some thoughts prior to starting (retained text but 'history'):
So as I've stated, I would not have converted my Lathe unless I was able to still retain all the manual controls without too much effort. I've accomplished this so far above my expectations but one last, and most difficult, manual control is still outstanding: Threading. My original thought was to simply let the Mach4 side of this conversion perform the threading function because everything I read about threading with a slow controller was labeled impossible to extremely difficult to get right. So I was fine with this one aspect not in the Arduino code; so I thought. Problem is I couldn't seem to shake the lingering feeling that I didn't finish a job, the feeling became a constant nagging, which led to me sitting around starring into space as my mind ran through the possible solutions, and now I'm convinced I can perform threading with the Arduino. So this blog is about my attempt to perform threading with the Arduino Uno. It is NOT (yet) a success story.
Now a side note for the reader. I realize that the web is an amazing place for information from people smarter than I and could have the solution all worked out for this already (yet 1 year ago it was still illusive) but as is typical I'm going to work on this problem with my head firmly buried in the sand. This is not arrogance, it's simply my journey; my puzzle which I need to figure out and refuse to look up the solution - that would be a cheat. So the "note" for the reader is that my results may certainly not be the best way to implement threading with an Arduino.
Currently for normal half nut feed rate operation I simply look up RPM once, calculate feed rate and away I go. On testing this, I realized that not only do I have small errors due to time spent executing code but the actual spindle speed can decrease by 2-4% when engaging the cutter into the work. These small errors will be problematic for threading and therefore I'll need to actively monitor the spindle RPM and constantly adjust the feed rate with each index mark of the spindle. Currently I only have a single index mark monitoring the spindle and although this limited monitoring input may become insufficient, to increase the monitoring to say a 2000 count encoder would certainly not be ok as the arduino would not be able to handle this amount of input while trying to send multiple motor counts. I may find that this is an issue - for now I start with one index pulse per spindle revolution.
Also must "start" at the same z location on each pass... this is no problem as current program always keeps track of the absolute motor count from program start. Just need to start the z motor motion very slow and look for that first index before I ramp up to the requested feed rate.