Thank you for your donation!


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


Using old radio potentiometer for Raspberry setup
#11
(12-17-2021, 07:05 PM)TheOldPresbyope Wrote: @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

@TheOldPresbyope

Hi Kent,


Thanks for the advice. I'll definitely let you know how it goes. It might take a while as this will be a pretty steep learning curve fo me. I'm now starting to wonder if I should just try to find an analogue decoder that fits the knob I have on the radio. IT might be asier than dealing with the inevitable noise and degredation you mentioned. I see Adrian had the same issue.

Will let you know how it goes.

Will also open all of the windows if I do end up using contact cleaner Wink 

Thanks,
Grant
Reply
#12
Hi Grant

Just for reference, my ADC is a cheap fake board costing around 5 euros. It is marked as having an ADS1115, with 16 bit precision, but really has a ADS1015, with 12 bit precision. The values it reports as an ADS1115 jump in steps of 16, but this is fine for my use. I just checked the stability of the readings with the new cheap potentiometer at various points on the dial it is very good, The value is either completely stable or flips between adjacent values. The range of readings is 0 to 26000 in steps of 16, and so the dial should easily be good for 100 positions even with the lower precision ADS1015 on the fake board (if I could turn it that accurately!). 

Here is an example cheap board

      https://es.aliexpress.com/item/32679398211.html

Adrian.
Reply
#13
A small update. I just received a 6 euro ADS1115 board from eBay, expecting it to be fake, and it is genuine! I am using it with a 90 cent potentiometer (including aluminium knob) and connecting with 10cm Dupont connector wires. Trying different potentiometer positions the readings run from 0 - 26000, and at any potentiometer position readings constantly vary in a range width of around 5, which seems pretty good, given the setup. I'll run some tests in the new year to check how the readings wander with time and temperature, and document the results as an indicator of a minimal performance.

Adrian.

P.S. I am changing the turnandrun band selection logic, as it was written for choosing radio stations and may not be the best for a volume control. I am also adding in support for using four potentiometers. (I do not know when these changes will be ready).
Reply


Forum Jump: