Electronic Lead Screw

mbonadio

Registered
Registered
Joined
Jan 24, 2019
Messages
9
I would love a limit switch, I think it's a great idea. One that would continue to stay in sync would be icing on top.
 

RJSakowski

H-M Supporter - Gold Member
H-M Supporter Gold Member
Joined
Feb 1, 2015
Messages
7,272
Thanks, will check out that thread. I hadn't thought about losing sync on a thread using a limit switch.... I wonder if I could code my way around that. Tough problem.
The Clough42 ELS accumulates counts of spindle rotation at 4,000 count/rev. from the moment the spindle starts to turn. The lead screw is programed to remain in sync with the spindle according to the desired feed rate/pitch. My understanding is that the counts will eventually overrun the counter so periodically, counts are subtracted to keep the count total within range.

My encoder has an index pulse as well and I had wondered why that hadn't been used in the strategy. My take on an ELS is that what needs t be know to successfully cut a thread is what the angle of rotation of the spindle is and where the lead screw needs to be for that position. It would seem to be a simpler problem. But then everything appears simple if you don't know what's going on.

The main attraction of the Clough42 ELS for me was that he had a Grizzly G0602 and I have a G0602 so he was providing a more or less turn key solution for me. I didn't follow his build exactly, using a different hybrid stepper than he used and different pulley ratios on the stepper but it was close enough that I was comfortable. I didn't want to tied down with creating code for a year so I took the easy way out.

There are other ELS solutions out there. The German Rocketronics ELS is much more sophisticated, being able to automatically cut threads as well as other profiles and can cut to a stop and bordering on a CNC. It is about twice the investment of the Clough42 ELS. If I went that far, I would look at converting to a CNC lathe as it would then be easily user programmed. Greennail's solution is similar. It will be interesting to see wherte it goes.

As to turning to a stop, I have designed a mechanical stop which will release the half nuts. It's been on my drawing board for a couple of years now. I got sidetracked this year designing and building a variable speed replacement for my lathe but that is fairly well complete now, except for a writeup so I should be able to get back to the mechanical stop.
 

Wheat.Millington

H-M Supporter - Silver Member
H-M Supporter - Silver Member
Joined
Sep 21, 2021
Messages
85
Great comments thanks. I've seen there's a few options, but I like that the Clough42 option is fully open source and that James has put so much great info in the public domain.

Thinking about spindle sync, I think it's acheivable with a few modifications, unless I'm missing something obvious. Firstly have the lead screw always start moving on an index pulse, so it always starts at a known spindle position. Then you need to keep track of the lead screw position relative to the spindle while in threading mode. When the machine hits the limit switch the spindle keeps turning and the leadscrew stops. Take note of the relative positions and continue counting spindle encoder pulses. Move the lead screw back using the ELS and continue keeping track of the relative positions. Re-engage threading, and the lead screw will start turning as soon as it's resynced with the spindle.
 

Joe-R

Registered
Registered
Joined
Mar 15, 2021
Messages
47
FWIW, I have my ELS setup with a limit switch on a longitudinal hard stop for feed only, it's just an auto stop feature for turning to a shoulder.
This method will not work for threading because of lost sync issues as others have already mentioned but I always thread away from the chuck with a LH threading tool upside down and with the motor in reverse (for most threading ops).
I have a "Stepper Online Hybrid Stepper Motor/Driver Combo", I wound up running the enable function of the driver through the limit switch, mine will stop the feed shaft when the limit switch is closed and it does that instantly, the stepper motor will start again when I move the carriage away from the limit switch but I found that there is a slight delay from the time the limit switch is opened and when the motor starts again, I believe the delay is just over 1 second but that has never been an issue for me.
The speed and direction always stays the same on restart, I've never experienced restart in reverse or at a different speed and I've never had to cycle the power or reset it in any way.
I contacted Online Stepper and they said that their drivers are configured to do what I described above and the delay on enable is there to prevent the motor from losing steps, it's an internal calculation and ramp up thing (I think that's what it is anyway), at any rate it acts like a new start cycle has just been initiated.
I'm not sure if other brands of drivers are configured that way or not.
BTW, I simply picked up a 5vdc source on the control board and fed that through the limit switch to the enable terminal on the driver, I added a toggle switch to that circuit so I could disable the limit switch for times when I do not want the lead screw to stop automatically, I tend to use the longitudinal hard stop to set the start of new threads (when threading using the reverse method).
Even though this does not work for threading, it sure saves me a lot of time for general turning to a shoulder and it even reduces personal stress that comes from making sure I disengage the auto feed lever in time, it even helps me with accuracy.

Note: I have my driver configured so that 0vdc (low) enables the driver while a 5vdc (high) disables the driver, if there is no wire or voltage signal, the driver is enabled. I left the direction terminal as is from the control board.

Everyone develops their own style and this added feature is just what works well for me :)

Just my two cents worth!!

Good luck!

Joe
 

Joe-R

Registered
Registered
Joined
Mar 15, 2021
Messages
47
Great comments thanks. I've seen there's a few options, but I like that the Clough42 option is fully open source and that James has put so much great info in the public domain.

Thinking about spindle sync, I think it's acheivable with a few modifications, unless I'm missing something obvious. Firstly have the lead screw always start moving on an index pulse, so it always starts at a known spindle position. Then you need to keep track of the lead screw position relative to the spindle while in threading mode. When the machine hits the limit switch the spindle keeps turning and the leadscrew stops. Take note of the relative positions and continue counting spindle encoder pulses. Move the lead screw back using the ELS and continue keeping track of the relative positions. Re-engage threading, and the lead screw will start turning as soon as it's resynced with the spindle.

If you are only interested in having a hard stop for threading and you are interested in a fairly simple method, use a Z axis or longitudinal hard stop limit switch to stop the spindle while simultaneously engaging an electronic brake to prevent coasting (resistor or magnetic type depending on your setup).
Then return the carriage as normal, just be sure to leave the lead screw synced to the spindle.
Reverse the spindle direction if threading metric (if your leadscrew has imperial threads).

Of course if you are mostly interested in doing this through coding and syncing via software and encoders, then the above suggestion is pretty much pointless :)

Personally, I was going to do the auto spindle stop through a limit switch but since I do most all my threading using the reverse method, it was for the most part not worth the time and effort.

All the best,

Joe.
 

RJSakowski

H-M Supporter - Gold Member
H-M Supporter Gold Member
Joined
Feb 1, 2015
Messages
7,272
I have the Stepper Online Hybrid stepper/ CL57T Driver package and it behaves as Joe describes with the exception of the unwanted reversing anomaly. When turning t a shoulder, I usually stop short with my successive passes and do cleanup as a final op using either the DRO or a hard stop so the the utility of a limit switch was diminished so I removed it.

Another possibility for a limit would be to use DRO information to generate the stop. Tormach's PathPilot controller for their CNC mills has a great feature for their soft limits in that once the limits are set, the feed will not overshoot the limit, regardless of how fast the feed rate is. It senses the approaching limit and begins deceleration to come to a controlled stop to a precision of a tenth.

In an ideal world, a DRO, variable speed drive, and electronic lead screw would all be combined in a single package. Currently, I have three separate packages operating independent of each other. However, I have a setup that can accomplish any lathe machining that I want to do with the exception of full CNC machining so I am very unlikely to do much more in terms of refinements.
 

Wheat.Millington

H-M Supporter - Silver Member
H-M Supporter - Silver Member
Joined
Sep 21, 2021
Messages
85
Thanks for your replies, this forum is awesome. Having given it some more thought, I think doing the limit switch with a sync'd feed is more trouble than it's worth. I still want a limit switch, but don't think I'll bother with keeping the spindle in sync for threading. However I do think that integrating the limit switch into the enable function of the ELS, rather than the stepper driver, makes more sense. You have a lot more flexibility with how to restart that way.

Unfortunately all I can do at the moment is play with the code because I'm still waiting for my hardware. Ordered early September but unfortunately USPS is evidently having trouble delivering into New Zealand so my package is stuck somewhere in limbo.
 

Wheat.Millington

H-M Supporter - Silver Member
H-M Supporter - Silver Member
Joined
Sep 21, 2021
Messages
85
Speak of the devil, received my package last night. Assembled the board and fired it up (still don't have a stepper/servo or driver), everything is working great with my spindle location modification, after a bit of bug fixing. Now I just need some kind of physical spindle lock.
 

Wheat.Millington

H-M Supporter - Silver Member
H-M Supporter - Silver Member
Joined
Sep 21, 2021
Messages
85
Wondering if anyone can help me with some troubleshooting. Finally got my stepper and other equipment so have been tinkering and getting it set up. Everything is working well except the motor only turns in one direction, and from what I can measure there is no signal sent to the DIR pin. Any ideas? The issue isn't with my encoder, which is definitely configured and wired correctly and is measuring in both directions.
 

ttabbal

H-M Supporter - Gold Member
H-M Supporter Gold Member
Joined
Jun 12, 2017
Messages
1,903
There are a number of DIP switches on the main board to set. Double check those perhaps? There could be a problem with the level shift board as well. For dir, I would think that even a simple voltmeter would be enough to test. There is likely no switching on it most of the time.

There is a reverse button on the control panel. Does that output a signal for the pin?

If the pin is switching, then you would need a scope or logic analyzer to see it. A normal meter has averaging and can't catch it. The cheap USB analyzer units that are all over eBay and similar are decent and more than capable enough for this.

You might also try reaching out to clough42. He likely has a good idea where to look for issues on one signal.
 
It can take up to an hour for ads to appear on the page. See our code implementation guide for more details. If you already have Auto ad code on your pages there's no need to replace it with this code
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock