Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Using old radio potentiometer for Raspberry setup
#1
Hi,

I would like to use an old radio volume control potentiometer (POT) to control the volume and startup/shotdown functions utilizing Moode on a Raspberry Pi/HifiBerry AMP2 setup. Would Moode be able to use this old POT natively or would I need to insert an Audio Digital Converter (ADC) between the POT and the Raspberry? If the latter, do I need to add code?

Thanks!
Reply
#2
There are zillions of articles on using rotary encoders with Raspberry Pi just google "rotary encoder raspberry pi".

moOde's built in rotary encoder driver only does volume up/down and does not contain any code to handle an encoder that also has a push button function.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
The built in rotary encoder code would not be much help with a potentiometer. You will need something to interpret the variable voltage coming from the POT into a signal that the volume code can understand.

One way here:
https://embeddedcircuits.com/raspberry-p...r-tutorial
Searches will bring more.

Edit - like this one with out ADC https://www.circuitbasics.com/using-pote...pberry-pi/
----------------
Robert
Reply
#4
Hi

I have written a program that will manage a potentiometer using an ADC and run commands dpending on the dial position, which should be ideal for what you want to do (e.g.an initial position to power off the player followed by positions for the volume setting levels)

   https://moodeaudio.org/forum/showthread.php?tid=3834

Adrian.
Reply
#5
(12-15-2021, 11:50 PM)Tim Curtis Wrote: There are zillions of articles on using rotary encoders with Raspberry Pi just google "rotary encoder raspberry pi".

moOde's built in rotary encoder driver only does volume up/down and does not contain any code to handle an encoder that also has a push button function.

Hi Tim,

Unfortunately I don't think that's quite what I need. I am refurbishing old radios with new, pi pased internals. I want to keep the old controls on the radios and use them to perform basic functions like volume control and on/off. Using a rotary encoder would require me to replace the orginal potentiometer volume knob. Or maybe I am missing something?

Thanks for the feedback though.
Reply
#6
(12-15-2021, 05:59 PM)liv_s Wrote: Maybe this help

https://www.hifiberry.com/shop/boards/power-controller/

Didn't know this existed and I will definitely use in other projects! But for this one, I need to keep the old potentiometer because it's in an antique radio.

Thanks!
Reply
#7
(12-16-2021, 02:07 PM)adrii Wrote: Hi

I have written a program that will manage a potentiometer using an ADC and run commands dpending on the dial position, which should be ideal for what you want to do (e.g.an initial position to power off the player followed by positions for the volume setting levels)

   https://moodeaudio.org/forum/showthread.php?tid=3834

Adrian.

Hi Adrian,

This is exactly what I was looking for! Thank you.
Reply
#8
@thoughtfission

Modifying the Web search phrase to something like "raspberry pi vintage radio" will turn up dozens of projects. [Alert: there is a hostile subset of Internet users who immediately throw shade at any project which doesn't religiously refurbish analog electronics to original condition, especially old radios for some reason. See, for example, past Hackaday comments. Do not engage with the trolls.]

I'll be interested to hear how your volume control works out. AFAIK the potentiometer is always "audio taper" as approximated in an electro-mechanical device. The result is a nonlinear resistance vs rotation curve which resembles a dogleg. See, for example, https://eepower.com/resistor-guide/resis...er-taper/#

Whether you take the offboard ADC approach like Adrian's or an onboard approach where the Pi has to do the conversion (this latter is not the choice I'd make), you'll end up with a similar nonlinear digital output. I'm thinking this should work well for your application but it's worth keeping in mind.

Also, the traditional potentiometer is an inherently noisy---aka "scratchy"---device and many become increasingly so over time. Contact cleaner spray may help alleviate this. {[All the usual precautions....I only melted some plastic parts with this stuff once and I'm sure the accumulated fumes did nothing bad to me over time Angel ]

Maybe I'm just being my usual Chicken Little here. You might ask Adrian what his experience has been implementing his potentiometer code. Various digital filtering techniques are available if the binning technique it uses isn't adequate in your application.

Regards,
Kent
Reply
#9
Hi Kent

Well... my radio player started coming on at random times of the day, including in the middle of the night, starting a couple of weeks ago. I tracked down the problem to the potentiometer, which no longer had a minimal resistance at the start position, and the resistance was generally wandering at particular dial positions. I got the potentiometer in a box of "starter" components, so I don't think it was a good one! I swapped in a new potentiometer from a batch I bought, and the radio is now working well again. The dial gets turned several times per day, so it does see some action.


Adrian.
Reply
#10
It's always something! (SNL fans will remember Roseanne Roseannadanna.)
Reply


Forum Jump: