Electronic Lead Screw

Finally got some shop time in. I have the motor connected and forgot to get a pic. I grabbed the latest code and played with the settings. I have 2 problems right now.

1) There is a slight gear ratio in the built in gearbox that I am not adjusting for. When I get it close by just tweaking and testing, I'm darn close on threading. I think if I can figure out the ratio in there, I can get it dialed in.

2) This lathe has a separate drive line for feed that doesn't use the lead screw. This does not appear to match the lead screw, no reason it should. So I'll need to update the code to support that. I'll contribute it back to the project once I get it working.

I did do some test cuts when I managed to get feeds close. I think it will work well once I sort out some of the issues.
 
Hmmm, well, PM doesn't know what the ratios are. It's a weird question I suppose. The current plan is to use the spare encoder and mate it to the end of the leadscrew. There is a castelated nut on the end. I'll 3D print a coupler that will fit over it with a set screw. Then mate that to the encoder. I printed the mag base bracket the author designed to hold the encoder. I can then write some test code to pulse the stepper till I get a full rotation on the encoder. Then save the pulse count. With 4096 encoder pulses per rev, it will certainly be more accurate than eyeballing it like I am now.

I was adjusting and using the DRO to dial it in. That works ok, but I think this will be a better idea overall.
 
Gear ratios are fairly easily determined.
EDIT: In reviewing this post I noticed that I had misread my gear chart causing some erroneous calculations. The erroneous text has been struck through and the correct text follows in red. The procedure for determining the gear box ratio remains unchanged.

If you look at your thread chart for the change gear combination for cutting a thread equal to your thread pitch, you can easily determine the ratio inside the back box. Write down the equation where each driven gear ( upper case) is in the numerator and each drive gear (lower case) is in the denominator like this A/a*B/b*C/c*Gearbox ratio = 1. For thread pitches other than the lead screw pitch, The equation becomes A/a*B/b*C/c*(Gearbox ratio) = (Lead Screw Pitch)/(Thread Pitch).

As an example, my 602 has a 12 tpi lead screw and the chart shows to cut 13 tpi thread, I need to set the gear box in positions I and B and use change gears 36 and 52. The equation is 40/60*36/127*127/52*(Gear Box Ratio) = 12/13. Rearranging and simplifying the equation to calculate the gear box ratio,
GBR = 12/13*60/40*127/36*52/127 =12/13*60/40*52/36 = 2.

With the gear box set to positions I and A, I would cut a 26 tpi thread so the GBR would be 1 and with the gear box set to [positions I and C, I would cut a 52 tpi thread so the GBR would be .5.

In a similar fashion, if I used the same 36 and 45 change gears but set the gear box position to II and B, I will cut a 13.5 tpi thread so the equation becomes 12/13.5*60/40*127/36*5245/127 =12/13.5*60/40*5245/36 = 1.9259251.66666......

My chart doesn't use position III for threading inch threads but looking at the metric chart or the power feed chart, the ratio I:II:III II:I:III is 5:6:7 so changing the gear box from I and B to III and B will increase the cut thread lead by the ratio of 7/6 which would be 13 tpi * 7/66/7 =15.1666611.142857.
Making that substitution, the equation becomes GBR = 12/15.1666611.142857*60/40*127/36*52/127 =12/1311.142857*60/40*52/36 = 1.714282.3333......

In this manner, it is possible to calculate the GBR of all the possible combinations of the gear box gears. It would be possible to further determine what is going on inside as to what the actual gears are by looking at the parts diagram but that is really only to satisfying curiosity as what matters is what comes out vs. what goes in.
 
Last edited:
Thanks! That is great. I got as far as figuring out the compound gears but wasn't sure about the leadscrew and some other bits. I'll give that a go with my lathe and see if I can't get it going that way.
 
Thanks! That is great. I got as far as figuring out the compound gears but wasn't sure about the leadscrew and some other bits. I'll give that a go with my lathe and see if I can't get it going that way.
Please review the edited post to see the changes made. Sorry if created any confusion.
 
Thanks for the update! I did the calculations and came up with these ratios in threading mode.

A 1.25
B 2.50
C 0.625

As the stepper driver is set for 1000 steps/rev, in A gear I came up with 800 steps. I had gotten to 850 just trying to adjust by selecting a value and comparing to the DRO.

With the current settings, I tested manually and got 0.1" movement per spindle rev in 10TPI threading mode. Perfect. So I cut a 1/2-13 thread with it, which worked great! Even with some pretty deep cuts, it never had a problem.

Feed rates are off by a factor of 5. With 5 thou per rev set, I get 1 thou. That's easy to apply a correction for.

Here are the currently modified settings. The microsteps setting is to account for the 3:1 belt pulley ratio.

Code:
#define LEADSCREW_TPI 10
#define STEPPER_MICROSTEPS 3
#define STEPPER_RESOLUTION 800
 
Here is a current pic of the physical installation. Now I need to get to work on an enclosure for the electronics and final mounting for the control panel. I'm thinking to mount it on the DRO arm to keep all that stuff in the same place, with the enclosure on the backsplash.

IMG_20200104_131735.jpg
 
Got the code modified and tested. I can now accurately set feed rates. I also tested metric feeds and threads successfully. Now to figure out pull requests on github. I think I have everything I need for the enclosure now, so I'll need one screw at 2AM. :)
 
Getting to the home stretch! I designed and 3D printed some plates for the enclosure that fit in the knockouts. Then I did it with a bracket to mount the control panel to the DRO bracket. Installed the enclosure on the side of the bench and now I just need to cut a hole in the headstock cover so I can install it.

IMG_20200202_225228.jpg

IMG_20200202_225134.jpg

IMG_20200202_225022.jpg
 
Back
Top