Supporting > Tooling & Machines
Revisiting a DIY Arduino/Forth Electronic Leadscrew Project
vtsteam:
I'm way down a rabbit hole of trying to resurrect an electronic leadscrew project for my lathe that I started maybe ten years ago. I stopped at about 95% completed, having written partially working code to drive an arduino and stepper in FORTH, and a partial schematic -- and naturally did not document much of what I'd done. :Doh:
After more than a day of reading, testing, and reconfiguring, and basic head scratching I've finally got the FORTH code working to move the stepper in response to a 600 line encoder, and a set of 6 thread setting switches and an internal thread lookup table. And I've got the electronic bits and pieces hooked together. But there are still some problems I have to work out, and it's absorbing all my time trying to do that.
Presently, I want to be able to reverse either the direction of the spindle or the direction of the leadscrew independently with two switches and have them still maintain register -- which is tricky. Right now the Arduino does sense the direction of the encoder rotation (using interrupts and quadrature) and branches according to what it finds to setting the stepper direction.
That would work for conventional toward-the-headstock screw cutting, and powered backing to the start point for a deeper cut, while maintaining registration. But I can imagine that it might be convenient to feed in reverse while the spindle is rotating in the forward direction -- not for screw cutting, just auto feeds. I dunno, maybe that's not important. It would simplify things right now if I didn't have to try to make that work. Opinions, please, is there any reason for doing that?
(btw.... I know that now electronic leadscrew modules are more readily available compared to the situation ten years ago when I started all this, and also yes I know alternatively I could just add a conventional CNC computer and software to drive the screw cutting. BUT, I want to finish my project for the pure satisfaction of having done it my way, and having it work. Plus I have no room for a CNC computer in the tiny shop. Besides I like the way I'm going to physically implement it -- so it looks pretty much like a conventional change gear box -- with six lever switches taking the place of the usual gear levers.... just an aesthetic thing. )
Anyway, here's a pic of my test setup as it was before adding a set of dip switches for test setting TPI.
If I get everything running successfully, I'll put up the FORTH code and some notes on how I did the whole thing, as well as (I hope) showing it working on my DIY lathe.
vtsteam:
Just a few pics of the switch and leadscrew control box I made for my lathe -- made from 4" PVC pipe that I softened in boiling water, bent, and glued together. Last pic is of the switches installed.
vtsteam:
btw.... ya know, one doesn't necessarily need a 3D printer to make complex plastic shapes....(though I do own one! :Jester: :stickpoke:)
vtsteam:
After over a week of work trying to re-engineer what I'd done in software, I've finally managed to get my program and gear working well enough to take iot out to the shop and temporarily connect it to my lathe and stepper motor. It's all still laid out across the bench, not the neat unit I envisioned, but I was able to get the leadscrew turning after making a coupler for the encoder, and a bracket to support it.
I also had to set up a DPDT center-off switch in my spindle motor controller (a treadmill MC-60) to allow me to reverse direction of the spindle. That is how I will back off for each pass during thread cutting. Finally, I was ready to try this rig out. I chucked up a piece of scrap aluminum, and set the switches for 13 TPI. Then took a light pass. Below is the first cut on my homebrew ELS!
Very excited about that -- only one slight flaw in the ointment...... it was a perfect 14 TPI groove. Um guess I need to subtract one from a loop index somewhere in my code! Probably forgot that zero is a number. :Doh:
Jasonb:
Having tested a lathe last year with a factory fitted ELS it is a nice feature to have.
The cost of the electronics these days from the likes of Aliexpress hardly make it worth doing your own thing and there are a lot of features and any sensible thread pitch or feed rate you want be it left or right hand. You can buy the same system as fitted to that lathe for very little money.
Running in reverse is useful to cut away from a shoulder but if you are able to set a length on your homebrew system then not really needed.
http://www.youtube.com/watch?v=tB7MaCHxQQ0
Navigation
[0] Message Index
[#] Next page
Go to full version