#Multiplexer with rotary encoder

1 messages · Page 1 of 1 (latest)

brittle sentinel
#

Hi! I know there is no support for multiplexed encoders, but I reeally need to get this to work somehow. When I hook up the encoders with the multiplexer I noticed when turning left and right only the order of the pressed pins changes:
When turning left: PIN10 press, PIN11 press, PIN10 release, PIN11 release.
When turning right: PIN11 press, PIN10 press, PIN11 release, PIN10 release

I was thinking about 2 separate output configs for each pin, and only executing when the other is already pressed. Is there any way that I can get this to work with custom configurations?

Thanks!

dusky quartz
#

That's how incremental encoders are working. It's by design that the order of the pins is changing.
https://en.wikipedia.org/wiki/Rotary_encoder#Incremental_encoder

Are you running out of pins because you want to connect the encoder to a multiplexer? Or what are you trying to do?

A rotary encoder, also called a shaft encoder, is an electro-mechanical device that converts the angular position or motion of a shaft or axle to analog or digital output signals.There are two main types of rotary encoder: absolute and incremental. The output of an absolute encoder indicates the current shaft position, making it an angle transd...

jade furnace
#

so unless you have a premade setup for something like simvim that (I think) supports encoders on multiplexers, I would think most solutions are going to be harder than adding another Arduino if you run out of pins. Or adding shift registers or multiplexer for LEDs and buttons .

But please explain what you are trying to do, otherwise this is just guessing.

brittle sentinel
#

Yes, I am only a few pins short for my project, so it would be very nice if I don't have to by a new arduino. I already have all my normal buttons multiplexed, and i have 7 encoders, so this would free up a lot of pins.

jade furnace
#

I do not think it will work - I know there was some plan to support encoders in multiplexers but it was not straight forward due to timing issues as far as I remember. How is your schematic, maybe we can sort something out?

#

but I mean, adding multiplexers and shifters etc also costs, a RP2040 Pico for example is not very expensive

brittle sentinel
#

Thank you for the help! I think I will order a new arduino, I might need it anyway if I want to expand the project later.

spare agateBOT
#

Since this is resolved I'm locking the thread. For additional questions or similar issues please start a new thread in #1028767888242376794. Happy flying!