Rotary Encoder Types

Not open for further replies.


New member
Hello all!

I was wondering about the types of rotary encoders that the Teensy 3.0 - 3.2 can read. I have successfully connected two quadrature encoders without problems. I read that step/direction encoders can be used as well, but have never tried them. Are there any other types of encoders that the Teensy can correctly read?

For reference, a quick google search shows there are other encoder types such as:
Binary Coded Decimal
Grey Code
Open collector
Communication Line Driver
If you look at Wikipedia you can see the possible ways an encoder can work, and most on that list are designed to directly output an absolute position, where the classic quadrature encoder tells you direction and distance of motion but doesn't give you an absolute starting position.

A teensy can be made to read pretty much any of them but the encoder library is specifically for reading quadrature encoders. Grey/BCD/Hex encoders would not normally justify a library at all though they no doubt exist.

Open collecter is just one of the ways the above types might send state information, and Serial and Coms line driver are the same thing where they contain a micro of their own and send serial state messages.

So With a bit of work Teensy can read any of them, either by finding a library or writing your own sub routine for the job.
Ah ha! I was getting the library confused with the Teensy's capabilities. Thank you GremlinWrangler.

Finding an encoder with about 24 Pules Per Revolution (PPR) is pretty easy and they can cost less than $2. Above this, there seems to be a large jump in price (~ $25) for encoders with 30, 36 or 48 PPR. Does anyone know of a higher resolution encoder for a little less?
My understanding is that the 24 PPR encoders are mechanical with some sort of metal finned arrangment (with 6 tabs) to make and unmake the contacts. Going to higher resolution you really need optical encoding which means some basic electronics in the encoder and resultant increase in assembly and testing costs.

And the $2 encoders are pretty ugly in many of their properties. In particular it's common for them to have detentes, but for the number of detentes to not be 24 so you end up with a rather lower number of positions, and some of your knob positions to involve jumps of two or three.

So when pricing a project you may find the tens of dollar price point is what you need to spend anyway if this is something you want to feel nice during use.
I bought a supposedly pretty good 24 position rotary encoder, for a couple of bucks. It has detents, and I have to pretty heavily debounce it, and slow down reads to get really clean stable data, otherwise it bounces around a over the place .... So, I can confirm Mr Wrangler's posting! It works well enough, but precision it aint.
Not open for further replies.