PDA

View Full Version : Electronic Leadscrew



sconisbee
04-14-2008, 10:23 PM
Ok so i've heard these talked about a bit, never seen one in action before, and have read alot of the stuff i can find on it but...

Has anyone here actually made/used one?

With an electronic lead screw granted the gear train will be made redundant but what about the threading indicator?, and the keeping half nuts closed while doing a metric thread with an imperial lead screw issue?

oldtiffie
04-15-2008, 01:34 AM
There was a thread or post from Germany or someone that was German - I forget - some months ago.

It was all electronic and was based on pulses and synchronisation as I recall. The full process and diagrams were there.

I though I had it book-marked but can't find it.

Evan has a similar system for speed control of his lead-screw on his South-Bend lathe. Perhaps he might re-post the article or the link. It was quite clever.

Perhaps this link might be of use:
http://www.stellar-international.com/lathe.html

Ryobiguy
04-15-2008, 01:59 AM
I built one using a custom "ELS" software module for EMC^2 that I wrote.

http://server.fricktion.net/~mfrick/lathe/els/EmcEls_v0_1.pdf
(URL updated 1-28-2011)

Works great - totally synchronized like it's got gears.
I don't have a threading dial, but using a carriage stop, returning the leadscrew to home position, and ignoring spindle until it passes it's home position, I don't need a threading dial, nor do I need to keep the half-nut closed.
Sure, I have to stop on each threading pass, but it works for any possible thread pitch within the limits of resolution. 4 is the lowest TPI I've tried.

oldtiffie
04-15-2008, 02:19 AM
Thanks ryobiguy.

That seems to be far and away better than the "German" item I referred to.

Do you build the item for sale? I have a 230/240v 1ph 50Hz supply in Australia. If so please PM me.

Electronics is pretty well a complete mystery to me as I am from the era/age of steam radio!!

My lathe has no power feed or quick-change gear-box.

Your solution would seem to fit in with me very well.

I have a full set of changes gears but never use them unless screw-cutting.

bob_s
04-15-2008, 02:25 AM
or join the Yahoo group

http://tech.groups.yahoo.com/group/E-LeadScrew/

Ryobiguy
04-15-2008, 03:19 AM
You can have my software for free once I package it up and release it.
It's tuned for my system, so it would take some tweaking to get it running on someone else's setup.

Once you get a spindle encoder and stepper motor on the leadscrew and get those both wired up to a PC parallel port, you can at least try it out, and if you don't like it you haven't lost anything.

Once it's hooked up to a PC, you could also hook up to EMC^2 and use a real CNC controller too. I haven't actually tried it out myself, I just wrote my own program that runs parasitically in EMC^2 'cuz I'm not yet ready for full CNC, and I don't quite have the hardware it needs. I don't have a quadrature encoder with index pulse (not totally necessary, could hack around that,) I don't have a second axis, nor do I even have the stepper's direction signal hooked up to the PC.


Also, the Yahoo ELS group (mentioned above) is also developing a ~$150 standalone ELS controller based on the PIC microcontroller. It's almost in the production phase. It's got a LCD display (20x4 characters I think), a keypad, a stepper driver (somewhere around 2 amps?,) an MPG (or at least a hookup for one using inexpensive encoder,) can drive a second axis (with external driver) to do tapers and fully automated threading. I think I also heard something about a nice metal case for it too. Join the group for ask for details if you can't find them in the archive.

-Matt

oldtiffie
04-15-2008, 06:05 AM
Thanks bob-s and Ryobiguy.

Very sound advice and very much appreciated.

Mcgyver
04-15-2008, 08:14 AM
Matt - that was a great write up....i need more time to read it properly but wanted to say thanks for taking to time on it, great content

John Stevenson
04-15-2008, 08:35 AM
I joined the e-leadscrew group when it first started and the idea's for what was needed were being thrashed out.
Most just wanted threading but not go to full CNC.

I advocated just using one axis of TurboCNC and a spindle encoder to do the threading but was told that was CNC.

So three years down the line they have come up with a single axis CNC that can be extended into a 2 axis CNC admittedly in a smaller case and no screen.

No sour grapes but once you start using a stepper motor, spindle encoder and driver you have re-invented CNC.

.

rantbot
04-15-2008, 09:03 AM
I was disappointed by the discussion in that Yahoo group. I saw no consideration anywhere of the errors which all of classical control theory is devoted to dealing with. Steady-state offset error is, obviously, the big one in a leadscrew-driving system. Damping of oscillation is another biggie. (Fixing those are what the "integral" and "derivative" portions of a P-I-D feedback loop do.)

This is typical of the digital guys, who too often seem to think that simply counting pulses is all that's involved in control of moving parts. The phase-locked loop is a good way to generate a proportional error signal, albeit of limited resolution. But that's just the start of the control problem. Is a simple proportional feedback control system good enough for the application? What are the numbers?

Evan
04-15-2008, 09:40 AM
No sour grapes but once you start using a stepper motor, spindle encoder and driver you have re-invented CNC.
Not if there isn't a computer or some sort of numerical control involved . A simple switch controlled divider can do the job. For that matter it would be technically possible to simply use an encoder disk on the left end of the spindle that contained the right number of slots to produce step pulses directly. The point is that an electronic lead screw needn't have anything to do with a computer. A few logic chips don't make a computer as you well know from your work on the electronic gear cutter.

Feedback isn't necessary any more than it is on open loop CNC systems. All it takes is brute force to insure that things stay synchronized.

John Stevenson
04-15-2008, 11:20 AM
I have to agree with you Evan to a point.
As you say a computer isn't needed and pointed out the logic chips on the gear hobber but this is slightly different in that it's a continuous operation and has no way of knowing where to pick up if you stop and wind back.

It probably could be done with a few more chips thrown at it but the point I was making is that 5 years ago, plus, people were threading with TurboCNC. In fact it was developed as a lathe program in the first place, not mill.

Now 5 odd years on the ELS still hasn't seen public light of day but any half competent person in two days could get a lathe threading on T-CNC.

[Edit ] In this months MEW Tony Jeffree has started to convert his [ actually my old Myford ] lathe over to CNC but in stages.
His first exercise is the fit a stepper to the leadscrew and drive it with his Division master to mimic a power feed.
In doing this he still retains the acme screw, half nuts and manual use of the machine.
Later he's going to add the encoder and be able to do threading still with manual use of the lathe by the rack and pinion feed and still keeping the half nuts.


As you say feedback isn't necessary but if you are that paranoid about lost steps then fit a servo instead of a stepper.

My big CNC is still on an old DOS program called Ahha, quite dated now but it still works flawlessly so I can't be bothered changing.
I managed to get some old 12" Point of Sale monitors a while ago for peanuts, who wants 12" nowadays, monitors that is :D

These are ideal for old DOS applications as they hardly get in the way or appear overwhelming.

.

lazlo
04-15-2008, 11:31 AM
With an electronic lead screw granted the gear train will be made redundant but what about the threading indicator?, and the keeping half nuts closed while doing a metric thread with an imperial lead screw issue?

Simon, no one answered your question, and folks here have asked for a synopsis of electronic leadscrews every once in awhile, so here it goes...

On a manual lathe, the outboard quadrant gears, or the quick change gear box gears, use the leadscrew to drive the carriage at some division of the spindle RPM. An electronic leadscrew does the same thing, by adding a shaft encoder to the lathe spindle, and driving the carriage directly with a servo or stepper motor, which is controlled by an electronic divider circuit. In that sense, it's very similar to the divider circuit that Brian Thompson made for Sir John's Electronic Gear Hobber.

So not only do you not need quadrant or quick-change gears, but you also don't need a leadscrew. That means you can cut Imperial, Metric, Transcendental/Diametral, Module pitches at will. For fun, the guy on the Yahoo group alternated Imperial and Metric threads on a piece of rod. You could also cut non-linear threads (increasing or decreasing TPI) if that turned you on ;)

As you can probably tell, Electronic Leadscrew gets awfully close to full-blown CNC control of the Z-axis on a lathe, so ELS never showed up on manual Western lathes, since almost no new manual lathes have been designed since the 60's. The only manual lathe I've ever seen with an Electronic Leadscrew is the Eisen (Taiwan) copy of the Hardinge HLV-H. Notice that there's no gearbox, or leadscrew:

http://www.eisenm.com/images/lathes_tool_room/CTL-618DT.jpghttp://www.eisenm.com/images/lathes_tool_room/618e-panel.jpg

So now the complicated part :)

In theory, Electronic Leadscrew is as simple as synchronizing two motors (the spindle motor and the carriage motor) with a divider circuit. But in practice, it's a lot harder than that. The first issue hobbyists run into is generating enough pulses on the lathe spindle so that there are no steps cut into the threads. Brian Thompson/John had the same problem with the electronic gear hobber -- you need to generate a lot of pulses on the lathe spindle so that when you divide it out for the servo/stepper, you don't cut stair-steps.

In Matt's example in the EMC document he posted, he's got 4,000 pulses per revolution between the spindle and the carriage stepper. So to cut 4 TPI, the stepper needs 15.15151515 steps for every rotation of the lathe spindle. That means you really need to do floating-point math to minimize round-off errors in the division, or you'll get periodic errors on the thread.

The other complication is what Rantbot alluded to: the simplest Electronic Leadscrew setup is an open-loop system (without feedback) like Matt's, and you directly drive the carriage without worrying about whether the carriage is actually where you think it is. The problem is that as soon as you start cutting metal, the stepper is going to be facing very non-uniform torque, so either you use a large stepper that won't lose steps and get out of sync with the divider circuit, or you use a PID feedback loop with a servo motor. There's a big thread on the Yahoo group right now trying to figure out how much torque the carriage stepper needs, depending on the size of the machine and the cutting forces involved...

As far as I've seen, all the hobbyist Electronic Leadscrews (and Brian Thomson/Sir John's Electronic Hobber) have taken the open-loop, large stepper motor approach. But if you take that approach, it takes a lot of tweaking to get everything set up, and then you have to watch it carefully, or the divider circuit will lose sync with the spindle, and crash the carriage into the headstock. John Dammeyer (the guy driving the Yahoo ELS) had that problem a lot, so he's added the ELS to an old Gingery lathe, but he hasn't added it to his South Bend lathe, which should tell you something.

In answer to your last question: you still need to use the thread dial to re-start the threading pass, because, like a human, it needs to have the same starting point to engage the threads that have already been cut. The only way to avoid the thread dial is to completely automate (CNC) the Z-axis, so the electronic leadscrew circuit rewinds the carriage to a known point, and re-starts the thread pass by itself. But that's really full-blown CNC...

Cheers,

Robert

John Stevenson
04-15-2008, 11:45 AM
Thank you Robert, very clear and concise.
I haven't read the EMC article but it's interesting that Matt uses 4,000 pulses per rev, exactly the same as Brian and myself found on the gear hobber.

Another point we have come across on the hobber is that as it stops it can loose steps due to the speed of the pulses diminishing, same on startup.

So if you stop the hob and restart you can't guarantee it will be in mesh as it was before. Possibly a servo may cure this but it is inherent with the system.

Ironically a lathe driving a single pulse 'encoder' with an adequate power spindle motor to keep the revs constant doesn't suffer from this and will do repeated passes whether stopped in between cuts or not.

.

Ryobiguy
04-15-2008, 12:11 PM
In Matt's example in the EMC document he posted, he's got 4,000 pulses per revolution between the spindle and the carriage stepper. So to cut 4 TPI, the stepper needs 15.15151515 steps for every rotation of the lathe spindle. That means you really need to do floating-point math to minimize round-off errors in the division, or you'll get periodic errors on the thread.


Not quite -- I have 4000 STEPS per inch. My spindle encoder is totally low resolution, I'm using the larger back-gear as an encoder with a zero-speed gear sensor. I only have 66 pulses per revolution on the spindle.

I do not have to resort to using floating point numbers either. My implementation is all integer math, has no cumulative rounding error, and does a great job of interpolating many steps between each spindle pulse.

As to whether this is a "full blown CNC" -- sure it uses a computer, it also uses numbers, and it also controls things. But I wouldn't really call it a CNC, at best perhaps a pseudo-CNC.

-Matt

sconisbee
04-15-2008, 01:01 PM
Simon, no one answered your question, and folks here have asked for a synopsis of electronic leadscrews every once in awhile, so here it goes...
Robert

Now thats exactly the info i needed to fill in the gaps thankyou! Whilst i don't really need Module or DP threads it would be nice to have the feature but... im not ready to go all out cnc for the z axis yet, and the thread dial issue is the clincher because of doing metric threads on an imperial lathe etc, I've been tossing around ideas between an ELS and implementing a hardinge style dog clutch with a difference. I've been experimenting today and my idea in theory at least will work, now i used to use a threading attachment with a pneumatic kick-out in a previous job, carriage hit a limit switch which popped a solenoid spool valve which retracted the tool, was a bit noisy but it worked well.

Now i do a fair bit of threading on keel bolts and the like for boats and to speed things up just a wee bit i came up with a electronic motor to reverse the leadscrew and return the carriage to its original position, and a limit switch that when hit at the end of a threading pass fired two air cylinders one to retract the tool and the other to pop the dog clutch.

Sure its overly complicated for little gain but i have a few valves and rams kicking around so i might play a bit:D

Evan
04-15-2008, 01:45 PM
I have been tempted to implement an electronic leadscrew on my SB9. I DON"T want CNC though as it tends to overcomplicate simple jobs as I have been finding with my mill. That's why I have handles on the mill and as soon as I find the time, perhaps next winter, I am going to try running it with wave drive variable reluctance steppers. They are a cross between a stepper and a servo and can be run with or without feedback. A big advantage for manual operation is that when unpowered they impose no load at all on turning the handles since the motors contain no permanent magnets or brushes.

One of these would work well I think for a leadscrew drive. As for rewinding, the spindle encoder just needs quadrature detection to tell the wave drive generator which way to count, up or down. Wave drive is ideal for this because it entails no more than energizing three outputs in sequence as these are three phase motors. They can turn up to several thousand rpm. In fact, instead of a quadrature encoder a non-overlapping hexature encoder would provide the needed phase information directly. Because of the very low intertia of the VR stepper armature it is able to accelerate very quickly and responds especially well to variations in step rate. Because it has only 12 steps per rev it needs to be geared down through a high ratio train which isolates it from torque variations.

Rewinding would be accomplished by simply reversing the lathe at high speed. The screw and carriage would follow.

John Stevenson
04-15-2008, 02:36 PM
Rewinding would be accomplished by simply reversing the lathe at high speed. The screw and carriage would follow.

Closely followed by the chuck............


.

Evan
04-15-2008, 02:49 PM
Hah. Not likely. The only time I have ever had the chuck unwind on my SB was when trying to reverse a part off a 1" drill bit to which it had become somewhat "attached". Of course, this presented no hazard. I routinely turn in reverse or on the back side in reverse and it simply doesn't happen. I also don't slam the chuck on the spindle, just a light "wind on" until it is seated. It comes off easily with a wooden stake between the jaws and locked in back gear, no hammer required.

I suspect a lot of the problems in this regard are due to slightly inaccurate seating of the backplate on the spindle and register.

sconisbee
04-15-2008, 03:32 PM
Closely followed by the chuck............
.

LMAO! i had that happen once.... my first ever machining mistake when i was a wee sprog lol.

Now to solve all my problems, i suppose i could save up for a haas tl1:D
Speaking of haas, there gunna be at mach2008 next week so ill go take a look, but 15k is still a bit outta my range:( john you heading down for mach?

John Stevenson
04-15-2008, 03:55 PM
No mate, too much on.
We have the Harrogate show 9th, 10th and 11th of May.
Got two new CNC's in from China but no stands or enclosures for them as yet, only drawings in solid edge and a blunt hacksaw :D

Got a medical to sort out and then get my HGV renewed as we are going to need an extra truck this year.

.

sconisbee
04-15-2008, 04:05 PM
no worries, hmmm now i wonder if haas or hardinge are gunna be giving away free samples:D ahh ok maybe im not that lucky lmao:rolleyes:

Blunt hacksaw? you mean your lucky enough to own a hacksaw?:D

Damn Harrogate's a looong way away, sometimes it sucks being stuck down ere lol tho the weathers nice so its not so bad. now if i could only get the sun to shine *inside* the workshop:D

Hal
04-15-2008, 04:44 PM
So how much would a ELS system cost? just a ball park figure for one thats ready to hook up to a lathe.

Hal

John Stevenson
04-15-2008, 04:50 PM
So how much would a ELS system cost? just a ball park figure for one thats ready to hook up to a lathe.

Hal

Matt in post #6 mentions the figure of about $150.
I have no idea what that entails or if, when it gets into production it's possible to hit this figure.

.

lazlo
04-15-2008, 06:43 PM
Matt in post #6 mentions the figure of about $150.

That's John Dammeyer's latest (March 29) estimate for the ELS pcb board kit with an LCD display and keypad. You would have to assemble the board and burn the PIC, and the stepper motor would be additional:

http://tech.groups.yahoo.com/group/E-LeadScrew/message/2032

"The ELS board with all surface mount parts machine installed (No lead solder to meet European RoHS regulations) and a kit of all through hole parts and switches and LCD display etc. will cost $150."

By the way, John's ELS also provides for a powered cross-feed, and he has electronic taper attachment functionality in the software as well.

lazlo
04-15-2008, 06:47 PM
That's John Dammeyer's latest (March 29) estimate for the ELS pcb board kit with an LCD display and keypad.

http://tech.groups.yahoo.com/group/E-LeadScrew/message/2032

By coincidence, in that same email, John mentions that smaller lathes, where the spindle motor "bogs down" under load (i.e., while cutting) may need an outboard closed-loop servo controller to keep the spindle and the ELS in sync (for the reasons I mentioned in my earlier post):

"For the smaller lathes that have weak motors that bog down under load, I've been investigating the UHU DC servo controllers. There's a lot of interesting things happening there including a newer High Power UHU board. I have a UHU processor mounted on a board but it's incredibly unstable and the processor resets under the slightest load. It's not based on the common layout but a new one and I think there are production issues with it. I have ordered a conventional circuit board."

S_J_H
04-15-2008, 06:57 PM
The first issue hobbyists run into is generating enough pulses on the lathe spindle so that there are no steps cut into the threads. Brian Thompson/John had the same problem with the electronic gear hobber -- you need to generate a lot of pulses on the lathe spindle so that when you divide it out for the servo/stepper, you don't cut stair-steps.


Does mach3 somehow have some software smoothing or differ from the way the ELS works? I have just 1 pulse per rpm on my spindle with a proximity sensor and my cnc lathe will cut very nice looking threads at some very fast speeds. Plenty of spindle power does seem to be important to keep the spindle rpm as consistent as possible even though Mach attempts to compensate for spindle speed variations.
This is a small lathe at under 150lbs and I have a 1hp 3ph with vfd driving it. Way overkill for the size of the machine but for threading the extra power really helps. I wonder if the same might apply for an ELS equipped machine?
Steve

lazlo
04-15-2008, 07:11 PM
Does mach3 somehow have some software smoothing or differ from the way the ELS works? I have just 1 pulse per rpm on my spindle with a proximity sensor and my cnc lathe will cut very nice looking threads at some very fast speeds.

If you're using a low resolution spindle encoder, you have to linearly interpolate between spindle pulses, which makes the very big assumption that the spindle speed is constant between encoder pulses.

Fritz Linck, the German gentleman who (I believe) made the first hobbyist electronic leadscrew (posted on the Houston Metalworking Club page), mentions this problem in his project page. He started with 40 encoder pulses per spindle revolution, but found that there was a lot of deviation between the spindle and the carriage (which would show up as thread, or pitch error):

http://homemetalshopclub.org/projects/electronic_lead_screw/els.html

"accuracy of the regulation / minimization of angular deviation is better with finer pitch of the timing disks. Therefore I am in process of increasing the main spindle pitch by a factor of 3 from 40 to 120 holes and changing the lead screw drive to a motor with a 3:1 timing belt transmission, putting the 120-pitch timing disk onto the motor shaft, giving a virtual tripling of the pitch.

Since the 2 overlapping sensors give 4 pulses per timing disk hole, the regulation increment of the main spindle will then be 120 * 4 = 480 pulses per revolution and at the lead screw 120 * 4 * 3 = 1440 per revolution.

This way, regulation increments on both, main spindle and lead screw, are reduced to one third, increasing precision and smoothness at low speed by a factor of 3. "



Plenty of spindle power does seem to be important to keep the spindle rpm as consistent as possible even though Mach attempts to compensate for spindle speed variations.

Right, that's the brute-force approach. A bigger, more rigid machine, will see less variation in the lathe's spindle as you're thread cutting.

SmoggyTurnip
04-15-2008, 07:54 PM
So I guess if the motor was even more powerful no pulse at all would be required as long as the rpm was known?

John Stevenson
04-15-2008, 08:05 PM
A lot of work was done in Mach on this subject and Art even wrote into the code the facility to use multi count encoders but in practice no difference was found.
The multi line input is still there but no one uses it nowadays.

Remember when CNC threading it's usually done at high speed with multiple small passes so spindle loading doesn't come into it.

If there is a problem with spindle fluctuation then it's down to the fact they the motor and / or drive isn't suitable. Some of the tiny DC mini lathes could fall into this class.

Even though you have no top slide on a CNC you still have the software choice of angle of attack. When manually cutting a 60 degree thread it's commonplace to feed in at 29 degrees, Mach can do this the same and even work out the correct infeed based on number of passes or volume of metal removed.

All this goes towards getting a good and consistent threads without the operator having to worry or be concerned about doing the sums.

.

lazlo
04-15-2008, 08:19 PM
So I guess if the motor was even more powerful no pulse at all would be required as long as the rpm was known?

Exactly -- that's the limit case: one pulse at time zero. I think there's a bunch of "butterfly" effects (torque cogging, tool chatter, ...) that would keep that from working.

So Brian/John's electronic hobber has 4,000 pulses per revolution, the German guy has (effectively) 360 pulses per revolution, Matt has 60 pulses per revolution, and Steve (S_J_H) has 1 pulse per revolution.

Brian Thompson mentions in his Model Engineer article that they were seeing stair steps with less than 4,000 pulses per revolution. The German guy was seeing thread errors with 40 pulses per revolution and was in the process of increasing to 120 pulses per revolution (the last time he updated his project log). Matt and Steve seem to be fine with 60 and 1 pulse per revolution, respectively.

It probably depends a lot on the specific machine (how powerful a spindle motor and how rigid it is), the number of thread passes/DOC, but most importantly, how anal you are about the threads. You can have a lot of pitch error on a thread and it will still mate with a bolt, especially if both were cut on the same machine.

In other words, your mileage may vary. Pick an encoder, see if it works. I just bought two new 10,000 pulse per revolution Heidenhain encoders on Ebay for $50 each....

oldtiffie
04-15-2008, 08:20 PM
Thanks lazlo.

That's the "German" model that I referred to earlier. I can see now that I had it "hidden" in another "book-mark" and thought I'd remember where I saw it - wrong - and I'm sure I saw it in my link in the last month or so.

Thanks.

I was very interested in your post #13 - part of which was

The only manual lathe I've ever seen with an Electronic Lead-screw is the Eisen (Taiwan) copy of the Hardinge HLV-H. Notice that there's no gearbox, or lead-screw: and referred to your pics (which I've shown as links):
http://www.eisenm.com/images/lathes_tool_room/CTL-618DT.jpg

http://www.eisenm.com/images/lathes_tool_room/618e-panel.jpg

seems to mean that the lathe would have been advancing the carriage via the apron gearing and the rack.

I have no problem with that as there is no reason why a lead-screw would be needed and why the rack and pinion would not do the job - but it would possibly need to be of Hardinge standard quality as regards linear and circular pitches.

I notice too, that the lathe has a longitudinal hand-wheel and no apparent electronic control of the cross-slide which also has a manual hand-wheel.

That being the case, it seems to me to be a very clever electronic (CNC?) QC gear-box where feeds could be in terms of threads per inch in stead of "thou per inch".

I'd prefer not to have a lead-screw but to use that system as the lead-screw on a lathe is potentially more exposed to "gunk" from air-born grit and cuttings etc. from the lathe than any equivalent machine screw in the shop. It is all but practically impossible to clean out the half-nuts as well.

That's OK for lathes that use the rack and pinion for "auto/power" carriage feed as the half-nuts are only engaged for screw-threading. I don't have rack & pinion auto-feed and have to use my lead screw - so I don't use the lead-screw but hand-feed - which I don't mind. I minimise wear on the lead-screw and half nuts.

I thought that the electronic variable speed/feed that Evan put on the tail-stock end of his lead-screw on his South Bend was very clever - but the "wear" issues between screw and nuts is still there. Perhaps Evan may tell me that in his experience it is no issue at all - I hope so. I'd like some feed-back from Evan on that set-up of his.

Thanks too for the excellent "write-ups" thus far on the various application proposed and discussed in this thread as you have presented them in and at a level that I can understand without it "going over my head". I don't see the experts in this complaining nor are they reverting to or using an unreasonable amount of "jargon" that this (me) reader might be confused with.

I would be surprised if I were the only "out-sider looking in" (neophyte??) as regards (lack of) electronic/CNC capabilities or knowledge.

Thanks to all for the excellent comment and for the "readability" of the posts to date.

I am very pleased and very grateful.

jh
04-15-2008, 08:34 PM
If there is no leadscrew on the lathe shown then what is in the black tube under
bed ways that runs into both sides of the carriage??
James Helmuth

lazlo
04-15-2008, 08:37 PM
That's the "German" model that I referred to earlier. I can see now that I had it "hidden" in another "book-mark" and thought I'd remember where I saw it - wrong - and I'm sure I saw it in my link in the last month or so.

Mick, I'd swear that I saw that he posted a more recent update to that project somewhere. I have no idea why a project from a German amateur was on the Houston Metalworking Club web page to begin with (not complaining, just wondering)...


seems to mean that the lathe would have been advancing the carriage via the apron gearing and the rack.
...
That being the case, it seems to me to be a very clever electronic (CNC?) QC gear-box where feeds could be in terms of threads per inch in stead of "thou per inch".

That's Eisen's embellishment of the Hardinge HLV carriage feed. The "normal" (non-ELS) Hardinge has a right-angle gear motor that directly drives the apron power feed, instead of a separate power feed shaft that runs below the leadscrew, or a feather key on the leadscrew itself. The controller for the apron motor is an infinitely-variable DC controller, so you can set the carriage to move at any arbitrary feed.

So Eisen put an encoder on the existing apron feed motor, and got rid of the leadscrew and the gearbox.


I notice too, that the lathe has a longitudinal hand-wheel and no apparent electronic control of the cross-slide which also has a manual hand-wheel.

On the Hardinge the apron power feed is clutched off to either the longitudinal feed or the cross-feed. So the DC motor controller can feed in either direction. I have no idea whether the Eisen can do anything fancy with electronic control of the crossfeed. The only thing I could think of would be constant surface feed, but that's really overkill on a lathe with a 12" swing.

bob ward
04-15-2008, 09:05 PM
I can see advantage in having an electronic lead screw even on a lathe that has screw cutting capabilities. Being able to go instantly from turning to threading and back without having to swap threading gears in and out would be a real plus.

Not to mention that it sounds like a super cool new toy.

Evan
04-16-2008, 12:27 AM
I haven't noticed any significant wear on the lead screw or the nuts in over twenty years of use (or on any other parts either). I keep it all clean and very well oiled. It's the well oiled part that really matters. As long as there is oil between the metal parts the wear is almost nonexistent.

The electric feeds on my SB are the best thing since cooked meat. They are very nice to use and I rarely crank the handles if it's going to take more than a turn or two. Engaging the feeds is as simple as reaching over and flipping a couple of switches.

One of the nicest things about the electric feeds is the speed control. You can set up a deep long cut and then start with a very low feed rate. Then you gradually increase it until it is working at maximum effort. If it begins to bog then back off a hair. This is especially nice when facing large diameter work. I can instantly adjust the chip load at anytime when using the feeds.

The long feed has the half nuts to engage and disengage while on the electric cross feed I used a magnetic clutch that engeges/disengages instantly at the flip of a switch. If the cross feed overloads the clutch just slips. If the lead screw is jammed the drive belt will jump to prevent damage.

oldtiffie
04-16-2008, 01:00 AM
Thanks Evan.

Any chance of either posting the link to the thread or posts that you put up on that matter - or perhaps to cobble together a new thread or post/s.

I for one will really appreciate it.

I was very impressed when I saw it - I am more impressed now that you mention the cross-feed as I missed or forgot that part of it.

Evan
04-16-2008, 08:37 AM
It's all on my web site. One of these days I must put up some info about the mill.

http://vts.bc.ca/metalshop

oldtiffie
04-16-2008, 08:12 PM
It's all on my web site. One of these days I must put up some info about the mill.

http://vts.bc.ca/metalshop

Thanks Evan.

Very much appreciated.

I missed that post of yours - sorry.

Great work - an inspiration to me at least - and as I expect/suspect, to quite a few others as well.

drof34
04-16-2008, 11:09 PM
The Eisen lathe pictured has a leadscrew. If you blow the picture up, you can see a black rubber bellows just under the bedway that contains the leadscrew.

There are several HLV clones out there, Feeler and cyclematic are two and I think they are made in Tawian(maybe the HLV also). They all look alike and even have the same model numbers.

It's my impression that an encoder on the spindle is primarily used as a reference for timing the spindle to the leadscrew and possibly as a tachometer, at least on a real lathe. The leadscrew also has to be timed to the carriage, (leadscrew dial) but if you leave the half nuts engaged thats taken care of.

lazlo
04-16-2008, 11:18 PM
The Eisen lathe pictured has a leadscrew.

I just checked the literature, and you're right -- it's using a servo-drive on the leadscrew to move the carriage, instead of using the apron feed. That's odd -- one of the two motors (the servo feed motor or the apron motor) is redundant.

In any event, it's still an Electronic Leadscrew -- the big difference from the Feeler and Cyclematic clones being that it doesn't have a gearbox:

What is Digital Threading Control?

CTL-618DT toolroom lathe with Digital Threading Control replaces traditional threading gearbox with microprocessor-controlled, servo-driven leadscrew.

Simply type in the desired thread pitch on the numeric keypad on the touch screen LCD control panel and then start the threading cycle as on other conventional lathes. CTL-618DT's system would control and synchronize main spindle rotation and Z-axis feed rate to produce precise threading cycle for the given TPI or mm thread pitch.

Besides being able to cut thread pitches not previously available on manual lathes, noise and vibration during threading are also significantly reduced, because there are actually no more gears in the gearbox.

macona
04-17-2008, 12:10 PM
Not really redundant. The servo is connected to the lead screw. Feeds are done through the motor on the apron which goes through the gearbox in the apron and drives the carriage off the same rack as the handwheel uses. Also the motor on the apron is needed for power cross feed.

You dont want to use the leadscrew for feeds as that just causes unnecessary wear on the leadscrew.

rantbot
04-19-2008, 06:52 PM
The other complication is what Rantbot alluded to: the simplest Electronic Leadscrew setup is an open-loop system (without feedback) like Matt's, and you directly drive the carriage without worrying about whether the carriage is actually where you think it is.
No, that's not what I was talking about at all. I was talking about the errors inherent in proportional feedback systems.

The basic problem is that we need to control position, but are doing it by driving the leadscrew's velocity. Mathematically there's no difficulty with that, but physically there is - the only way to get the velocity perfect is to have a position error - we can't have one without the other. This is called the steady-state position error ("steady-state" distinguishes it trom transient errors, which are another and somewhat more complicated problem). Generally, it will not be zero. The reason is that since the drive signal to the leadscrew motor is proportional to the error signal, we know that if we have a non-zero signal to the leadscrew motor (that is, if the motor is turning), we must have a non-zero error signal. If the error signal is zero - that is, the spindle and leadscrew are tracking perfectly - then the motor drive signal must also be zero, since it's just a multiple of the error signal. That's what "proportional feedback" means. But if the leadscrew motor drive is zero, so is it's speed, and it can't possibly keep track with the spindle.

Mathematically, in a simple proportional feedback system this error will be 1/(1-K), where K is the proportional feedback gain.

Note that this error has nothing to do with pulse counts. One count per spindle rev or 40,000, the steady-state error is still inherent in a proportional system.

The easiest fix is to crank up the feedback gain. This doesn't drive the steady-state error to zero, but it lowers it as per the above expression. Unfortunately at some point, increased gain will introduce instability. That is, the control system will no longer work.

The classic fix is to abandon the purely proportional system and add an integration element. That's the "I" in a PID controller. There are other tricks which should be able to do the job. But I didn't see any of them so much as mentioned in the Yahoo group.

rantbot
04-19-2008, 06:54 PM
... bloody multiple posts ...

lazlo
04-19-2008, 11:30 PM
The other complication is what Rantbot alluded to: the simplest Electronic Leadscrew setup is an open-loop system (without feedback) like Matt's, and you directly drive the carriage without worrying about whether the carriage is actually where you think it is.No, that's not what I was talking about at all. I was talking about the errors inherent in proportional feedback systems.

You're mixing terminology. The hobbyist electronic leadscrew projects, including the Yahoo Group ELS project, aren't doing feedback at all -- they're strictly open loop. So there's no feedback, and therefore no feedback errors to measure.

A PID controller applies only to close-loop feedback systems, which no one has yet implemented in a hobby-class electronic leadscrew.

A PID control loop monitors a process variable (the RPM of the spindle, in this case), and corrects the error between the measured process variable and the desired value (the correct position of the leadscrew and/or carriage) by calculating an adjustment parameter to tune the closed loop process (spindle motor/spindle encoder -> servo motor) accordingly.

The Proportional value (the 'P' in PID) is the correction to the current absolute feedback error (the measured position of the servo motor). So in the case of an Electronic Leadscrew, if the leadscrew is rotating slower than the spindle, the Proportional value speeds up the leadscrew. If the leadscrew is rotating slower than the spindle, the Proportional value slows down the leadscrew.

Without dividing into the math, the Integral and Derivative values (the 'I' and 'D' in PID) filter (or smooth) the Proportional feedback correction based on the sum of recent errors and the rate at which the system error has been changing.



Note that this error has nothing to do with pulse counts. One count per spindle rev or 40,000, the steady-state error is still inherent in a proportional system.

It has a lot to do with it! The higher the pulse counts, the lower the proportional error (the error between spindle encoder measurements) and the smaller the PID adjustment. In other words, a PID system settles much quicker with a high resolution encoder, than with a low resolution encoder.

This applies to any PID system in general, not just the electronic leadscrew. That's why high-end CNC systems have high-resolution servo encoders.


The classic fix is to abandon the purely proportional system and add an integration element. That's the "I" in a PID controller. There are other tricks which should be able to do the job. But I didn't see any of them so much as mentioned in the Yahoo group.

The hobbyist electronic leadscrews (including John Dammeyer's on the Yahoo Group) have no feedback, and therefore cannot implement a PID loop.

That was my point in my first post -- they're relying on brute force: a spindle motor big enough that it doesn't stutter under load, and a strictly feed-forward stepper motor that's big enough to drive the leadscrew without missing steps.

As I said earlier, and confirmed by John, who's actually built it, the feed-forward systems have issues with cutting loads, and starting and stopping. My point was that a feedback-based servo system would be a lot more accurate and reliable, at the cost of additional complexity.

I'm building a PID-controlled, servo version of Brian/John's Electronic Gear Hobber (basically, a simple form of electronic leadscrew). I'm using a Gecko 340 servo drive, which implements PID control. I haven't built a spindle mount for the Heidenhain encoder, but it's pretty cool to watch the servo motor driving the T&C Grinder workhead I'm using as the gear hobber spindle (with an ER-40 adapter): I can spin the Heidenhain forward or backward and radically alternate back and forth, and the 1/4 HP Electro-Craft servo keeps perfect sync with it.

rantbot
04-20-2008, 01:38 AM
It has a lot to do with it! The higher the pulse counts, the lower the proportional error (the error between spindle encoder measurements) and the smaller the PID adjustment. In other words, a PID system settles much quicker with a high resolution encoder, than with a low resolution encoder.I'm not talking about transient errors. Even when transients have settled out (which is what the derivative signal is for), there is a steady-state error. This is true even if the error signal is perfect - infinite pulse count, etc. The expression e-1/(1-K) has no term for pulse resolution. If the error signal is crummy, that will, naturally, introduce more errors which are not included in the steady-state error equation.

rantbot
04-20-2008, 02:08 AM
You're mixing terminology. The hobbyist electronic leadscrew projects, including the Yahoo Group ELS project, aren't doing feedback at all -- they're strictly open loop. So there's no feedback, and therefore no feedback errors to measure. I was concerned initially with Fritz Linck's 2001 paper, available at

http://www.homemetalshopclub.org/projects/electronic_lead_screw/els.html

Here is Herr Linck's block diagram -

http://mysite.verizon.net/vzeehv3p/escrew2.jpg

It clearly shows a closed-loop control system, although whether it could strictly be called a "phase-locked loop" is perhaps open to interpretation. The error signal is

e = a(spindle position) - b(leadscrew position)

with some suitable constants a and b which account for the number of pulses per rev of the spindle and leadscrew.

Or, in Linck's terminology,

e = (Count Upwards) - (Count Downwards)

The DAC and "Power Driver" turn the error signal into a drive signal. The proportionality constant, or gain, depends on the usual stuff - the voltage gain of the "Power Driver," motor windings, any inline gearing or belts, etc.

The Yahoo group started off with a similar system. The extensive subsequent wheedling about how many pulses/rev of the spindle are needed would only make sense so long as they continued to talk about a feedback system, albeit a very primitive one.
_____________________
[update] Hmmm. No, I suppose the Yahoo group could be talking about an open-loop system and still be considering pulse counts per rev. But it's hard to believe they'd waste so much talk on such a simple system.

bob ward
04-20-2008, 06:01 AM
That was my point in my first post -- they're relying on brute force: a spindle motor big enough that it doesn't stutter under load, and a strictly feed-forward stepper motor that's big enough to drive the leadscrew without missing steps.

As I said earlier, and confirmed by John, who's actually built it, the feed-forward systems have issues with cutting loads, and starting and stopping.

From what I see of stepper motor systems, (and I am nowhere near being an expert) they tend to be open loop systems, great faith being placed in an oversize stepper motor as mentioned above.

At the risk of over generalising:-

Is much complexity or cost added to a stepper motor system if a feed back system is included?

Or, if you need a feed back system because you can't quite trust the steppers, is it better to abandon the steppers and use a servo system?

rantbot
04-20-2008, 10:48 AM
Or, if you need a feed back system because you can't quite trust the steppers, is it better to abandon the steppers and use a servo system?Ah, well, "better" is one of those words.

The reason for the drift of industrial users back toward linear servos, after the brief flurry of stepper dominance a few decades ago, is not so much about "trusting" the steppers, but rather because (1) for a given package size and power consumption, the servo can be faster, and (2) extreme accuracy in positioning systems is much cheaper, because only the feedback sensor must be very accurate, rather than the entire drivetrain.

Servo systems have drawbacks. Perhaps the most serious nowadays is that they're harder to understand than common stepper systems. Start talking about Bode plots, transfer functions, loop gains, dead zones, or pole-zero diagrams - all very important stuff - and people's eyes start glazing over mighty fast. And who can blame them?

lazlo
04-20-2008, 10:57 AM
From what I see of stepper motor systems they tend to be open loop systems, great faith being placed in an oversize stepper motor as mentioned above.

That's right -- feedback systems are rare on stepper motors. Even rarer are stepper drivers/controllers that support steppers with encoder feedback. Mach 3 doesn't support it.

Closed-loop control on stepper motors is further complicated by the fact that they move in 1.8 increments (200 steps per revolution). Microsteps aren't real steps -- they're interpolated steps, so that doesn't help with the control loop...


Or, if you need a feed back system because you can't quite trust the steppers, is it better to abandon the steppers and use a servo system?

Exactly. If you need the accuracy and reliability of a closed-loop feedback system, you might as well go for a servo motor.

Evan
04-20-2008, 11:06 AM
However, when you drive a stepper in a fine microstep mode the waveform approximates a sine wave and the stepper begins to act as a servomotor with the consequent requirement for closed loop control. The modern drivers have blurred the distinction between a servo and a stepper and some of the servo products in the market are really stepper designs with a different name.

lazlo
04-20-2008, 11:08 AM
Originally Posted by lazlo
It has a lot to do with it! The higher the pulse counts, the lower the proportional error (the error between spindle encoder measurements) and the smaller the PID adjustment. In other words, a PID system settles much quicker with a high resolution encoder, than with a low resolution encoder.
The expression e-1/(1-K) has no term for pulse resolution.

It does -- it's t the time-interval in the proportional calculation, and dt on the integral calculation.

More importantly, since PID is a linear system, the gain in the proportional error correction is linearly proportional to the time constant (the spindle encoder resolution). So like I said above, the more often you calculation the proportional error correction, the smaller the gain will be, and the quicker the system will settle.

lazlo
04-20-2008, 11:10 AM
However, when you drive a stepper in a fine microstep mode the waveform approximates a sine wave and the stepper begins to act as a servomotor with the consequent requirement for closed loop control.

It doesn't Evan -- that's a common myth amongst hobbyists. Microstepping is just interpolating the sine waves between physical poles, so it's nowhere close to a servo -- you can't move a stepper to a particular microstep position, for example, and the torque drops off dramatically when you're microstepping.

Microstepping is mostly used to reduce stepper motor resonance -- not to improve the positional accuracy of the stepper system.

If you Google "Microstepping Myths", you'll find dozens of articles explaining this, including one Mariss wrote, but here's one from Faulhauber:

http://www.faulhaber-group.com/n391003/n.html
PDF download: http://www.micromo.com/servlet/com.itmr.waw.servlet.FileViewer?sprachid=1&kid=391003&fid=391018&kdid=40929

Microstepping: Myths and Realities

The lure of Microstepping a two-phase stepper motor is compelling. Visions of Microstepping a 1.8-degree hybrid stepper motor with 256 microsteps per full step flash in your mind. The resolution of 51,200 microsteps per revolution entices you. You’re glad you don’t own stock in high-resolution encoder companies.

Where’s the catch?

The real compromise is that as you increase the number of microsteps per full step the INCREMENTAL torque per microstep drops off drastically. Resolution increases but accuracy will actually suffer.

Few, if any, stepper motors have a pure sinusoidal torque vs. shaft position and all have higher order harmonics that in fact distort the curve and affect accuracy. And while microstepping drives have come a long way too, they still only approximate a true sine wave.

Significant too is that any load torque will result in a “magnetic backlash”, displacing the rotor from the intended position until sufficient torque is generated.

What Does It Mean?

The consequence is that if the load torque plus the motor’s friction and detent torque is greater than the incremental torque of a microstep successive microsteps will have to be realized until the accumulated torque exceeds the load torque plus the motor’s friction and detent torque.

Simply stated, taking a microstep does not mean the motor will actually move! And if reversing direction is desired a whopping number of microsteps may be needed before movement occurs. That's because the motor shaft torque must be decremented from whatever positive value it has to a negative value that will have sufficient torque to cause motion in the negative direction.

Accuracy vs. Resolution

“What if the motor is not loaded?” you ask? Thinking of using microstepping for some type of pointing or inertial positioning?

Well, the stepper motor still has friction torque due to its bearings and it has a detent torque, in addition to other harmonic distortions. You’ll have to “wind up” enough incremental torque to overcome the bearing friction. Even more disruptive than the bearing friction is the detent torque, which is typically 5 to 20% of the holding torque. Sometimes the detent torque is adding to the overall torque generation, sometimes it is subtracting from the powered torque generation. In any case it wrecks havoc with your overall accuracy.

Indeed, some manufacturers fabricate “microstepping” versions of their motors. Their efforts typically are to reduce the detent torque, usually at the expense of holding torque, to make the torque vs. rotor position closer to a sine wave, and to improve linearity of torque vs. current. These efforts reduce, but do not eliminate the compromises associated with microstepping in regards to accuracy.

How about using a lookup table to “correct” for the inaccuracies in the motor and microstepping drive? That too has been utilized. The problem is that if the load torque changes from when the lookup table was made the results can be worse than if you had not utilized a “calibrated” table at all!

Why Microstep Then?

There are still compelling reasons other than high resolution for microstepping. They include:

• Reduced Mechanical Noise.
• Gentler Actuation Mechanically
• Reduces Resonances Problems

In summary, although Microstepping gives the designer more resolution, improved accuracy is not realized. Reduction in mechanical and electromagnetically induced noise is, however, a real benefit. The mechanical transmission of torque will also be much gentler as will a reduction in resonance problems. This gives better confidence in maintaining synchronization of the open loop system and less wear and tear on the mechanical transmission system.

In fact, taking an infinite number of microsteps per full step results in two-phase synchronous permanent magnet ac motor operation, with speed a function of the frequency of the ac power supply. The rotor will lag behind the rotating magnetic field until sufficient torque is generated to accommodate the load.

Evan
04-20-2008, 11:51 AM
What you say is true, in an open loop system. As soon as the loop is closed a stepper can be driven much like a servo. And, if variable reluctance steppers are used, as I intend to do, then the distinction becomes one without a difference. Modern hybrid VR steppers take it a step further (:rolleyes:) by using PM rotors unlike the older VR steppers I have. The new hybrid VR steppers are operated in synchronous mode.

http://vts.bc.ca/pics3/hybrid.jpg

lazlo
04-20-2008, 12:03 PM
What you say is true, in an open loop system. As soon as the loop is closed a stepper can be driven much like a servo.

You can drive a stepper closed-loop like a servo, but you won't have anywhere near the accuracy or performance of a servo, because you can't accurately position the rotor in between 1.8 steps, and the stepper torque drops off dramatically the more you microstep.

It's going to be a b!tch to tune the PID loop, because you'll have discrete 1.8 positional "notches" in the feedback loop. This is one of the big reasons why closed-loop stepper systems are rare.

By the way, are you planning to make your own closed-loop stepper driver and software? Mach 3 doesn't support closed-loop control of steppers, and neither do most hobbyist stepper drivers.

rantbot
04-20-2008, 08:29 PM
It does -- it's t the time-interval in the proportional calculation, and dt on the integral calculation.
No, that equation is the steady-state offset error as a function of loop gain. It has no time dependence at all. And it has nothing to do with sampling rates. Any proportional system, no matter how the error signal is measured, will have this offset error. And PID control doesn't come into it. It's only for proprotional control, of the sort described in Linck's paper.

lazlo
04-20-2008, 09:22 PM
It does -- it's t the time-interval in the proportional calculation, and dt on the integral calculation.
No, that equation is the steady-state offset error as a function of loop gain. It has no time dependence at all. And it has nothing to do with sampling rates.

At each time interval (which is inversely proportional the spindle encoder interval), you calculate the PID value as:

http://upload.wikimedia.org/math/1/8/2/182596e4b557d114f13d58cf1cfb2068.png

In that equation, Ti is the integral time: t in my equations, and Td is the derivative time: dt in my equations.

Notice in the PID equation, that the gain (Kp) is inversely proportional to the integral time Ti , or t. So as the shaft encoder on the lathe's spindle increases in resolution, Ti / t decreases, and the gain value decreases proportionally.

In other words, the more often you're sampling the proportional error, the smaller the gain value, and the quicker the PID controller stabilizes. Like I said before, this is why commerical CNC systems have high resolution shaft encoders...

Evan
04-20-2008, 10:59 PM
By the way, are you planning to make your own closed-loop stepper driver and software? Mach 3 doesn't support closed-loop control of steppers, and neither do most hobbyist stepper drivers.

Yes. I already have the low level software written from years ago to run on a 65XX cpu. It includes 2 axis interpolation and six point acceleration curves. The drivers for the VR steppers are dead simple as they are three phase wave drive. To reverse just reverse the sequence. No H bridges required, just hefty switching transistors.

lazlo
04-20-2008, 11:07 PM
Yes. I already have the low level software written from years ago to run on a 65XX cpu. It includes 2 axis interpolation and six point acceleration curves. The drivers for the VR steppers are dead simple as they are three phase wave drive.

I think you're missing the point Evan. The Gecko/Rutex/Larken closed-loop servo drivers take step-direction input, but the drivers themselves calculate the PID control loop -- not the host PC. In other words, the Gecko/Rutex/Larken servo drivers have 32-bit controllers on-board to calculate the PID control.

These servo drivers take step/direction input from Mach 3.

So in order to get your stepper motors to work on closed-loop control, you'll have to build an H-bridge driver tightly integrated with a powerful microcontroller on each axis.

That seems like an awful lot of work when the end result will be lower performance than a real servo system...

Evan
04-21-2008, 01:52 AM
No point missed. The 65XX (actually 65C816) controller is part of the driver, not the PC. You sent it HPGL commands via RS232.

You can't drive the non-hybrid VR steppers with an H bridge. They have no magnets so changing the polarity makes no difference. The stator windings are all tied together to a single common on one side and to one of three separate wires on the other end. The armature is a piece of slotted iron not much larger than the motor shaft itself. As a result it has very low polar moment of inertia and will accelerate very quickly.

I do it because I enjoy doing it, not to save money

rantbot
04-21-2008, 03:25 AM
At each time interval (which is inversely proportional the spindle encoder interval), you calculate the PID value as:
Why do you keep posting PID stuff? It's irrelevant. I'm talking about steady state offset error in proportional feedback systems, not PID. Of course both the I and D portions of a PID system are functions of time. The proportional part of the transfer function is not a function of time. Neither is the steady state offset error - it wouldn't be "steady state" if it was a function of time.

The phase locked loop described by Linck is a proportional feedback system, nothing else. And looking at the block diagram of Linck's system, I'd say that steady state offset error could be a problem. And that problem has nothing at all to do with pulse counts. The steady state offset error can't be lowered by increasing the pulse count of the spindle signal. It is equal to the expression I gave earlier, which involves only the proportional gain - no other factors at all.

Steady state offset error isn't some name I just made up, that's what it's called in classical control theory. It shows up in a system with position feedback when it is given a ramp input - that is, when a positioning system tries to maintain a constant velocity by following a position error signal. This is what Linck's system does.

lazlo
04-21-2008, 09:46 AM
Why do you keep posting PID stuff? It's irrelevant.

We're completely talking past each other. My point is that a PID controlled servo implementation of an electronic leadscrew would be more accurate and reliable, and that you want to use the highest-resolution spindle encoder that you can get.

But you're apparently talking about the German guy's PLL implementation.


The phase locked loop described by Linck is a proportional feedback system, nothing else.

It's actually a phased-lock loop, which you can argue is a greatly simplified proportional feedback system. He has identical clocks on the spindle and the leadscrew, and he has an up/down count to measure the phase error between the two clocks.

PLL's typically have a dead-band to deal with proportional offset error -- basically, a hysteresis zone.


Steady state offset error isn't some name I just made up, that's what it's called in classical control theory.

I'm well aware of that -- I have a Master's Degree in Electrical Engineering. :)

The magnitude of the proportional offset most definitely has to with the pulse count. Look at the proportional term (the 'P' in 'PID') in the classical PID formula I posted above:

http://upload.wikimedia.org/math/3/f/8/3f80d26e2e621e0f123bb26e80e609e5.png

Kp is the proportional gain we keep talking about, which is the scalar value applied to correct the measured proportional error: e(t).

See the t there? The more often you sample the proportional error (i.e., the higher the spindle resolution), the smaller the proportional error will be, and the smaller the proportional offset will be.

jcdammeyer
01-03-2009, 08:57 PM
Simon, no one answered your question, and folks here have asked for a synopsis of electronic leadscrews every once in awhile, so here it goes...

As far as I've seen, all the hobbyist Electronic Leadscrews (and Brian Thomson/Sir John's Electronic Hobber) have taken the open-loop, large stepper motor approach. But if you take that approach, it takes a lot of tweaking to get everything set up, and then you have to watch it carefully, or the divider circuit will lose sync with the spindle, and crash the carriage into the headstock. John Dammeyer (the guy driving the Yahoo ELS) had that problem a lot, so he's added the ELS to an old Gingery lathe, but he hasn't added it to his South Bend lathe, which should tell you something.



The only thing it will tell you is that I'm very busy and haven't had time to do the conversion of the South Bend. I have also not changed over the spindle motor to 3 phase with a VFD and I had that in a box sitting around just shortly after I acquired the SB and that's now almost 3 years ago. (or is it 4?).




In answer to your last question: you still need to use the thread dial to re-start the threading pass, because, like a human, it needs to have the same starting point to engage the threads that have already been cut. The only way to avoid the thread dial is to completely automate (CNC) the Z-axis, so the electronic leadscrew circuit rewinds the carriage to a known point, and re-starts the thread pass by itself. But that's really full-blown CNC...

Cheers,

Robert

In the case of the ELS the half nut is left engaged. Just as you would if you were doing metric threads on an imperial lathe with an imperial lead screw. The threading dial is useless then too.

Full blown CNC would be automating the cross slide. The ELS can be set up to just tell you to insert the tool to the right depth and then tap the start button. The index pulse from the spindle tells the ELS when to start turning the lead screw and the thread pass starts again. At the end of the pass, the Z axis is stopped and you're asked to remove the tool from the work. Not really full CNC but awfully handy.

John Dammeyer

Doozer
01-03-2009, 09:32 PM
http://web1.automationdirect.com/images/products/medium/m_sva2040.jpg

http://web1.automationdirect.com/adc/Home/Home

Click on Servo Systems.


The above link is to AutomationDirect. They have motor and driver servo systems that will support the electronic leadscrew function. You buy the controller, select a motor, power cable and encoder cable (for the motor). Additionally you need an encoder for your lathe spindle (look in their catalog).
I built a rolling lathe using one of these from AutoDirect, and I know the setup. I talked with their tech support engineers about using this in an electronic leadscrew application, and they showed me how. In the configuration software for the servo drive, there are two input variables you can enter. They are a turns-ratio from an externally connected encoder (the spindle) to the output of the servo motor (the leadscrew). Enter a 1 and a 1, the motor spins in sync with the encoder. Enter a 1 and a 3, the motor spins one third that of the encoder. It can be any ratio, so metric and half threads per inch, no problem.
There is no real "front end" user interface that is neat and tidy. Just entering the info by their software. So no easy way to enter TPI or anything. You need to know your leadscrew pitch and calculate all this into your ratio. A little bulky, but very doable. Quickly adding the driver, motor, cables and encoder, you are up to $1000, so I dunno if it is worth it, but it will work.

--Doozer

lazlo
01-03-2009, 09:45 PM
http://web1.automationdirect.com/images/products/medium/m_sva2040.jpg

http://web1.automationdirect.com/adc/Home/Home

The above link is to AutomationDirect. They have motor and driver servo systems that will support the electronic leadscrew function. You buy the controller, select a motor, power cable and encoder cable (for the motor).

Hi Doozer,

That's exactly what I'm doing with my Bridgeport Servo retrofit:

http://bbs.homeshopmachinist.net/showthread.php?t=31628

The "electronic gear" function on the Mitsubishi servo controller I'm using (the MR-J2S-100) divides the quadrature output (off the spindle) by any decimal value.

You don't even need a separate encoder for the leadscrew -- just the encoder on the second servo motor for the leadscrew.

Cheers,

Robert

Doozer
01-03-2009, 10:01 PM
So you are turning a Bridgeport into a gear hobber?
Schweett!!
I do see what you mean about reading the pulses off the spindle servo.
Are you driving the spindle motor with a VFD and the table screw with a servo controller?
Can you drive a servomotor with a VFD? Or are you using two servo controllers?
Keep us posted. Sounds cool. Any cheaper source for this stuff other than Automation Direct?
--Doozer

lazlo
01-03-2009, 10:14 PM
So you are turning a Bridgeport into a gear hobber?
Schweett!!

That's the plan :)


Are you driving the spindle motor with a VFD and the table screw with a servo controller?

You can actually do leader/follower mode with some of the Mitsubishi Vector VFD's, but you need a encoder feedback module that costs more than the VFD.
I just got a pair of servos and matching controllers: a 2 HP servo for the spindle, and a 1/2 HP servo to drive a T&C grinder workhead (for the gear blank).


Any cheaper source for this stuff other than Automation Direct

Ebay. I couldn't possibly afford these big servo motors or controllers retail...

To give proper credit, I had cobbled together a servo driven gear hobber with conventional DC servos and Gecko 320's, and I was trying to figure out how to mount an output shaft encoder on the Bridgeport spindle, when I saw Macona's 10EE servo retrofit. When I saw the "electronic gear" function burried in the Mitsubishi servo controller manual, the light-bulb went on :)

Doozer
01-03-2009, 10:30 PM
The only problem with ebay is,
if you buy a servodrive or a servomotor,
you need the software, the communication cable,
the manual for the pin-outs and connection schematic,
and other things, etc.
It just seems like a lot of unknowns.
I am pretty good with electronics, but not super good,
so the package and support automationdirect puts together
is appealing, be it you pay for it.
Is it easier to get all this information and software than I realize?
--Doozer

lazlo
01-03-2009, 10:41 PM
Is it easier to get all this information and software than I realize?

No, it's a PITA. Each vendor (Mitsubishi, Parker, Fanuc, AB, Yaskawa,... ) has their own proprietary servo series, and encoder formats, so it's a circus figuring out which servo motor and controller pair work together. Then there's 100V, 200V... variants of each servo and controller...

It's not rocket science, but you have to read through the fine manuals -- and match with what you find on Ebay.

The servo cables are also unbelievably expensive -- they use Milspec DIN connectors, and of course every line of every servo vendor has a different encoder pinout. So I try really hard to buy a motor that has it's own cables, even if the cables are severed (from a system pull). It's easy enough to splice the cable back together.

I've pretty much focused on Mitsubishi and Yaskawa -- seems like Fanuc and Allen-Bradley rebrand so much stuff that you can't make heads or tails out of the part numbers.

It all probably sounds worse than it really is -- if you get stuck, you can always post a question about compatibility and/or pinout on CNCZone, and usually get a response pretty quickly, especially from "Al". Mits tech support is also extraordinary, even when you tell them you're a HSM'er.

Or shoot me or Macona an email -- I've got MickeyD excited about using a big 3 HP Mits servo on his Hurco CNC machine :)

jcdammeyer
01-04-2009, 07:39 PM
http://web1.automationdirect.com/images/products/medium/m_sva2040.jpg

http://web1.automationdirect.com/adc/Home/Home

Click on Servo Systems.


The above link is to AutomationDirect. They have motor and driver servo systems that will support the electronic leadscrew function.
[SNIP]
Quickly adding the driver, motor, cables and encoder, you are up to $1000, so I dunno if it is worth it, but it will work.

--Doozer

Although without any sort of user interface this is essentially what Fritz did with his discrete logic ELS. Maris from Gecko also talked about the now defunct G100 being able to do exactly the same thing.

The ELeadscrew group discussed various permutations of this type of solutions at the beginning of the project. I don't think anyone would deny that this sort of synchronized tracking would work. The real question is how viable something like this would be given the cost.

One of the up sides of the ELS I designed is that even with only a single motor driving the Z axis lead screw, the unit will still decelerate and stop 0.001" from the spinning jaws of the chuck. The ratiometric approach from auotmation direct etc. doesn't allow that.

The ELS project addresses the entire system and not just the turning of the motor.

John Dammeyer

jcdammeyer
01-04-2009, 07:58 PM
Hi Doozer,

That's exactly what I'm doing with my Bridgeport Servo retrofit:


You don't even need a separate encoder for the leadscrew -- just the encoder on the second servo motor for the leadscrew.

Cheers,

Robert

Very cool!!!!

I'm headed in the same direction but using a slightly different approach. I've decided to use the UHU servo controller project for the XY axis for my mill. There's an extension to that original DC servo driver called the HP-UHU. It's a nice board and I have two plus an original layout board. Eventually I'll get it all mounted on my mill. The Knee will run with a stepper motor for Z motion. Eventually I may add motion to the quill.

Anyway, the plan for the next generation ELS is to create a piggy back CPU board that plugs into the socket holding the ATMEL processor. That way the only design work required is for a processor board and the existing High Power DC Servo control isn't touched.

So in addition to designing a fairly standard PID based Servo drive with step/dir input, the software will handle that extra encoder much like the Automation Direct etc. type drives with one difference. The ELS motion algorithms will be part of this with the ultimate goal of being able to hand crank the spindle and have the leadscrew track (forwards and backwards).

That an all the rest of the features of the ELS like taper turning.

This is still all on the drawing board. No idea when it will see the life of day.

John Dammeyer

ckelloug
01-04-2009, 09:10 PM
I can't say that I was that good at control theory way back. In my journeys doing software work however, I did run across a book that stated that a Phase Lock Loop is a digital implementation of a Kalman filter. I saw this the time I designed and implemented a Kalman filter to estimate intermittent GPS data for an application that required position updates even when we missed a 1 Hz GPS update.

If that's correct, the PLL is a statistically optimized proportional controller. I know from experience, that the smaller the time step between data points, the more accurate the Kalman filter's prediction of position because the amount of uncertainty in it's prediction is proportional to the time between updates.

If you're linearly interpolating position between now and one time step in the future, the closer the future is to now, the less that an error in your estimated slope will make the calculation of position when the future becomes now.

For an out-there argument, You could probably use an entropy calculation from information theory to show that as the time interval between updates gets longer, the amount of information that you have about future position is smaller and thus your prediction is less good.

If the position samples are close together, then the number of bits required to accurately represent the position update before the next sample is small. If the time step is larger then the number of bits required to represent the position goes up.

If a future position is represented by adding a 12 bit number to your current position and you have the upper 8 bits then your prediction will be much better than the case where the future number is created by adding a 24 bit number to the current position where you only have the upper 8 bits.

So, from a rather unconventional argument, I'm going to have to say that I agree with lazlo.

If you are getting a certain entropy (information rate has a similiar form to the Entropy of Statistical Mechanics but is different stuff) rate from the encoder on velocity, the position you predict will predict will have as many bits of entropy as the encoder gave you when it measured. As you try to predict position farther and farther into the future, you have the same amount of entropy but the entropy required to exactly describe the position goes up because the number of places it could be goes up. Therefore uncertainty of the predicted position goes up. If the time step is smaller, then the uncertainty cannot grow as much before the next encoder pulse.

So if you look at P=K*e(t) and realize that the e(t) term will be an average e(t) value between updates, then the quicker the updates, the smaller the value of e(t) each time and the smaller the control output has to be.

jcdammeyer
01-04-2009, 10:44 PM
So if you look at P=K*e(t) and realize that the e(t) term will be an average e(t) value between updates, then the quicker the updates, the smaller the value of e(t) each time and the smaller the control output has to be.

That's true but... IIRC there's no point in sampling faster than 2x the response time of the system. The same Nyquist rule applies I believe. Sampling rate is especially important for the integral error term which could roll over if the size of the variable holding it is too small.

John Dammeyer

barts
01-04-2009, 11:20 PM
That's true but... IIRC there's no point in sampling faster than 2x the response time of the system. The same Nyquist rule applies I believe. Sampling rate is especially important for the integral error term which could roll over if the size of the variable holding it is too small.

John Dammeyer

What I've done to get high accuracy motion control is to use a much higher frequency inner control loop to control servo velocity, and implement a lower update rate on the (digital) outer position loop. This allows the computer to calculate desired position and velocity profiles, and drive the servo amp's current control input w/ the velocity error signal.

This makes path planning across multiple axes easier, and the large frequency difference between the position and velocity loops keeps them decoupled.

- Bart