Another input option: DIY rotary encoders

A project log for I LOVE LAMP

Explorations in creating lamps with flexible light emitters & curved surfaces

todbottodbot 03/07/2017 at 06:484 Comments

Rotary encoders today mostly suck.

The "infinite turning" knobs you see on some products today are rotary encoders. The common commercially-available ones use mechanical wipers to sense rotation and have a low number of PPR (pulses per revolution, a measure of rotation) of 12-24. To me this is sad: it means your angular resolution is only around 15 degrees (360/24) and the friction from the mechanical wipers means you can't "spin the knob". These rotary encoders are ubiquitous though because they're so cheap: < $1.00 in single quantity.

One alternative to these is optical rotary encoders. They use LEDs & phototransistors instead of mechanical wipers to sense rotation. Unfortunately, they're almost 10x expense. These were the kind I used when I was a tiny EE and they were awesome.

Several years ago (2008!), I built a set of three HUGE optical rotary encoders out of standard optical interrupter modules, rollerskate bearings, and PVC pipe caps. The resulting knobs were 4" in diameter and you could get them spinning for over a minute.

So I may experiment with making a few subtler, smaller versions of this idea


todbot wrote 03/07/2017 at 16:27 point

Hi @Clayton G. Hobbs, thanks!   I originally dismissed the hall-effect encoders because they looked entirely designed for industrial motor uses.  If you have links to chips / modules / eval boards you like, I'll definitely check them out.

  Are you sure? yes | no

Clara Hobbs wrote 03/07/2017 at 18:45 point

I've found the AS5047D pretty easy to work with.  It has 14-bit resolution available over SPI, and 11-bit resolution in modes that work more like a regular rotary encoder.  You can get evaluation kits for them from Digi-Key, Mouser, et al., consisting of a breakout board and a magnet.

Manufacturer page:
Evaluation kit:

  Are you sure? yes | no

todbot wrote 03/07/2017 at 19:08 point

Awesome, thank you.  That eval board is cheap enough to get it just to try out.

  Are you sure? yes | no

Clara Hobbs wrote 03/07/2017 at 16:21 point

Don't forget about Hall effect rotary encoders, like the one used by Mechaduino.  One IC with a rotating magnet nearby can make a 14-bit rotary encoder.  Unfortunately though, they're also around 10x the expense of mechanical ones.

  Are you sure? yes | no