Replace volume buttons with a potentiometer

Thread Starter

Soop

Joined Feb 10, 2022
9
I'd like to replace two volume push buttons on a bluetooth amplifier with a potentiometer. I'm not 100% sure how the push buttons are working at the moment, but a quick connectivity test shows they're running to a bank of small resistors, so I'm guessing a pulse is sent to a microcontroller to tell it to digitally select a new voltage. I'll attach a pic.

Is there any way to convert this to a potentiometer? Or would I have to do that at another point (perhaps the output of the IC)?
 

Attachments

MisterBill2

Joined Jan 23, 2018
11,876
Indeed the volume buttons connect to resistors and to digital inputs on a processor. so the gain is set digitally and the signal is not outside the IC. so there is no simple way to have a control knob that will allow the volume to be set where you want to keep it.
Even if it were, that PCB is far too tight to work on.
The closest you can get is an encoder to send pulses to simulate a button press. But even that can not keep a setting when the power goes off.
 

Thread Starter

Soop

Joined Feb 10, 2022
9
Indeed the volume buttons connect to resistors and to digital inputs on a processor. so the gain is set digitally and the signal is not outside the IC. so there is no simple way to have a control knob that will allow the volume to be set where you want to keep it.
Even if it were, that PCB is far too tight to work on.
The closest you can get is an encoder to send pulses to simulate a button press. But even that can not keep a setting when the power goes off.
Thanks MisterBill. So a rotary encoder. That might be a satisfactory compromise. I will look into it!
 

Tonyr1084

Joined Sep 24, 2015
6,884
If one button raises the volume and another lowers it then an encoder alone won't work either. The way an encoder works is to close a set of contacts then close a second set before the first set opens. As you rotate it (volume up) it goes A-on B-on A-off B-off and repeats. Rotating it in the opposite direction (volume down) goes B-on A-on B-off A-off and repeats as long as you rotate it. Simply replacing the buttons with an encoder won't work unless you find a way to disable the second switch when rotating it in the volume up direction. Same would have to happen when you want volume down, you have to disable the volume up button while rotating it down.

If you have bluetooth then the source must have a volume control as well. My cell phone can control the volume going to the bluetooth speakers by means of bluetooth communication. So I can adjust my speaker volume from my phone. But that's MY case, not necessarily yours.
 

Thread Starter

Soop

Joined Feb 10, 2022
9
If one button raises the volume and another lowers it then an encoder alone won't work either. The way an encoder works is to close a set of contacts then close a second set before the first set opens. As you rotate it (volume up) it goes A-on B-on A-off B-off and repeats. Rotating it in the opposite direction (volume down) goes B-on A-on B-off A-off and repeats as long as you rotate it. Simply replacing the buttons with an encoder won't work unless you find a way to disable the second switch when rotating it in the volume up direction. Same would have to happen when you want volume down, you have to disable the volume up button while rotating it down.

If you have bluetooth then the source must have a volume control as well. My cell phone can control the volume going to the bluetooth speakers by means of bluetooth communication. So I can adjust my speaker volume from my phone. But that's MY case, not necessarily yours.
The cellphone Bluetooth control was my first thought too, but it's going in an old boombox, so I thought it would be nice to have the volume dial on the unit function too.

I guess I could make a secondary pcb with a mosfet that just sends a pulse as something turns. It's a bit overengineered, but it might be a nice learning exercise.
 

MisterBill2

Joined Jan 23, 2018
11,876
An encoder would take a bit of external circuitry so as to deliver either up or Down pulses. I neglected that because initially it was not relevant.
An analog control downstream from the board might be another way to go.
 

Ya’akov

Joined Jan 27, 2019
5,654
I tried to find something being stocked and couldn't. But that ELM chip (which I am guessing is something like an ATTiny programmed up, based on some things they said on one of the pages) seemed pretty close to idea.
 

Ya’akov

Joined Jan 27, 2019
5,654
If 'downstream" is between the output stage and the speaker, yes, but if it is between some output and a power amplifier, then no, not really at least not enough to matter.
The only place you could put an analogue attenuator in this case would be on the inputs which is clearly not ideal. The board uses a TDA7492 which doesn't expose much. It has a two bit digital input level selector which has 4 fixed levels, but that's about it.
 

Ya’akov

Joined Jan 27, 2019
5,654
If it acts like a switch closure. Otherwise I'm dubious about its functionality in the way the TS wants to go.
It outputs pulses, but they can be interfaced to a dual analog switch IC to get switch closures. On the other hand, unless the switch closures are pulling some pins low, the pulses might work just fine.
 
Last edited:

crutschow

Joined Mar 14, 2008
29,772
Here's a quadrature decoder circuit for a rotary encoder using one 74HC74 dual FF chip, that does I believe, basically what the ELM402 chip does, expect it uses an external RC debounce circuit for the clocks:
It provides Up pulses (blue trace) when the encoder rotates in one direction (green pulses (A) leading), and Down pulses (red trace) when the encoder rotates in the opposite direction (yellow pulses (B) leading).

1646057866999.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
11,876
If there are only a llimited number of steps it does not make much sense to use a knob-encoder. I think that just one stream of pulses, either up or down, can also be done with an and gate for each direction. an output happens only if track B is high when track A rises. So it may need rising edge detect with a cap to make it work. It was a very long time ago I did that.
 

crutschow

Joined Mar 14, 2008
29,772
If there are only a llimited number of steps it does not make much sense to use a knob-encoder. I think that just one stream of pulses, either up or down, can also be done with an and gate for each direction. an output happens only if track B is high when track A rises. So it may need rising edge detect with a cap to make it work. It was a very long time ago I did that.
Is that simpler than the circuit I posted?
 

MisterBill2

Joined Jan 23, 2018
11,876
Only slightly simpLer, does not need the capacitors. Of course the question is do optical encoder pulses need de-bouncing? But if it is a mechanical encoder then probably they do.
 
Last edited:
Top