An Electronic Lead Screw controller using a Teensy 4.1

Finally, mounted the motor and set up the belt! Had to machine off the bosses. 5 out of 6 tacks had good penetration.
View attachment 419884
That motor will be staying put.

Next is the encoder mounting. Peeled off the front panel to see what was behind it. All the electronics of the lathe. However, if I put something there, like a plastic sheet, the drill chips shouldn't bother it.
When I drill into a sensitive enclosure, I liberally coat the drill with thick grease and clean the flutes out regularly. The chips will stick to the grease rather than fall into the enclosure. You can also magnetize the drill to prevent the chips from straying. The same procedure works for the tap.
 
And the encoder mounting is done ✅
Went without any drama. Probably could withstand some vacuuming although there's not much stuff that fell in. Finally some progress. Have to find some cable clamps, the one's I have a tiny screw hole. An M6 breaks through the hole.
PXL_20220909_210239636.jpg
Thought I would get lucky with the clamp but guess I will have to get some. I will set up the controller nearby and check the sense of the encoder and motor. Also will need to wire up the DRO's. Starting to get to the fun part!
 
When I drill into a sensitive enclosure, I liberally coat the drill with thick grease and clean the flutes out regularly. The chips will stick to the grease rather than fall into the enclosure. You can also magnetize the drill to prevent the chips from straying. The same procedure works for the tap.
I've done something similar for drilling into an engine oil pan for a turbo oil drain. That worked well.

For this, I didn't bother. Didn't make much of a mess with the drill size of 4.2mm for an M5 screw. I used the kind of tap that ejects chips back out of the hole which also reduced the chips getting into the bottom of the enclosure. Sometime I'll open the panel enough to get a vacuum hose in there. Do you need to drive out the roll pins in the QCGB to get the panel off?
 
I've done something similar for drilling into an engine oil pan for a turbo oil drain. That worked well.

For this, I didn't bother. Didn't make much of a mess with the drill size of 4.2mm for an M5 screw. I used the kind of tap that ejects chips back out of the hole which also reduced the chips getting into the bottom of the enclosure. Sometime I'll open the panel enough to get a vacuum hose in there. Do you need to drive out the roll pins in the QCGB to get the panel off?
The gear box is separate from the electronic enclosure. The front panel just serves as a facia for the gear box and can be completely removed with no problem. I found spindle bearing oil accumulation in the bottom of the enclosure so I drilled a couple of weep holes to drain it away I directed them holes away from the stepper motor.
 
The gear box is separate from the electronic enclosure. The front panel just serves as a facia for the gear box and can be completely removed with no problem. I found spindle bearing oil accumulation in the bottom of the enclosure so I drilled a couple of weep holes to drain it away I directed them holes away from the stepper motor.
The bottom of the enclosure seems dry. Had started "peeling back the panel" and wasn't sure of the gear box controls being in the way. The knobs seem to be held on with roll pins which I thought was odd. Never seen that before. Put in a hex key, thinking there would be a set screw and found the key went all the way through the knob!
 
The panel will clear the knobs. The pins are roll pins or spring pins and if you need to remove the gear selector knobs, drive them out with suitable punch. I have never cracked open my gear box.
 
This morning connected the stepper and the encoder to the Teensy and fired things up. The rotary encoder needs some filtering, but reads nearly the same as the built in tachometer. The rotation sense of the rotary encoder is correct, ie. standard lathe FWD is positive rotation. The stepper steps in sync with the spindle. However, the rotation is not correct. The carriage goes towards the tail stock, rather than the headstock. This is easily correctable in my software. I just need to change a #define. Changing the pitch seems to work qualitatively, 8 TPI is really fast compared to 100 TPI! The stepper is not loud so that is good. The only gear noise is from the 40T and 60T plastic gears, so things are pretty quiet.

Tried cutting a thread on a piece of PVC pipe towards the tail stock. Guess that would be a left hand thread? Seem to have not calculated the ratios correctly as the TPI is off by a factor of about 2.4. A 13 TPI thread cut as about ~31 (between 30 and 32 TPI). Then did a 10 TPI thread and it is about, but not quite 24 TPI. I am scratching my head on this one. I think the gear box is in 1:1. It seemed the lead screw turned at the same rate as the pulley when I turned it by hand. You'd think 2.4:1 would be noticeable! The somewhat reasonable thing is that the ratios are similar, at least for the two threads. So once I find the issue it should fix it for all the threading pitches.

Now entering the fun and frustrating (can't have one without the other!) part of the project. Sorting things out. This is the stuff that doesn't go in youtube videos, as it is not all that amusing to go through, but is necessary to get a working system. Happy to be able to get to this point, it's been a little over 4 months into development.
 
The lead screw is a 12 tpi left hand thread. On the gear box, positions 1A is a 1:1 throughput.
 
The lead screw is a 12 tpi left hand thread. On the gear box, positions 1A is a 1:1 throughput.
Thanks for that. I had the 12TPI, but wasn't sure about 1A being 1:1. Pretty sure I am not on 1A position! Will check that, right now...
 
It was not on 1A. Now that I have changed the gearing, the motor appears to be stalling out when I engage the lead screw. Seems I had set the stepper driver to the lowest current setting. Have to set it to the max which is 5A RMS. Believe my 4nM stepper specs 5A.

Edit: Set CL57T rotary switch to "A". Set gear box to 1A. Now cutting 10 TPI threads on a 10 TPI setting! Woohoo!
 
Last edited:
Back
Top