-
Notifications
You must be signed in to change notification settings - Fork 5
Multiplexed Encoders
EncPlex is a small Arduino library for reading rotary encoders. It works with encoders connected directly to digital pins and with encoders connected via a multiplexer. Unlike most other libraries, EncPlex uses a polling algorithm that generates a predictable processor load and is insensitive to contact bounce.
It is written for the ARM based PJRC Teensy boards T-LC and T3.0 - T4.0. It is mainly aimed at manually operated, mechanical encoders, but also works with motor-driven optical encoders. However, for high speed encoders specialized libraries like the QUAD-Encoder-Library from mjs513 (https://github.com/mjs513/Teensy-4.x-Quad-Encoder-Library) might be a better choice.
The extras folder of the EncPlex repo contains detailed information and production files for a few test boards. You can also use readily available multiplexer breakout boards for experimenting. Here an example of a compact assembly using two SparkFun BOB-09056 boards (https://www.sparkfun.com/products/9056)
https://github.com/luni64/EncPlex
CD74HC4067 Multiplexer Assembly
Encoder Board
74165 Shift Register Board
Teensy is a PJRC trademark. Notes here are for reference and will typically refer to the ARM variants unless noted.