Jump to content
ClassicGMR

Volume knob question

Recommended Posts

Posted (edited)

So my Picade has a 3" 4 ohm 5W speaker but the volume control in the Retropie software suuuuuuucks. I'm going to add a potentiometer to the cabinet and make the volume control a physical thing but wow there's a lot of things I don't know. Can someone recommend to me what I should be looking for? For example: Here I see *9* options ranging from 1k ohm - 220k ohm rated knobs but for such a small amount of wattage which should I be using? There's also 3 blades but only 2 wires will be connected. Does it matter?

 

Thanks in advance!

Edited by ClassicGMR

Share this post


Link to post
Share on other sites

I presume that you are intending to set the software volume control to maximum and then use the pot (potentiometer) to control it.

I also presume that the two wires you are referring to are those currently going to the speaker in which case one will be signal and one will be Ground.

 

If your intention is to simply wire the pot in series with the speaker that will not work very well. Let us say that at maximum volume the audio signal amplitude is 5V.  Even with a 1K resistor the volts/ohm would be 5/(1000 + 4) = 0.0049V/Ohm. You would not get half the volume until the pot resistance is down to 5 Ohms so for most of the pot adjustment you will notice no sound at all as the pot resistance creates to much voltage drop and too little current to drive the speaker. Then there will be some noticeable sound and adjustment over roughly the last 10 degrees of turn making fine adjustment difficult.

 

You will not be able to achieve the fine adjustment you appear to be looking for with just a potentiometer. You will need to find a high current amplifier like a OPA551PAG4 to use with your potentiometer. Look up inverting amplifiers circuits and make the pot resistance (Rf) 10 times bigger then that of R1/Rin (i.e. 1K pot and 100R).

It would probably be wise to put a decoupling capacitor between the Amplifier output and the Speaker to isolate the speaker from any DC voltage that could damage it, I am not 100% on what you need there. You can probably find the calculation for that on the internet or if you can locate the equivalent capacitor inside the unit use that, otherwise try a 330uF or 1000uF (if you have space) 16V electrolytic (positive to the amplifier).

One issue may be that if you are intending to get your signal source from the speaker leads it may have already been through a decoupling capacitor in which case you may need to tap the audio signal from the other side of the capacitor to avoid losing half your signal. 

 

In relation to the 3 pins (blades) and two wires a pot can be used as either a potential divider (3 wires) or a variable resistor (2 wires).

Potential Divider: When (assuming the pins are in a row) a voltage source is connected to one of the outside pins (one end of the resistive track), Ground is connected to the other end of the track then the output voltage at the Wiper (Centre pin) is a ratio of the input voltage depending on where along the track it is, i.e. if the the voltage source is 10V and the wiper is 25% of the way along the track from the Ground end then the output will be 2.5V, at 50% from Ground it would be 5V and at 75% from Ground it would be 7.5V.

 

Variable Resistor: When uses as a variable resistor typically you would connect the wiper to one end of the resistive track, this is not essential but if not done the free pin can be a source of signal noise. You make one connection to Wiper/end pair and one connection to the other end of the resistive track.

When using a pot for volume adjustment this is a better method than a potential divider.  

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Could the volume pot be installed between the audio source and power amp input in a potential divider configuration as Stephen described above? There is likely a passive component between the audio source and power amp input that could be removed to open the circuit and prevent needing to cut traces.

Share this post


Link to post
Share on other sites

Steve I absolutely am intrigued by your answer and actually went and looked up some of the things you said to expand on them. I like to learn stuff even at 50!! :)

 

That said... This is why I hire an electrician when I want a new outlet. And why I ask questions before I do something that seems easy. :)

 

So at my level of in-expertise (un?) (non?) ... I should stick to the software and just deal with how clumsy it is. At least it works. :)

Share this post


Link to post
Share on other sites

I read my previous post and now realize I should stop making posts before the morning coffee. To clarify my previous thoughts...

 

I am assuming that because the Picade speaker is 5 watts that there is some onboard power amplifier similar to an LM386 that is driving it. I am also assuming the because this is some flavor of Raspberry Pi that the audio is a logic level PWM signal coming from a GPIO pin. In order to couple the GPIO pin to the onboard power amplifier there should be some passive components which could be removed to open the circuit. The potentiometer (plus the removed component) would be re-inserted into the circuit in a potential divider configuration resulting in full volume control to the input of the onboard amplifier. Hopefully my idea makes sense now.

 

A more definite solution could be had if a schematic or high-res photos of the circuit were available.

Share this post


Link to post
Share on other sites

@emerson Well it runs using a Pimoroni Picade X HAT that sits across the entire GPIO and the speaker just connects at the top via the 2 pin port on the upper left as seen below. So either there's an amp on the board (which I think it actually references on the reverse of the board - "3W AUDIO DAC/AMP") or it's drawing directly from the Raspberry Pi 4 board.

 

3402-12.jpg3402-11.jpg

Share this post


Link to post
Share on other sites

Here is another forum post with a similar question to yours and a similar answer to mine: https://forums.pimoroni.com/t/adding-an-external-volume-control/9824

 

So DAC stands for Digital to Analog Converter. In the link I posted above they mention the pi actually has two audio channels that tie into the GPIO header. An easy approach to convert the 2-bit digital audio into analog would be an R-2R resistor ladder. Another approach is to use binary weighted resistors where each resistor is twice the value of the resistor before, with the lowest resistor being the hightest bit. With that being said, and assuming they used a resistor DAC, you would look for resistors in close proximity that are equal and/or close multiples of eachother in value. As for the potentiometer, your options would be to either use a dual gang pot and tap into the circuit from the GPIO header or use a single gang pot and tap in after the DAC. Tapping into the GPIO would be an easier approach for someone who is not confident in their skills but willing to give it a try.

 

Based on the traces I believe the small square microchip with pins on all 4 sides (QFN-16 package?) is the power amplifier. Are you willing to provide a close up image of the area boxed in red?

image.png.ced3ab4c7a446e5642f3b14b9975f5e6.png

Share this post


Link to post
Share on other sites
Posted (edited)

I pulled all the images from the manufacturer website. Here's a big one from Amazon if it helps. Mine's in the arcade cabinet in the basement at the moment.

 

81xuzgsOMmL._AC_SL1500_.jpg

Edited by ClassicGMR

Share this post


Link to post
Share on other sites

Thinking about my original post I indicated a 10 to 1 ratio of the resistors at a gain of 10 is typical although it would actually give a gain of 1 to 11.

However, that may have been to much not knowing what volume levels the unit was producing and so changing the suggested 100R resistor for a 510R (gain 1 to 6) or 200R (gain 1 to 3) may be better in allowing volume control over the full range of the pot without it distorting/clipping.

 

5 hours ago, emerson said:

So DAC stands for Digital to Analog Converter. In the link I posted above they mention the pi actually has two audio channels that tie into the GPIO header. An easy approach to convert the 2-bit digital audio into analog would be an R-2R resistor ladder. Another approach is to use binary weighted resistors where each resistor is twice the value of the resistor before, with the lowest resistor being the hightest bit.

Using an R2R ladder/Binary weighted resistors will not work, at least not without more effort than an amplifier.

Thanks to the posted images I now have a better idea of what we are talking about, all the information on it indicates the Audio is I2S which is the same format as the Audio stream from CD's. With CD's it is organises as two alternating words (16bits) with a second signal indicating with word is the Left Channel and which is the Right and usually a clock signal for clocking the data in to the DAC.

Consequently to use any other type of D to A conversion along the lines you mention would first require identifying the pins carrying the I2S data then putting them through a serial to parallel converters.

 

Looking at the PCB images I can only assume the square device below the USB connector is the DAC/Amplifier as the only device I could seem to find data on was the EEPROM (assuming I read the device number correctly). Without a data sheet for the device I am not sure if the software volume control is done here by selecting one of several present amplifier gains on in software by dividing the audio data value before sending it to the DAC/Amp. 

Consequently, I think the best/simplest approach at any external attempt at volume control would be to use the already converted analogue audio signal. 

 

9 hours ago, ClassicGMR said:

So at my level of in-expertise (un?) (non?) ... I should stick to the software and just deal with how clumsy it is. At least it works. :)

While an amplifier or amplifier based attenuator is a better solution, if you are not confident you can manage that then the only other thing you could try that is relatively simple going back to the original concept of using a pot is to use a 1K pot wired as previously described for a variable resistor and wire either a 4.7 Ohm 5% Carbon Film resistor or a 3.9 Ohm 1% Metal Film resistor in parallel with it to effectively make something close to a 4 Ohm potentiometer and wire that in series with the speaker (see attached image).

With the software volume set to maximum the pot should theoretically allow you to adjust the volume between around 50% and 100% of the software set maximum which may be sufficient for your needs assuming there is little to no reactance between the inductance of the speaker coil and the resistance of the pot that would create any issues/sound distortion.

Volume 1.JPG

Share this post


Link to post
Share on other sites

Sorry, I forgot to mention in my previous post that in the potentiometer solution I gave you will be dropping half the voltage and therefore half the power across the potentiometer. With the amplifier rated at 3 Watts the maximum wattage across the Pot/Resistor pair will therefore be 1.5W and so you need to ensure the wattage of the fixed resistor is at least 1.5W. Potentiometers are typically around 200mW but you will need to try and find one that is 500mW-1W otherwise it may burn out, finding one of those will be harder than the fixed resistor. 

Hence an amplifier (or amplifier based attenuator) solution as I originally suggested is the far better solution.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...