Wade'O Design
  • Home
  • CNC Router Build
    • Overview / Gallery
    • Design Details
    • Documentation (CAD, Dwg, BOM)
    • Special Topics Blog
  • CNC Lathe
    • CNC Lathe: Design Details
    • CNC Lathe: Documentation
    • CNC LATHE: Special Topics Blog
  • Shop & Tools
    • Shop Tour
    • Restorations
    • Tool Blog
  • Projects
    • Tool Organization
    • Making Flat Planes
  • About
  • Home
  • CNC Router Build
    • Overview / Gallery
    • Design Details
    • Documentation (CAD, Dwg, BOM)
    • Special Topics Blog
  • CNC Lathe
    • CNC Lathe: Design Details
    • CNC Lathe: Documentation
    • CNC LATHE: Special Topics Blog
  • Shop & Tools
    • Shop Tour
    • Restorations
    • Tool Blog
  • Projects
    • Tool Organization
    • Making Flat Planes
  • About

CNC Lathe: Special Topic Blog

Threading with the Arduino Uno:  Can it be done?

12/20/2017

18 Comments

 
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)
  1. Data base
  2. Restrict feed rate, single pulses only.
  3. Establishing a zero
  4. Post thread.  Inspection, adjustment.
  5. Operation - determining 'start' and adjusting on the fly.

​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.
18 Comments
Andy K link
1/28/2018 09:06:13 pm

Hey, this is exactly what I’m looking for to upgrade my antique lathe. It takes longer to set the gears than to thread a bolt. Have you progressed any yet? I’m ready to let a kit but don’t know what I need yet. Any ideas on supplies to gather up?

Reply
WadeO
4/18/2018 07:35:56 pm

Hi Andy - Progress is good BUT this program is very specific for a clearpath servo motor and won't work with anything else. In addition, all the other hardware needs to be same or very similar.

Reply
Jesse Nowak
9/10/2018 06:36:10 pm

Wonderful work WadeO! Contemplating if using a smart stepper driver such as http://misfittech.net/3-2a-nema23-smart-stepper/ would bring stepper utilization closer to realization; contemplating how to handle modified motion planning requirements/options.

James deal
4/18/2018 07:16:41 pm

Love your website. I tried download your cad models and opening with Bobcad. The OEM model was successful. the parts model keeps crashing BC. Is is me, Bobcad or the model is corrupt. any help would be apprecated

thx

Reply
WadeO
4/18/2018 07:34:01 pm

I've had quite a few downloads of this file without anyone mentioning an issue so I'm leaning toward a BC issue. Or maybe a zip download issue (maybe try downloading once again fresh).
What format are u trying to import into BC? Is it the *.stp (step) or *.x_t (parasolid) format?

Reply
Paul
6/30/2018 09:37:10 am

Brilliant! Just shows how little cpu power you need to accomplish big things. As you add more features are you looking to review to input system? 3 buttons is beautifully simple, but perhaps a rotary switch or 2 would speed up the input and allow the 3 original buttons to be freed of some functions, simplifying their operation?

Looking forward to seeing what comes next.

Reply
WadeO
7/10/2018 04:45:56 pm

Thanks Paul - I've been pondering your suggestion a bit as you are correct (too much going on). Problem is I only have one wire left on my CAT5 connection (don't want to add more cable). This would allow one additional button which may help. Another option is replacing a button with simple encoder but I'm not sure this would benefit choosing the values any easier - I'll have to try this out.

Reply
Malte
12/29/2018 06:20:43 pm

Thanks for the CAD models and the good info.
I'm in progress converting my lathe which is slightly different but same size. Mechanical side is getting close to finalization.

On the control side I'm taking a different route and going for Machinekit on a Beagle Bone. Initially with the available GUIs but it would be nice to get a custom lathe touchscreen GUI going in the future

Reply
Malte
2/14/2020 06:03:00 am

I ended up with this:

https://forum.zerspanungsbude.net/viewtopic.php?f=43&t=36394&sid=d708b093b4de5c4fd4edf1a8e05eb222&start=10#p453365

https://www.youtube.com/watch?v=vVND7ClvgjU

Reply
Paul McBeath
2/2/2019 10:06:19 am

Just wondering how the project is going? Haven't seen any updates or youtube vids for a while. Hope it's all going well.:-)

Reply
Mark Green
2/16/2019 12:49:40 pm

I am starting to get things laid out to convert my G0602, but I could not find the G-code file for the motor mounts. This looks like a great upgrade, have you considered doing this for the G0755?

Reply
WadeO
2/20/2019 05:19:31 pm

Mark - I'd have to dig up the files and then likely write up a process sheet to explain the part setup 0,0,0 etc. Could take some time - are you really making these parts?

Reply
Mark Green
4/2/2019 12:32:59 am

I am very interested in converting and actually I see enough information to make them, just going to take the time to make the files. I am planning on visiting Fruitport at the end of the month and wonder if you would have some time to meet?

Steve Schmidt link
6/16/2019 02:11:51 pm

Couple quick Questions:

Has Arduino code been released?

THREADING
Does the Arduino thread precise enough for use? I did see your video, but website seems to contradict
Does Arduino do imperial threads?

Are you still actively working on this project.

Thanks! It really looks good and seems to be the way I would like to go with my retrofit

Reply
Alan V Reinhart link
11/4/2019 10:21:31 pm

Greetings! I’ve spoke to you before about your amazing documentation and excellent ELS design. Before finding your site I had found the German “ELS3” by RockeTronics and purchased it. While is does work well, the designer has no interest in selling to the US - and hence no English translation of his manuals are available.

It might be of interest to look at his next generation- the “ELS4”.

But I’m writing now to alert you to the world of “Teensy” mpu’s from www.prjc.com. These powerhouse processors are based on ARM 4 SOC’s.and run at 72, 120 & 180MHZ - and have hardware floating point instructions. But what is so awesome about the work of Paul Stofegren, (sp!) the originator of this family of boards, is that he has produced an extension to the Arduino IDE (TeensyDuino) wich joins in with the latest Arduino IDE - but produced code for these ARM processors. Thus you may be able to drop your current Arduino code into TeensyDuino - and run on one of his boards - at 180MHZ!

I wish I had realized what was going on with the Teensy project years ago! Take a look at their forum - there are some very “heads-up” programmers and techs there... could really supercharge your project.

Regards — Alan R.

Reply
gary r leigh
5/9/2020 05:01:58 am

Did you ever consider using Raspberry Pie as a controller . For most people you still have to plug in many coordinates which have to be entered one by one that is a process. The Raspberry Pie has visual ability because it's a computer so if i gave a start and end point took a drawing or 3D image or Scan i could retrieve the dimensions and the computer would create G code to run it That makes set up and machining faster and allows visual cross check. It's what you have done plus. I am not suggesting full CNC but a version of it that makes operation less prone to mistakes. Mini lathes are a ideal way to test this concept as is CNC routers ,etc. To cut contours you have to program each detail off your drawing my idea is use your drawing to define shape and you define machine offset ,start and stop. You still can do a manual to automatic machining without gear changes.

Reply
John Mullis
12/8/2020 01:00:28 am

Just watched the conversion and threading videos and they were amazing. I recently purchased an inexpensive Chinese mini lathe 8x31 and have been going thru it to make sure it’s right and tight... well tighter. You really do get what you pay for. In looking for ways to improve it I came across your videos on YouTube. I’m new to machining so I might be wrong but your lathe has more capabilities than a manual lathe. What I mean by that is a person would need several additional tools to accomplish the same task that your lathe does single point. Like many others I said to myself that’s what I need for mine. I want to go ahead and order everything and get this completed so my lathe has these capabilities. Will I need anything other than a longer ball screw and will everything else work? You did a awesome job on everything and damn nice of you to share it with others. Thank you for everything.

Reply
John
1/3/2021 02:23:36 pm

I’m looking forward to the Arduino code. It looks like you’ve built in a lot of functionality for such a simple interface.
I’m possibly more interested in studying your code than actually doing a conversion.😀

Reply



Leave a Reply.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    June 2018
    December 2017

    Categories

    All

    RSS Feed

About
Contact
​Home
© COPYRIGHT 2015. ALL RIGHTS RESERVED.