Author Topic: Another daft idea, electronic lead screw.  (Read 10468 times)

Offline John Hill

  • The Artful Bodger
  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2016
  • Country: nz
Another daft idea, electronic lead screw.
« on: March 15, 2014, 08:26:30 PM »
First off, I know a lot of people have done this and I know there is much debate as to it being a worthwhile project but I would like to at least dip my toe in the water with regard to the subject of CNC.

I have a nice stepper which might be big enough for the job and I have been looking under the cover of my generic Chinese 12x36 lathe.

The idea is to mount a stepper with a pinion to engage with the 120/127 compound gear when the banjo is swung away from the spindle pinion (no issues then of having electronic and mechanical drive engaged at the same time!).  That bit looks simple enough.

Then I need a spindle encoder but fixing anything to the spindle might be a challenge due to the big hole that has to be kept clear right through the middle!  There is the pinion that turns at spindle speed and normally engages the 120/127 compound gear but fixing anything to that would be a nuisance when using the normal mechanical drive scheme.

There is another option and that is to attach an encoder to the drive pulley which is geared to the spindle.  It turns at a more or less constant speed of about 700rpm.  If I used that to mount my encoder the encoder would be turning faster for most (all?) threading operation and slower than spindle speed when high speeds are selected. Obviously my software would have to be told what drive gear was engaged.

There is so much to think about!  : :scratch:



« Last Edit: March 15, 2014, 08:59:15 PM by John Hill »
From the den of The Artful Bodger

Offline Manxmodder

  • Hero Member
  • *****
  • Posts: 739
  • Country: gb
Re: Another daft idea, electronic lead screw.
« Reply #1 on: March 15, 2014, 09:06:24 PM »
You could consider a one to one ratio toothed belt drive from the spindle to the encoder,should be pretty simple to design and would give you greater flexibility as to where to mount the encoder.....OZ.
Helixes aren't always downward spirals,sometimes they're screwed up

Offline John Hill

  • The Artful Bodger
  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2016
  • Country: nz
Re: Another daft idea, electronic lead screw.
« Reply #2 on: March 15, 2014, 10:37:28 PM »
Good idea Oz,  I wonder how many steps I need per revolution of the spindle?
From the den of The Artful Bodger

Offline Manxmodder

  • Hero Member
  • *****
  • Posts: 739
  • Country: gb
Re: Another daft idea, electronic lead screw.
« Reply #3 on: March 16, 2014, 12:46:22 AM »
I don't have enough experience to know how many steps would be most suited but I would have thought the more the merrier.

Another possibility arises with the toothed belt method in as much as you could use a 2:1 encoder to spindle ratio and effectively double your step count simply by selection of appropriate pulley sizes :smart:.....OZ.
Helixes aren't always downward spirals,sometimes they're screwed up

Offline John Hill

  • The Artful Bodger
  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2016
  • Country: nz
Re: Another daft idea, electronic lead screw.
« Reply #4 on: March 16, 2014, 02:01:35 AM »
I have been thinking about this and it seems like more indexes than enough would make the computer software less reliable, but how man is enough? :doh:
From the den of The Artful Bodger

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8968
  • Country: gb
  • East Sussex, UK
Re: Another daft idea, electronic lead screw.
« Reply #5 on: March 16, 2014, 03:35:39 AM »
Most stepper systems are 'open loop' ie rely on motor turns and gear ratio to tell you where you are. Servo motors however invariably use an encoder in a feed back loop.

So if you already have a 'nice stepper that might be suitable ...' perhaps you don't need an encoder ?
Andrew Mawson
East Sussex

Offline John Hill

  • The Artful Bodger
  • Madmodder Committee
  • Hero Member
  • *****
  • Posts: 2016
  • Country: nz
Re: Another daft idea, electronic lead screw.
« Reply #6 on: March 16, 2014, 04:21:27 AM »
The stepper will be driving the lead screw so the software needs to know what the spindle is doing.  Some on-line comments indicate just one index per revolution is sufficient.
From the den of The Artful Bodger

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8968
  • Country: gb
  • East Sussex, UK
Re: Another daft idea, electronic lead screw.
« Reply #7 on: March 16, 2014, 05:14:23 AM »
When I 'CNC'd' a Denford ORAC lathe many years ago I fixed a slotted disk to the spindle with a single slot and simple forked opto sensor which was quite satisfactory for threading. That was in the days of TurboCNC rather than MACH or EMC, but no doubt the threading algorithms will be similar.

Now on my Traub TND350G the spindle has a 36,000 line encoder that is geared up to something like 90,000 lies per rev but that is perhaps a bit of overkill for simple threading !
Andrew Mawson
East Sussex

Offline John Stevenson

  • In Memoriam
  • Hero Member
  • *****
  • Posts: 1643
  • Nottingham, England.
Re: Another daft idea, electronic lead screw.
« Reply #8 on: March 16, 2014, 08:44:12 AM »
that is geared up to something like 90,000 lies per rev

You said it  :ddb:
John Stevenson

Offline awemawson

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8968
  • Country: gb
  • East Sussex, UK
Re: Another daft idea, electronic lead screw.
« Reply #9 on: March 16, 2014, 09:43:10 AM »
that is geared up to something like 90,000 lies per rev

You said it  :ddb:

I obviously need longer fingers to reach the keys !
Andrew Mawson
East Sussex

Offline BaronJ

  • Full Member
  • ***
  • Posts: 243
  • Country: gb
  • Grumpy Old Git !
Re: Another daft idea, electronic lead screw.
« Reply #10 on: March 16, 2014, 04:35:17 PM »
First off, I know a lot of people have done this and I know there is much debate as to it being a worthwhile project but I would like to at least dip my toe in the water with regard to the subject of CNC.

I have a nice stepper which might be big enough for the job and I have been looking under the cover of my generic Chinese 12x36 lathe.

The idea is to mount a stepper with a pinion to engage with the 120/127 compound gear when the banjo is swung away from the spindle pinion (no issues then of having electronic and mechanical drive engaged at the same time!).  That bit looks simple enough.

Then I need a spindle encoder but fixing anything to the spindle might be a challenge due to the big hole that has to be kept clear right through the middle!  There is the pinion that turns at spindle speed and normally engages the 120/127 compound gear but fixing anything to that would be a nuisance when using the normal mechanical drive scheme.

There is another option and that is to attach an encoder to the drive pulley which is geared to the spindle.  It turns at a more or less constant speed of about 700rpm.  If I used that to mount my encoder the encoder would be turning faster for most (all?) threading operation and slower than spindle speed when high speeds are selected. Obviously my software would have to be told what drive gear was engaged.

There is so much to think about!  : :scratch:


Hi John,
Grab your self an old computer mouse, the type that has a ball in it.  Inside are two slotted wheels and the optics that sense them. There is also the circuitry to detect rotation and feed out the signal.  They require a 5 volt supply and output a 3.5 volt square wave.





Best Regards:
                     Baron

Offline tom osselton

  • Hero Member
  • *****
  • Posts: 1256
  • Country: ca
Re: Another daft idea, electronic lead screw.
« Reply #11 on: March 16, 2014, 08:03:02 PM »
Nevermind just a brainfart!

Offline JohnHaine

  • Jr. Member
  • **
  • Posts: 30
Re: Another daft idea, electronic lead screw.
« Reply #12 on: March 17, 2014, 06:30:20 PM »
Stick a one pulse per rev encoder on the spindle, drive the leadscrew through a 2:1 toothed belt from your stepper, control it with mach3.  You'll never look back...

Offline JohnHaine

  • Jr. Member
  • **
  • Posts: 30
Re: Another daft idea, electronic lead screw.
« Reply #13 on: March 17, 2014, 06:32:22 PM »
By the way the simplest way to make the encoder is to stick a small rare earth magnet on the spindle and use a Hall effect sensor.  See Tony Jeffree's website for details.

Offline velocette

  • Full Member
  • ***
  • Posts: 152
  • Country: nz
Re: Another daft idea, electronic lead screw.
« Reply #14 on: March 17, 2014, 10:33:43 PM »
Hi
Not a "Daft Idea" at all.  But unfortunately it's been done before. Click on the link it may help

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

Bit over my head I'm afraid

Eric

Offline BaronJ

  • Full Member
  • ***
  • Posts: 243
  • Country: gb
  • Grumpy Old Git !
Re: Another daft idea, electronic lead screw.
« Reply #15 on: March 18, 2014, 06:19:29 PM »
I agree with the comments by John.  A magnet and hall sensor will provide a pulse every time the magnet passes the sensor.
The reason that I suggested using an old computer mouse, is that all the circuitry needed for providing pulses and direction information is already built in.  Twice !
The circuitry is similar to the top drawing of figure five in the notes that Eric linked to.
Many years ago I built an X-Y plotter using small electric model motors and the toothed wheels and sensors from an old mouse.  It wasn't very sensitive but it did prove that it was feasible.



Best Regards:
                     Baron

Offline hopefuldave

  • Full Member
  • ***
  • Posts: 189
  • Country: gb
Re: Another daft idea, electronic lead screw.
« Reply #16 on: April 06, 2014, 08:31:25 AM »
Interesting...

I'm a bit late on this (busy week in the new-job-at-last) but I'll join in anyway.

It occurs to me that if the hall sensor and magnet were both fixed (together), the spindle gear teeth could cause enough of a change in the magnetic field to read the spindle speed (and/or direction (and position) with two in quadrature (plus an "index" hall sensor and single magnet))? Wouldn't give a lot of pulses, though - I think this would be a serious issue because:

I've heard that the one-pulse setup in the forum-supported ELS leads to pitch variations with load, like when the tool reaches the work, as it's unable to do short-term corrections. The same may be true for the pair-of-counters setup that's linked, as the down-counters effectively reduce the number of pulses being compared to much less than the spindle/leadscrew resolution - not a great idea with a small number of pulses to start with!
Consider a 1mm pitch with a 8tpi leadscrew, you'd want 40 turns (5") of the leadscrew for every 127 turns (5") of the  spindle, so would be dividing by those numbers to get the correct ratio - start with a 40-tooth/slot on the leadscrew and you're down to 1 pulse/rev before making any comparisons... the spindle would present even bigger problems, divide by 127 on a 40-tooth is a pulse every 3+ revs... The 127 (ok, 25.4 x5) factor being prime makes "foreign" threads difficult to program without a LOT of encoder resolution, and we haven't even considered DP and Module pitches and the Pi factor!

I'd definitely want a VERY large number of pulses / rev of both the spindle and leadscrew, and suspect gear cutting might be easier, apart from the changewheel-swapping, than getting the software/hardware working!
Rules are for the obedience of fools, and the guidance of wise men.

Offline John Stevenson

  • In Memoriam
  • Hero Member
  • *****
  • Posts: 1643
  • Nottingham, England.
Re: Another daft idea, electronic lead screw.
« Reply #17 on: April 06, 2014, 10:29:23 AM »
The one pulse per rev works but with limitations.
The limitation is that the spindle has to be stable and that means a big motor / chuck combination where the flywheel effect can cancel out any variation.
Where you have the mini lathes and the same ilk, that's when you have problems.

I can prove this in many ways.

One way is to run a threading cycle say 14mm x 2mm pitch and thread a length of bar about 50mm long.
Do 5 bars all on the exact same program but do one at 300 revs, one at 400 revs, 500 etc.
Then offer them up to one another and check the pitches. I can guarantee that on a mini lathe or low powered lathe, not will match.
Spent over 3 months running test with Art Fenerty when he was still in charge of Mach.

Even people who say it works don't recognise the errors. If you have access to Tony Jeffreys web site on converting the Myford lathe look at the picture he puts up on threading.
In fact i'll link to it here.



Look carefully at the start threads with a flat on the top and the end threads that are sharp because the pitch error has removed the lands.
Tony didn't realise this until I pointed it out to him.

IMHO using Mach or any system that relies on a single pulse encoder is not the way to go and believe me I'm a big fan of Mach.

At the moment the only affordable way to go is using Linux CNC with a multi line encoder. It doesn't have to be a high count, I have a 400 line encoder on my gear hobber that it reads in quadrature as a 1600 line and it good enough to turn the gear blank backwards and forwards as you rock the encoder thru just a few degrees. That encode BTW was £12 from China

John Stevenson

Offline hanermo

  • Full Member
  • ***
  • Posts: 103
Re: Another daft idea, electronic lead screw.
« Reply #18 on: April 06, 2014, 02:53:43 PM »
John S. is right, but it is not the single index pulse that is the culprit.
Mach3 has several (waitfor, leadin, leadout, one more..) bugs in the threading cycle, that show up or not, in different ways (seeen 25.4 times easier with metric).

Also, probably all or almost all simple schemes have a *bad* index pulse. It is "fuzzy", and often not consistent, and thus leads to garbage-in, garbage out.
We conclusively proved this on my 12x lathe, with a 0.2 micron step size, running a servo with about 1000 kg lateral force on Z.
We did logging at 633Mhz with a centipede hw board, with nanosecond ! resolution pulses getting into a log file.

After this, Sergey K of Centipede did a new hw board, that gives a cleaned up, triggered, clean, single index pulse.
This is the index board on sale at his site.
This then enabled proving some of the Mach3 bugs, and eventually overcoming some/most of them.

A cold lathe, in the morning, ran at 530 rpm. A warm one about 540 rpm.
A single threaded groove would track within or inside 0.01 mm, in a cold lathe, when the groove was done on a warm one.
This proves that a single index pulse *can* perfectly track, in varying conditions, a single thread.

We used old copper on one test, where the groove was very bright, and a 0.01 mm variation out of groove was perfectly visible.

My lathe is an ongoing experiment in building multiaxis turning center capability, with small shop tooling.
It has been done as good as can be, with cost a secondary consideration.

SO..
single index pulse is fine. Mach3 is not. Some hw boards will thread.
I now have a dspmc, with all kit needed to thread, not yet installed.
I hope to get to it soon.
It apparantly works (and I will be, next, using an encoder, somewhere in the 5000-30.000 pulses/rev range). Or more.
Initially I will use the centipede single pulse index, and am 98% sure it will work.

Afaik, the only real realiable threading solutions on Mach3 are the kfrog, centipede, and dspmc, with some minor PP options working. I have no personal experience with kfrog.
Both the mfct and Hood report threading works with dspmc, and it can go as high as 4 Mhz (as can the centipede).
4 Mhz is desirable, very much.
I believe the SS does not work, and the sw in any case is very buggy and lacks support.
The centipede will not be upgraded for Mach4, according to Sergey, so thats out.
(Centipede has weird (not as in PP) homing, but works repeatably to 2 microns, and could be sw filtered to 1.5 microns avg positional error, with optical switches (which I use on z)).

Conclusion:
ELS can be done (had been proven with hw ELS kit and emc2) with single index, well.
It is hard to do well.
Servos will provide very much better performance.

Threading needs medium speed and very high resolution, and ideally very high acceleration (leadin-out).
This is impossible to do well with steppers - they dont have high dynamic range.

My goals are sub-micron accuracy, and at least sub-micron resolution.
At the moment I have 1 micron fysicval resolution.
The x-axis is 14 x stiffer than stock, and its already a very good light industrial lathe as stock.
I am using a 0.750 inch ballscrew, overconstrained, with screw in tension, on x.

I have still to fit a turning center ground class-1 32 mm ballscrew I have, to the z.
10.000 count servo, at the moment, going to brushless AC servo. At 1:3 to leadscrew, HTD 5 / 15 mm wide belts.
The new screw will get me to better than 1 micron, at 1:3.5 / 1:4 transmission, about 30.000 counts/turn.

I may put a low-backlash precision planetary gear on the screw, at 1:5. This would get me the right acceleration and resolution.
Fwiw..