Potenciometer as encoder

Hi friends!
I want to know if exist a kind of potenciometer that could work as an encoder. I want to mesure the revolutions of wheels of my ballancing robot but i have a lot of problems between encoder KY040 (and optical encoders) and MPU6050. The software doesn't like interruptions, debouncing...etc.
Thank you very much!
JR

I don't know of a potentiometer that allows for multiple revolutions. Most are 270 degrees of rotation with 0 ohms at one end and rated ohms (5k, 10K, etc.) at the other. There are 5, 10, 20, etc. multi-turn potentiometers out there but they come to a hard stop or stop changing value when the end of travel is met. If you stay under the number of turns for the precision potentiometers, then one may work for you.

From your short description it sounds like you need many (infinite) number of revolutions, in which case a potentiometer will not work and an encoder is you best option. I suggest you look at your program and see why the code is not compatible with the encoder.

Certainly. There are continuous turn potentiometers. The problem you may face is they always have a blank spot in the resistive material where the ends are located. I guess you could test for an open meaning one wheel rotation. They also have a problem in that the resistance value may jump all over when the slider is on the exact ends of the resistive material.

Best solution is to make the software love interrupts and debouncing.

Paul

Thank you very much!
Ok. I have seen diferents options, even motors with hall sensors, and in all cases is used interruptions into software (attachinterrupt). So i will create a new topic with my code and maybe somebody will help me.
JR