1.5 - 2.5 turn potentiometer with detants? Maybe XY?


I am looking for a potentiometer with a 1.5 - 2.5 turn ideally with detents and and a red green and blue led

They have these encoders:


I'm trying to replace those with equal potentiometers.

but, the issue is that the encoder uses two pins, times three encoders, is six pins. I do not have six pins, but I do have three pins, which is why I wanted to use the potentiometers... but if there is a some sort of encoder two spi interface I can get, i'd be interested in that as well... I read about a 555 timer, but from what I tell that just cleans up the signal, and i'm moving the encoders by hand so the signal is clean enough.

You can get 10 turn potentiometers. Detents are usually a bespoke thing rather than standard since there are so many possibilities. There might even be a shaft-mounting detent widget you can add to any pot, wouldn't surprise me.

Given the choice between a rotary encoder and a potentiometer, you should always choose the rotary encoder.

You can use a shift register (HC165) to read eight lines with three pins, and if you need more, you chain them to check any reasonable multiple of eight lines with the same three pins. Yes, a shift register is a SPI interface which if you really want speed (and you do not for manual encoders) you can use hardware SPI.

Your only problem with those specified encoders, is the need for shift out registers (74HC595) to drive the pretty LEDs.

I am worried about missing turns, since I am also blinking LEDs, driving a parallel fed lcd, and monitoring for touchscreen presses…

Will a shift register be able to read the encoders fast enough? If only be turning them one at a time…

Can't say about the touchscreen, but let's say that you turn the encoder through forty steps in half a second. That means 100 events per second. Now the main loop() should run through in - let's say 100 µs given that it is doing some rather complex work. No, let's give it 200 µs. So it cycles 50 times for each encoder event. Also, you want the encoder to be de-bounced, so we give it say, 5 or 10 ms debounce time for each event.

How do these numbers sound?

A common mistake is to try and use interrupts for manual rotary encoders.

We presume you understand how to do real-time programming, using the loop() to poll events without ever introducing any delay.