DIY Audio Mux & Volume Control

Hi I'm new here so please bare with me 🙂

I have a relatively decent (IMHO) but old set of PC speakers (Creative Inspire 2.1 2500) that I'm converting to use with my TV but they lack remote volume control and the TV when set to use external speakers will not allow volume control and will just send full volume. I also want to add source switching so it can take input from a bluetooh adapter and an auxillary 3.5 mm jack.

I'm kind of a perfectionist so I'm aiming for +4 dBu line level (3.472 Vpk-pk) input and output range and frequency response 20 to 20k although the speakers are 40 to 20k but hey let's be future proof. Also I should be able to power it with a single supply for simplicity.

Currently I feed it 12 V from a battery (purest power source) to an LM7805 with input and output decoupling capacitors.

My current topology, attenuate the input by half, ac couple it then add offset of VCC/2 = 2.5V, this will make a -3 dB HPF of 9.6 Hz at -20 dB/decade and an input impedance of 75 ohms I believe. I think 75 ohms is a good compromise and it should match most coax cables. It then goes to an op amp buffer (currently LM358, let's get to op amps later).

Bare in mind that in this pandemic situation I only got the parts around me and ordering new ones is limited and takes time.

After ac coupling, a DAC0808 that takes the buffered input as a reference voltage and attenuates it according to the digital input (A0 to A7). I provide it with VEE = -5.6 V from a NE555 two stage charge pump at 50 Khz and variable pulse width followed by a zener regulator as only around 4 milliamps is needed. Even though this section is powered from the 12 V input, I had to add an LC filter to its power input to reduce the noise at the final stage amplifier output.

The DAC output is inverted so I added an ac coupled inverting amplifier/bandpass filter at 7.2 Hz and 22.8 Khz with a gain of 6 to bring that back to roughly +4 dBu line level, I'll do fine ajustments later so that the whole thing has unity gain at full volume setting.

Controlling the whole thing with an arduino board and an IR receiver so I can control the it with the TV remote. Maybe I'll add a rotary encoder and indicator LEDs/screen later. For the source switching I'll be using CD4066 switches or maybe order CD4052 according to crosstalk but let's get to that later.

I know this has been a long write up and possibly not in the correct thread 😀 but please let me continue.

PROBLEMS TO SOLVE:

1)
The DAC outputs a DC voltage and the audio riding on top of that and when changing the volume, the DC voltage changes as well as the audio amplitude. This changing DC shift appears as pops in the audio output when changing the volume and I need help filtering that out please!

2)
I know the LM358 op amps are not very "audio worthy", but for now it's the only amp I have in stock along with a few LM324 and LM741 which are arguably worse. I know it has a class AB output but I had not crossover distortion visible on the oscilloscope with a resistive load which shouldn't be a problem as it should be connected to the speaker amplifier input. The datasheet says to connect the output to ground through a resistor to properly bias the output stage to reduce crossover distortion when a capacitive load is connected which is the AC coupling at the output. The datasheet has an example with 6.2K pulldown so I used a 4.7K for good measure, also the resistor after the capacitor so it can charge to the dc shift without a load to reduce popping, is that a correct approach?

There are a few I can order locally including LF351, LF353, LF356, NE5532, NE5534, OP07, MC33078, TL071, TL072, TL074, TL082 & TL084. I know that generally single op amp packages are better performing and not just better with crosstalk but I still cannot choose, it's my first time (AFAIR) to use op amps for audio, I've made transistor and IC amps before with TIP142/7, LM386, TDA2003 for example but never used an op amp. I just want to know which op amp you guys prefer to use.

3)
Where can I discuss with you guys the audio taper curve I program into the arduino?

PS: I own a pair of Audio-Technica ATH-M40x so I have a base line for audio quality.
 

Attachments

  • Screenshot (6).png
    Screenshot (6).png
    152.3 KB · Views: 251
Last edited:
....NE5532 or NE5534A will do fine....

....in this pandemic situation I only got the parts around me and ordering new ones is limited and takes time. ....LM358 op amps are not very "audio worthy", but for now it's the only amp I have in stock...

I imagine in normal times much of Egypt has less chips in stock locally than I do in northern Maine, and this season is not "normal". Especially if parts have to cross borders.

youssefaly97, I suggest you may have to aim for a "useful" solution now with hopes of changing parts later when the supply chains adapt to reduced shipping and routine quarantining of packages.
 
Sorry for the delay, just finished final examinations.
2):


The standard workhorses NE5532 or NE5534A will do fine for bipolar, if you need very low bias currents TL07x series are often seen. Crosstalk between halves of a dual opamp is only very rarely as issue, you don't need to worry about this.

Thank you Mark Tillotson, I haven't tested the LM358 specifically for crosstalk yet but I still get audio through at the 0 volume. I haven't checked for the source of audio at zero volume yet but since the input and output stages are using both halves of a LM358 I suspected that to be coupled from the input. Eitherway if crosstalk becomes a problem I will isolate both channels.

PRR, well in normal times, around 4 of the largest cities in Egypt including Cairo and Alexandria where I am, stock most of the electronics parts in the country. In the past these vendors where only selling these parts as spare parts and repair so they would naturally stock the most commonly requested parts only which will only have new varieties every once in a while as the market needs newer parts. Usually radio, home stereo and tv repairs then came satellite tv and mobile phones. In the last 10 years the markets changed dramatically as engineering students started getting much more practical so new businesses opened just to sell these "new" parts which all started with PIC micros and arduinos with the rise of interest in embeded systems. They still need some time to get a bit upto speed but they're not very far behind. There are large distributers with catalogs on the level of mouser.com and the like but apparently not very popular and maybe a bit secluded. I mean it can be difficult to get snubber diodes and certainly inductors but you can easily find the latest Raspberry Pi although not all the variants.

This project is certainly not large enough to pay international shipping + customs for non-bulk orders of its parts. I beleive I can get to a pretty close to perfect solution with what's around.

I need help on input bias and offset currents and input noise voltage and current please.