# SparkFun Forums

### Rotational Encoder Recommendation

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!

### Rotational Encoder Recommendation#179222

By chrisno
#179222
http://www.catb.org/~esr/faqs/smart-questions.html compliant, I hope. Please be gentle and explanatory.

My goal is to get a precise angle from a tabletop prize wheel (and do stuff with that data). A link to the exact prize wheel is below.
http://prizewheel.com/products/tabletop ... ze-wheel/#.

So far my homework has led me to the idea that a rotational encoder is the right type of device to get that information, but there are so many to choose from and I can’t understand all the subtle differences between them.

Can anyone recommend the best one that:
• Outputs more than 8 bits of precision
• Works at the edge of a spinning disc rather than at the axis? (I think it might be tough to get to the axis with that wheel)
• Can output the angle to an Arduino board
• Can be managed by a relative n00b (me)
I just don't even know where or how to start looking for these answers. Thanks! :pray:

### Re: Rotational Encoder Recommendation#179241

By lyndon
#179241
First: the precision of an encoder is only an issue if it's an absolute encoder and they tend to be rather pricy.

So assuming you will use an incremental encoder, the resolution is limited by the size of your counter. Not an issue for an Arduino. Next, if you are coupling the encoder to the edge of the wheel, I'd hazard a guess that pretty much any encoder will give you more than 256 points/revolution.

Let's do some math: if the wheel is 15" diameter and the coupling wheel on the encoder (assuming a frictional coupling) is 0.5" then you have 30 rotations of the encoder for each rotation of the wheel. To get 256 counts, the encoder therefore only has to provide 8 pulses per revolution. Pretty much any optical encoder will do that.

You will likely need an optical encoder, since they are rated for many more rotations and higher speeds than mechanical ones. I'd suggest adding a Home sensor to the wheel so you know when it completes a rotation (friction between wheel and encoder will eventually cause drift).

Basically a very simple project. Most of the problems will be mechanical.Perhaps to simplify it, you can make your own encoder (it's easy to do by painting lines on on the outside of the wheel),

### Re: Rotational Encoder Recommendation#179242

By oldtemecula
#179242
"Lyndon said: Basically a very simple project. Most of the problems will be mechanical. Perhaps to simplify it, you can make your own encoder (it's easy to do by painting lines on on the outside of the wheel)"
Maybe use striped tape for the outside like this... Amazon Tape

Christopher

### Re: Rotational Encoder Recommendation#179255

By waltr
#179255
Is this one of those wheels with pins and a clicking tab that stops between pins?
Then there are a finite number of positions. My idea is to put a code at each position that is then read by optical sensors.
Painting the codes on the outside edge of the wheel (like lyndon suggests) should work. Then arrange four reflective sensors to read the code.

### Re: Rotational Encoder Recommendation#179270

By Mee_n_Mac
#179270
waltr wrote:Is this one of those wheels with pins and a clicking tab that stops between pins? Then there are a finite number of positions.
Yes ! It has only 12 slots so only 4 bits are needed. Simple enough to do your absolute position encoder. I think the OP will need to get rid of the existing pointer though. I've seen the wheel stop in 1 slot but have the pointer still bending over indicating the prior slot. Replace it with an LED that shines on the slot last read by the reader.

### Re: Rotational Encoder Recommendation#179275

By lyndon
#179275
Well he did say he needs at least 8 bits precision and did not say what he intends to do with the data, so we probably shouldn't be assuming that 12 slots are enough...

### Re: Rotational Encoder Recommendation#179277

By chrisno
#179277
I'm going to use the data to cause something to spin on a screen in perfect synchronicity. Or that's the goal, anyway.

Thanks for the advice so far. Given the categorical advice, are there particular encoders that you would recommend? Brands or units?

### Re: Rotational Encoder Recommendation#179289

By chrisno
#179289
Also how would an incremental know direction? That seems like it's unknowable?

### Re: Rotational Encoder Recommendation#179290

By lyndon
#179290
An incremental encoder uses two channels phased 90 degrees apart. By the state (high/low) of one channel vs the other channel, you can tell if it's counting up or down.

eg, if the transitions are:
00, 01,11,10 then your're going one direction. 00,10,11,01 means you're going the other way.

I'd go with the cheapest optical encoder that has at least 8 pulses per revolution.