PDA

View Full Version : How about this for cheap and simple spindle encoding ?



nheng
11-17-2007, 12:24 PM
The thread on CNC threading got me to thinking about spindle encoding methods again.

A magnet and switch (electronic or reed) is simple but limited. Encoders are great but there is the mechanical interfacing (especially on larger spindles) and some interface electronics.

How about commercial Hall effect gear tooth sensors? On a gearhead lathe, you could pick any gear which has enough teeth for your needs and is fixed to the spindle (or else you'd have to keep the machine in one selection for threading). A small mounting bracked and a hole or notch for the wire to exit the headstock is all you'd need. The sensors are already magnetically biased and are design for sensing of ferrous materials.

Whadda ya all think or is this already common?

added - of course this needs support from the software side in order to be of use but the number of "encoded" points surpasses the single point sensing by a great degree
Den

John Stevenson
11-17-2007, 12:35 PM
Den,
Only problem I can see is whatever system you use you need an index pulse.
The simple slot method works because it IS the index pulse. On multi slot indexers you usually make one wider than the rest so it knows this is the start of a new revolution.

For Christs sake don't tell Tiffie he's got to knock a tooth off a headstock gear :o

.

Weston Bye
11-17-2007, 12:35 PM
Excellent idea, it is in common use, especially in automotive applications as speed sensors. The true gear tooth sensors are more than just a Hall sensor. Usually two are paired up along with some logic and a back biasing magnet all in one package. The logic auto-tunes the sensors to provide the best output. All this comes at a cost - the cost more than a plain vanilla Hall sensor. I have quite a few of them as my work involves speed sensing and position sensing applications.

Evan
11-17-2007, 12:41 PM
You can probably provide an index pulse by gluing a small supermagnet to the side of the gear just below a pair of teeth.

nheng
11-17-2007, 12:45 PM
John, Yep, forgot about the indexing pulse. A lot of machines already have that tooth missing :D

Wes1, I've done a lot of work with digital and linear Hall devices and designed the Hall effect test system for the main US supplier to the auto industry a few years (actually, quite a few) back. When it comes to biasing them for ferrous sensing, I'm totally green except for theory. What do the entry level gear tooth sensors typically cost?

dp
11-17-2007, 01:03 PM
Harley uses them in their engines. I had one die on me while on the road in Ohio a couple summers ago and the bike wouldn't start. I was fortunate that a patron in the diner I was in had a snowmobile trailer and volunteered to haul the bike the dealer 20 miles away and 45 minutes from closing for the day. $108.00 later I was back on the road to Seattle.

If it had been simple contact points I probably could have serviced it or kept a spare handy. As it was I was at the mercy of the dealership to diagnose the problem and correct it.

That was the only mechanical failure I'd had on the road with that bike in 40,000 miles, and it was the most modern technology on that 100 year old design. So now I keep a spare in the saddle bags in case I or a friend suffer the same fate, and I've also learned how to diagnose and repair it.

They were also used on several models of RADAR systems I've worked on to indicate when the beam crosses the bow of the ship. Early RADAR systems had electromechanical means of synchronizing the scanner antenna rotation speed and position with the display screen deflection yoke rotation and were the highest maintenance items in the RADAR aside from the microwave detector crystals and klystrons.

As with the RADAR you might need to use two of them - one for positional info that senses a magnet going by once per revolution, and another to count the gear teeth going by. They don't provide directional info, so you may need a third sensor to count the spaces between the teeth if that's an issue.

Or you might just rip an optical mouse apart and see what makes them work. They're quite precise and the parts are small, and they work on any kind of surface common to the office place.

Weston Bye
11-17-2007, 02:48 PM
John, Yep, forgot about the indexing pulse. A lot of machines already have that tooth missing :D

Wes1, I've done a lot of work with digital and linear Hall devices and designed the Hall effect test system for the main US supplier to the auto industry a few years (actually, quite a few) back. When it comes to biasing them for ferrous sensing, I'm totally green except for theory. What do the entry level gear tooth sensors typically cost?

I was going to suggest this as a starting point:

http://www.allegromicro.com/en/Products/Part_Numbers/0625/index.asp

We use a product similar. I couldn't find a single quantity price but in production quantities they run somewhere around $1.50, compared to a simple Hall switch for $.25.

I realized that you (nheng) are probably in a position to understand the following:

Take a simple hall switch and position the magnet perpendicular to the sensing axis of the sensor with one pole of the magnet close to the edge of the sensor, so that the magnetic field leaving the pole of the magnet is equally split above and below the sensor. When properly positioned, the sensor will not be tripped, but when some ferrous object comes near enough to distort the field of the magnet, the sensor will trip. The magnet may have to be adjusted slightly above or below the centerline of the sensor. With proper setup, this will detect the passage of gear teeth.

I am currently working on an article on Hall sensors for Digital Machinist magazine. You guys got a rough-draft preview.;)

I have done a lot of work with 2-wire and 3-wire Hall sensors, specifically the Allegro 118x and A325x families. These sensors have programmable sensitivity. We use the programmable feature to negate tolerance stacks in the assemblies that use the sensors. When we started using the Allegro product, I was astonished to find that Allegro did not provide production-friendly programming equipment, and knew of no vendor that sold such. All that they could provide was a PC Windows-based development system.
I wound up building my own programming circuit that was compatible with a programmable logic control (PLC) system. This made automating the production process much easier.

barts
11-17-2007, 03:19 PM
This looks like it would work just fine; the use of two devices mounted half a tooth out of phase like an optical encoder would let one determine direction and would increase resolution as well. If you can mount them so that they can sense the teeth on the back gear, you'll get plenty of resolution to be able to cut close-tolerance threads.

These are also likely to ignore grease pretty well, which will make things easier.

- Bart

Weston Bye
11-17-2007, 03:31 PM
Allegro also has quadrature and direction output sensors, though not with the built-in magnet. They are made to work with a rotating magnet.

http://www.allegromicro.com/en/Products/Categories/Sensors/dual_element.asp

Evan
11-17-2007, 05:26 PM
I was thinking about this today while driving to town. I think it wouldn't be too difficult to build a computer "free" electronic gearbox similar to John's gear hobber. All that would be needed is a programmable divider that can count up/down in order to rapid the cutter back to start.

John Stevenson
11-17-2007, 05:35 PM
I was thinking about this today while driving to town. I think it wouldn't be too difficult to build a computer "free" electronic gearbox similar to John's gear hobber. All that would be needed is a programmable divider that can count up/down in order to rapid the cutter back to start.


http://homepage.ntlworld.com/stevenson.engineers/lsteve/hidden/hob%20indexer3.jpg


You mean like this ?


Mains in, encoder in, stepper motor out. gear count by the black thumbwheels on top.

.

Paul Alciatore
11-17-2007, 06:19 PM
I was recently wondering about the same thing with optical sensors. Two of them half a tooth apart so they could tell direction. That would/may eliminate the need for an indexing pulse unless they would miss a count. But I wondered if the lubrication on the gears would cause trouble with the passage of the light.

Any experience here?

nheng
11-17-2007, 06:27 PM
Evan, If you drop a PIC processor (or other small uC) in the box, you can calculate proper motion for any thread, inch or metric, odd pitches, etc. If you go the single point sensor route, I think you need to do a prediction of the motion, then calculate the number of steps to stay in sync til the next trigger. It takes a few tricks to keep it smooth with limited integer math. Den

oldtiffie
11-17-2007, 06:52 PM
Den,
Only problem I can see is whatever system you use you need an index pulse.
The simple slot method works because it IS the index pulse. On multi slot indexers you usually make one wider than the rest so it knows this is the start of a new revolution.

For Christs sake don't tell Tiffie he's got to knock a tooth off a headstock gear :o

.

Yeah right John.

Christ and I don't even know if the other exists - or care either! (I can hear the thunder and lightening - oh!! was "gastric problem" - whew!!!).

I'm too busy knocking teeth off people.

Head-stock is a valid target - I've got a "knock-off" lathe (and just about every thing else).

Why?

'Cos I'm too bloody old to knock myself or anyone else off!!

Me being too lazy might be a contributing factor too.

You are younger than me - so keep knocking yourself off while you can - enjoy yourself!!!

Thanks - I needed that.

lazlo
11-17-2007, 07:15 PM
I think it wouldn't be too difficult to build a computer "free" electronic gearbox similar to John's gear hobber. All that would be needed is a programmable divider that can count up/down in order to rapid the cutter back to start.

John's gear hobber is computer free :) It takes the pulse output from the shaft encoder on the spindle, and uses Brian Thompson's programmable divider board to generate step/direction signals for the Gecko driver. Couldn't be simpler.

Evan
11-17-2007, 08:37 PM
John's gear hobber is computer free
Precisely. For an electronic threading gearbox a couple of extra functions would be needed. It would have to return at the end of count by counting back down at the max rate and there would have to be settable backlash compensation. If it was single axis it would also have to alert the operator to back out the tool and wait for the signal to return, alert operator again and run another pass. It might just be easier to use a pic. A 65XX would be handy for that as it has a BCD math mode which could directly make use of BCD switches for tpi and length settings

John Stevenson
11-17-2007, 09:25 PM
Again it's been done.
Read the Electronic leadscrew group on Yahoo, I posted a link earlier.

.

oldtiffie
11-17-2007, 10:57 PM
John's gear hobber is computer free :) It takes the pulse output from the shaft encoder on the spindle, and uses Brian Thompson's programmable divider board to generate step/direction signals for the Gecko driver. Couldn't be simpler.

Thanks lazlo - I think I needed that.

I am a neophyte in this regard.


neophyte Also found in: Encyclopedia, Wikipedia, Hutchinson 0.05 sec.
ne·o·phyte (n-ft)
n.
1. A recent convert to a belief; a proselyte.
2. A beginner or novice: a neophyte at politics.

I'd appreciate more info on this please.

Let's see if I've got this right.

The "shaft encoder" fixed to John S's mill and driven by the mill arbor via the cogged belt generates "pulses" which are directly related to the arbor position, revs made, rev/rate at any time as measured against some datum.

In other words - so many pulses per rev absolute and so many pulses per minute to determine arbor speed (RPM) and rotary position.

OK so far?


..................it takes the pulse output from the shaft encoder on the spindle, and uses Brian Thompson's programmable divider board to generate step/direction signals for the Gecko driver..........

OK - I think I've got that.

Let's see.

Am I correct in assuming that Brian Thompson's programmable divider board that
......."generates step/direction signals for the Gecko driver" .......can process the input from the encoder and output it as a variable or "set-able" rate of step/directional signals for the Gecko driver which in turn determines the rate and position of the CNC Gecko motor spindle which is connected to the gear-box which in turn is acting as a dividing head/speed-reducer to rotate the spindle on which the work-piece is mounted?

(Sorry about the dreadfully long sentence - looks like something a Lawyer wrote!!).

Is there an optimal/range (pulses/sec or pulses/rev) that the board requires?

Can the output pulses be multiples of the input pulses?

If so, just how discrete and variable are the "multiples?"

What I am getting at is whether the board out-put pulses at the gecko are a direct or variable multiple of the input from the encoder? Or put another way, how variable is the ratio of or between the speeds of the arbor and the gear-box drive shaft?

I can see that:
a.
the speed of the arbor must remain within an optimum range (3-400 RPM?) for tool/cutter durablity;

b.
the gear-box will act as a "vibration/pulse" filter/smoother to limit the pulsing of the Gecko motor vibrations at the work spindle;

c.
the arbor and the work-spindle are synchronised on a continuous basis;

d.
that a good quality gear-box is required for other than short run jobs;

e.
a dividing head or rotab could act as a gear-box for lighter small-run jobs;

f.
the "X" power-feed of the mill is under manual control and is limited by the table stops and the "Y" feed is all manual control;

g.
the arbor-work "connection" is maintained and neither stopped nor reversed for the entire cutting sequence/time.

OK so far?

As the board on
John's gear hobber is computer free
can I infer that it is powered and mounted on the mill and not on a computer?

Does it provide the motive power for the Gecko drive as well as the pulses?

TIA

Ryobiguy
11-18-2007, 12:33 AM
The Allegro gear sensor works quite well, a pure simple digital signal says if the sensor is over a gear tooth or valley. Yes, the newer ones also have direction, that would be nice.
I've got mine setup with my own "electonic leadscrew" software module that I wrote for EMC^2 on Linux.

Here are some pics of the sensor hookup to the big back-gear, and the DOS program I wrote awhile back: http://www.fricktion.net/~mfrick/gearsensor/

The latest part to it is a user interface box consisting of a 4x20 LCD display with some buttons to adjust the feed on the fly. I mounted the board in a thick clear plastic box and hooked it up with a DIN connector. Here's the box:
http://img.photobucket.com/albums/v129/Ryobiguy/IMG_6692.jpg

Here's the box running, in front of the normal PC display of my software module for EMC^2:
http://img.photobucket.com/albums/v129/Ryobiguy/IMG_6691.jpg

As you can see, I've added some bells and whistles. After a threading pass, and a few seconds of idle spindle, the leadscrew will automatically reposition itself to the home position. Then I just move the carriage back to the stop (where I homed it,) re-engage the half nut and start the spindle back up.

So, I took this old lathe with no change gears or threading dial, added a gear sensor, a stepper motor, a 7 year old PC, some software, and now I can do any thread pitch or feed rate. Pretty slick!

BTW, here's a test video showing low speed reactivity. http://www.youtube.com/watch?v=4r6amUUo90w
I have 66 gear teeth, and am only using the falling edge, so 66 pulses/rev, and the stepper is 4000 steps/inch. You can see where it senses the next gear tooth when barely moving. While I should have put a high contrast vernier against the ruler, you can kind of see that the stepper is very reactive to me braking the spindle by hand. I guess threading is the real test, and it works well enough for me. ;)


[edit: add link to video]