Help for Better Understanding of Shaft Encoders

Note: This is sort of a Controls / programing / electronics question I figured this is the best place to post it as the programing part of it is what has me stumped.

Currently I am looking around at different shaft encoders systems, first of i have never used one before and am curious as which shaft encoders any of you all have used and had good luck with. {any time i needed to keep track of revolutions i always used a hall effect sensor or an optical sensor because thats how we had to do it back in the days of basic [some you whipper snappers may not remember those days as they were many years ago back when i actually had to program things] } I am currently looking into the bane bots transmission that has an encoder (sold desperately) that attaches to it. I have the info on it quoted below. If any of you have used it or fooled around with it you might be able to answer my other question on it. It says it gives a 128 counts per revolution and that reverse direction would be given out of phase. ie. a +signal and a - signal, as far as the programing for one of these doohickeys is concerned is it just a digital signal that can be used like a count ? For example when the shaft turns 3 increments forward is it just going to get 3 + square wave pulses or is it giving some analog value. The other neat thing i noticed about this particular encoder was it had 2 outputs which leads me to believe i could use one to indicate degree of movement or program a limit of movements. Is there anyone out there who has a good example of this used in the past. I just need an refresher on where / what i should be doing to start.

so because the above thread was a mess what I am curious about is

  1. What are some shaft encoders used in the past with success
  2. Has anyone used the bane bots shaft encoder
  3. What is the usual output digital or analog.
  4. Can anyone direct me to a good white paper on the topic

See Kevin Watson’s code on quadrature encoders http://www.kevin.org/frc/. FAQ at http://kevin.org/frc/encoder/. Nice in-depth description at http://www.chiefdelphi.com/media/papers/1490. A ChiefDelphi thread on encoders at http://www.chiefdelphi.com/forums/showthread.php?t=48756. Wikipedia article http://en.wikipedia.org/wiki/Rotary_encoder.

Quite simple to use. All digital input. Connect Phase A signal wire to an interrupt pin, Phase B signal wire to a Digital Input pin. Configure the interrupt and catch it in user_routines_fast.c. Phase A pulses on each tick, Phase B pulses earlier or later than Phase A, depending on direction. When interrupt occurs, interrupt service routine checks the Digital Input for HI or LO and that gives you the direction.

You don’t get any counts out - you have to count 'em yourself.

There are other types of encoders (absolute positioning?) that may provide encoded information about the precision position, without you having to count.

The trickiest thing about them is probably choosing one that is suitable and determining the method of attaching to your robot.

For testing purposes we hacked a mouse and used the two shaft encoders there. I say again. . . FOR TESTING!