Retractable string for rotary encoder

Hello everyone,

I am thinking to add a retractable string with rotary encoder so that encoder rotates when string is pulled, however it has the features to come back it’s original position. I could not find anything that I can buy from any vendor and directly use it. May be I am missing something. Can anyone help to me here?

It’s called a “string potentiometer” or a “string encoder” Google is your friend now that you know what to search for.

For small distances it’s not too hard to DIY. I’ve built a couple with string and springs.

Thanks!!