Multiplexing encoders / MIDI question

Status
Not open for further replies.

j_dunavin

Well-known member
using this as an example:
https://www.pjrc.com/teensy/td_midi.html
Paul shows how to multiplex many knobs and buttons.

Can I simply connect 4 rotary encoders to one 74HC4051 chip, then define those pins for the encoders?
I have many encoders I would like to connect, but it takes so many pins on the Teensy.

EDIT: I should note that most of the encoders would be used for menu selection and scrolling, so not fast.
There are two optical encoders (128PPR) that would be used for a jog wheel to scroll through a loaded song in some software... I figure these two would have to be directly wired to the teensy, interrupt.

thanks
 
Last edited:
If you have many encoders, I‘d rather suggest using a Teensy LC as a sub-processor and I2C Master, handling all the interrupts and the encoder decoding and then sending the corresponding data to the main Teensy configured as I2C slave, having only two pins used there.
 
I’ve also had success with using multiplexers for encoders, I’ve only tested up to 24 of them on a Teensy 3.6. For this to work you will have to use 2 multiplexers for encoders as both the A and B of an encoder have to be active at the same time. As far as pins are concerned, if you use the 74HC4051 or any other standard 8:1 multiplexer it will take 6 pins for the first eight encoders then just 2 more pins for every additional eight encoders. If you aren’t really doing anything else intensive on the Teensy then this will work perfectly and not miss any steps, mine was done as a midi controller with 24 buttons, 24 encoders, and 24 LEDs all through multiplexers.
 
Status
Not open for further replies.
Back
Top