An Electronic Lead Screw controller using a Teensy 4.1

I'm not quite as desperate to get the ELS done since I have 15 feed speeds and 15 threading ratios with the built in gearbox on the PM-1228. I still have a stack of manual gears but haven't had to use them yet. :)

Still, the ELS will be a nice addition.

Looking forward to see your integration solutions.
 
@RJSakowski, I have a couple of questions on your implementation of ELS. I am referring to this picture. Didn't want to ask in the epic ELS thread, where this picture was found.
ELS Mechanical_RJS.JPG
What is the thickness of the motor mounting plate? Is this to make up some of the lead screw offset? Did you hog out the casting to at least 60 x 60mm for the motor? It looks like it, at least based from the photo. How did you do that, just a file? What width is the belt?

I've been trying to find pulleys that work out making up the difference in offset between the motor and the lead screw, and haven't found that many choices. A thicker plate might work better than what I was entertaining.

Using a timing belt for the encoder, that looks pretty nice. I was thinking of using a module 1 60T gear where the pulley is, and a module 1 40T gear on the encoder, which should get me back to 1:1 on the spindle. Of course that makes the mounting a little tricky, but I think it is doable. The belt is probably more forgiving.
 
@RJSakowski, I have a couple of questions on your implementation of ELS. I am referring to this picture. Didn't want to ask in the epic ELS thread, where this picture was found.
View attachment 415294
What is the thickness of the motor mounting plate? Is this to make up some of the lead screw offset? Did you hog out the casting to at least 60 x 60mm for the motor? It looks like it, at least based from the photo. How did you do that, just a file? What width is the belt?

I've been trying to find pulleys that work out making up the difference in offset between the motor and the lead screw, and haven't found that many choices. A thicker plate might work better than what I was entertaining.

Using a timing belt for the encoder, that looks pretty nice. I was thinking of using a module 1 60T gear where the pulley is, and a module 1 40T gear on the encoder, which should get me back to 1:1 on the spindle. Of course that makes the mounting a little tricky, but I think it is doable. The belt is probably more forgiving.
The motor mounting plate is 1/4" aluminum but there is a 1`/3" thick spacer behind it to bring the motor pulley in better alignment with the pulley on the lead screw gear box input shaft. My stepper motor is very close to contact with the mounting bolt for the lathe so a little thicker spacer might be desirable

I did have to enlarge the opening in the base of the lathe to fit the motor. Mostly squaring up the corners of the casting. I enlarged the opening sufficiently to allow for about 1/2" of adjustment for timing belt tension. I used a reciprocating saw and a hack saw blade to take out the large chunks and a coarse file to do the refinement work.

I followed Clough42's lead regarding the timing belt on the encoder. Using the OEM 60t and 40t gears would make better use of resources but it appeared to me that there is a potential interference problem between the encoder gear and the 60t mod 1.5 gear.

The belt on the encoder is 6mm wide and the belt on the stepper is .60" wide.
 
With a lot of struggle, made a partial model of the lathe to figure out how to set things up. Figuring out the pulley placement and lining things up kicked my butt however, I have a glimmer of what to do now. Really want to get the pulleys on order, and initially had no idea what would even work.

Here's the front view showing the alignment. This was the part that I was struggling over. The highlighted section is the stepper housing.
frontview.jpg
And the less visually interesting gear train view.
geartrainview.jpg
Now that I know the motor stick out, (16mm) I can think about the design of the motor mounting plate. Looks like 1" thick material might be suitable. Need a piece about 4x5x1. Hope I have a piece of aluminum that size. If not, I have some 1x4 steel bar. So I think I have the pulleys for the lead screw drive figured out, a 3M48T with a 10mm bore for the stepper motor, and a HTD3M48T with a 14mm bore for the lead screw. Next is to determine what to do for the encoder.
 
Gears using FreeCAD are a pain in the neck.:( Only got one gear to come out as a solid model, the others didn't. Nonetheless, it seems that there's an interference problem between the encoder mod1 40T gear fastener and the mod1.5 60T gear. Unless I come up with a gear retention method with under 2mm stick out, this method will be binned.

Probably use a timing pulley for the encoder as well. Thinking of using the banjo to attach the encoder plate, since it's long enough to reach, but I'm currently undecided. I'll make a sketch and mull it over.

Edit: Add picture. I could fit in an M3 screw. (5.5mm head diameter) an M4 is 7mm head diameter which is a bit big, considering I haven't fully engaged the gears in my inexpert drawing.
closeupgears.jpg
 
Last edited:
Hmm, realized that I never implemented a forward or reverse control! Oops. It's not hard to do, hope I haven't left out something else as important.
 
Gears using FreeCAD are a pain in the neck.:( Only got one gear to come out as a solid model, the others didn't. Nonetheless, it seems that there's an interference problem between the encoder mod1 40T gear fastener and the mod1.5 60T gear. Unless I come up with a gear retention method with under 2mm stick out, this method will be binned.

Probably use a timing pulley for the encoder as well. Thinking of using the banjo to attach the encoder plate, since it's long enough to reach, but I'm currently undecided. I'll make a sketch and mull it over.
What file formats can you import? Both McMaster Carr and SDP/SI have CAD models in various formats.

At the expense of buying new gears instead of using the Grizzly change gears, a 66t/44t or larger combination should clear. You could also use a bushing with a flat head screw for mounting the encoder gear. A 1mm thick washer with a countersunk hole for the screw would keep the bushing in place. The bushing would be threaded for the screw and there would be a set screw in the hub of the bushing for fastening to the encoder shaft. . Given that there is essentially no load, you may be able to get by with the friction fit provided by the screw. You could also use a light press fit to the gear and eliminate the screw and washer.
Encoder Gear Hub.JPG
 
What kind of encoder will you be using? I think the encoder clough uses is a quadrature 1024ppr which is 4x1024 = 4096 ppr. I've been looking into taking on this project as well without the TI controller. I thought about using an arduino with an LS7366R board to read the encoder's pulses since the arduino cannot handle the high frequencies of the encoder. I think the LS7366R might be worth considering and you could use a Teensy 3.x instead of the 4.
 
How Hard is ELS (Electronic Leadscrew)

some leadscrew math from my notes
high performance not required

1024 ppr encoder
4096 events per revolution
2400 rpm
40 rps
163840 events per second
6.1035 microseconds between events

16 mhz arduino processor (or Teensy 2)
0.0625 microseconds per clock
96 clock cycles per event (should be adequate with careful programming)

72 mhz teensy 3
438 clock cycles per event

90 mhz piccolo
548 clock cycles per event

133 mhz pico processor
811 clock cycles per event
dual cores allow one core to be dedicated to encoder/motor task

600 mhz teensy 4
3662 clock cycles per event

200 steps per revolution motor
8 microsteps per step
1600 microsteps per revolution
at 1:1 gear ratio
needs to send one motor pulse every 2.56 encoder pulses

with 8 tpi leadscrew
0.125 inches per revolution
1600 microsteps per revolution
0.078125 thousandths of an inch per step

200 khz motor pulse limit (rpm limits will occur first)
5 microseconds full period
2.5 microseconds high and low periods
 
Last edited:
What file formats can you import? Both McMaster Carr and SDP/SI have CAD models in various formats.

At the expense of buying new gears instead of using the Grizzly change gears, a 66t/44t or larger combination should clear. You could also use a bushing with a flat head screw for mounting the encoder gear. A 1mm thick washer with a countersunk hole for the screw would keep the bushing in place. The bushing would be threaded for the screw and there would be a set screw in the hub of the bushing for fastening to the encoder shaft. . Given that there is essentially no load, you may be able to get by with the friction fit provided by the screw. You could also use a light press fit to the gear and eliminate the screw and washer.
View attachment 415433
After messing around in FreeCAD, I figured out the way to make a solid gear. The SW is at 0.21, which tells you it isn't a finished product, and it behaves that way. There are stubs of things which plain don't work, but look almost identical to things that do work. Frustrating for a relatively green user.

Not sure of what FreeCAD can import. But using a larger gear set is interesting. I will check that out. Also looking at simply using another timing pulley. I can get a S2M-60 with a 14mm bore, and a S2M-40 with a 6mm bore which I think would work. At least with a belt you can separate the shafts to something convenient. Another possibility is just to source a M1.5 40T gear with a 6mm bore. That should fit, although the gear is kind of wide (1.5*(40 +2) = 63). Think the timing belt idea is better...
 
Back
Top