remoitrix
Posts: 7
Joined: Mon Apr 08, 2019 10:29 am

Use a Potentiometer to control sound.

Wed Apr 10, 2019 12:56 pm

Hi everyone!

I’m new here and I’m starting my game gear pi, little proyect.
I bought a rapsberry pi zero w (I need the small one), a 3.5 LCD ( connected by mini Hdmi) a PowerBoost 1000, baterry 3.7 4000mah and a “Waveshare WM8960 Hi-Fi ” hat, and here comes my little problems...

- Can I use a potentiometer to control the volume?
- Is possible connect to the hat? Or I need Connect directly to the raspberry??
- Exist any photo of the installation? (Because i’m a noon)

The rest of the elements I bough and I have some pics to connect it.

Thanks a lot for the help!

ankith26
Posts: 101
Joined: Mon Mar 25, 2019 11:08 am
Location: Earth
Contact: Website

Re: Use a Potentiometer to control sound.

Wed Apr 10, 2019 1:20 pm

Hello,
Since a raspberry pi does not support analog in , It is not possible to connect the potentiometer directly to the pi.
And i am not sure whether your WM8960 Hi-Fi HAT will help you to achieve this.. You have to buy an external device
(like an ADC device)..
My website is at https://pratt.ml
Hope it runs (which it wont)

remoitrix
Posts: 7
Joined: Mon Apr 08, 2019 10:29 am

Re: Use a Potentiometer to control sound.

Wed Apr 10, 2019 3:36 pm

Ok! I was reading anther guide and looks like ADS1115, can change the digital signals to analog.
Is that possible? Or I’m wrong again?

Answer, I read the guide again and it’s says that they change analog to digital!.

I can’t imagine how can i do that,
If I can’t find a way, I will leave without the potentiometer.

If possible to connect the potentiometer to the speaker to control the volume sound??

LTolledo
Posts: 1549
Joined: Sat Mar 17, 2018 7:29 am

Re: Use a Potentiometer to control sound.

Wed Apr 10, 2019 9:39 pm

the only way to properly control the volume via potentiometer is to hack the WM8960 Hi-Fi HAT, but first you need to get the schematic diagram of the HAT.

you will need to insert the potentiometer to the audio input line of the amplifier chip.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Heater
Posts: 12740
Joined: Tue Jul 17, 2012 3:02 pm

Re: Use a Potentiometer to control sound.

Thu Apr 11, 2019 4:23 am

Are you sure about that?

As far as I can tell this HAT uses a digital audio interface between itself and the Pi (I2S) No analog input signal to put a pot on there.

btidey
Posts: 1614
Joined: Sun Feb 17, 2013 6:51 pm

Re: Use a Potentiometer to control sound.

Thu Apr 11, 2019 7:06 am

If you want a rotary control for the volume then consider using a rotary encoder instead of a potentiometer.

An encoder can connect to a couple of GPIO pins and then rotation can be detected and turned into a 'value to control the volume digitally.

Rotary encoders do not have an absolute position but this can be simulated by persisting the current value in a file.

Return to “General discussion”