Wednesday, September 23, 2020


16 rotary encoders on a Teensy LC

Using the Arduino CommonBusEncoders library it is possible to connect multiple encoders in a keyboard like matrix.

There is a single common data pin for the Encoder A and Encoder B signals. If there is a switch built in then one pin of the switch is also connect to a single bus data pin. The ground pin of each encoder is connected to it's own data pin. The tutorial PDF explains the topology.

16 encoders and 10 APA106 LEDs connected to a Teensy LC. 

There is a second pin 17 on the Teensy LC that has a level converter for the 5v output that the APA106 requires. The rest of the pins run at 3.3v logic. I have a tiny solder bridge jumper that connects either the regular 3.3v pin 17 or the level converted pin 17 to the APA106. When connected to the 3.3v output pin the LEDs flickered randomly. On the Seeeduino Xiao the 3.3v output works fine driving the APA106 without level conversion.

16 encoders with 3 diodes each to prevent ghosting.

I made a simple plate to hold everything in place. Much sturdier than without.

The encoders are spaced the same as MX switches. Small tapered knobs work best.

Side view. M2 spacers and screws holding a second PCB as the base.

A second built with different encoders. These have the split spline shaft instead of the D shaped shaft. The purple Teensy LC is from OSH Park.