Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

audio input line problem

I have a problem with my audio setup where the audio input line signal is to strong to the point where it distorts audio.

My audio setup looks like this:

Pc -> usb dac -> amp

So far the only solution is to lower the pc volume down to 50% (and this solution isnt OK for me, i need my volume in windows at 100% !). The signal is still way to strong and i would like it lower, but at least the distortion is gone. All components were tested elsewhere and it came down to amp being the culprit.

So since lowering the pc volume to 50% solved the issue, i thought it should be easy enough to just put a resistor on each channel between dac and amp. I had to use a 50k resistor to actualy remove distortion. But for some reason this completely ruined the sound quality, it became muddy, like someone cut certain frequencies. I fail to understand why because lowering the pc volume should be basicaly the same as if i put a resistor on the L and R line and lower the volume like that, right ?

As for the reason why that is so, someone on this forum i belive, said that probably the amplifier is designed with mobile phones in mind and the signal i get from DAC is a lot stronger than what my mobile phone can supply. Meaning it overpowers the amp and distorts.

On the attached image you can see the amp and how it's connected. I soldered the input wires directly to 3.5mm female input jack on the amp for the sole reason to not have a 3.5mm male jack sticking out near volume pot. Just to make sure there is no misunderstanding.
 

Attachments

  • 20240817_183043.jpg
    20240817_183043.jpg
    3.2 MB · Views: 62
Last edited:
How 'bout a simple potentiometer before the amp? That way you can adjust the level for optimum quality. A 50K audio-taper pot (stereo) ought to do the trick.
This way you have a constant impedance on the input side (whatever the value of the pot is).

Ackshooly, on further thought, you probably don't want a big old pot hanging off your circuit, so just connect one temporarily, adjust it for optimum performance, then take it out and measure its resistance. Both ends. Then put in two resistors of about those values (close enough is close enough), since what you want is a voltage divider, not just a single resistance.
 

Attachments

  • stdpot.gif
    stdpot.gif
    1.1 KB · Views: 48
Last edited:
Thanks ! Attached is the image how its connected right now. How would i connect the pot ? Never tried doing that, but im pretty sure i got some laying around if u show me on the scheme.

Just curious .. why did the single resistor not work and produced such bad quality audio ? Always love to learn something new :)
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    22.7 KB · Views: 52
Oh, i think i got it. Pretty simple. I did it just for 1 channel, just to verify if i got the idea. And i dont mind a pot on top of the amp, its temporary setup anyway and looks interesting :)

If u dont mind, i would still love to hear why a single resistor ruined the audio. And how i would connect 2 resistors ?
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    34.2 KB · Views: 51
So it sounded OK with your pot? Not sure why it didn't work before; what value resistor did you use? Probably needed a voltage divider rather than just a single R.

Connect it just like any voltage divider; basically the same as your pot (think of the pot as having 2 segments, with the wiper--connected to the output--at the common point between them).

Voltage divider.gif
 
Just so you might learn something from this, here's how a voltage divider works:

Voltage divider.gif


It's a basic electronic concept used in a lot of places, so worth knowing about. Like the name implies, it divides a voltage (on the input side) into two voltages. The output side is at the voltage at the lower end (V2). The voltages are proportional to the ratio of the resistances. If R1 is a large value and R2 small, then V2 is a small voltage (and vice versa). Imagine turning your pot from one side to the other and think about what those 2 resistances are doing as you do that.
 
Just curious .. why did the single resistor not work and produced such bad quality audio ? Always love to learn something new

One possibility is that the amp has a small noise filter capacitor connected to GND. Your large series resistor works with this capacitor to form a lowpass filter, attenuating the higher frequencies in the audio signal way more than the lower frequencies. Hence the muddy sound.

The datasheet for the amp module or its web page might say something about requiring a relatively low impedance signal source. Or, if it states the input impedance of the amp itself, that could tell us something.

What does the big silver knob on the left side of the module do?
 
Hmm; looking at that module, I'd bet it's a class D amplifier. I'd also guess its input impedance is fairly high.
 
It's a 50W+50W Class D amp module, input impedance will be between 9k and 60k depending on what the gain setting resistors are assuming the line in is connected directly to the IC (see TPA3116D2 datasheet).

Another cause of distorted audio in those modules at high input levels is either the supply voltage is too low or the supply cannot supply enough current.
 
On the attached image you can see the amp and how it's connected. I soldered the input wires directly to 3.5mm female input jack on the amp for the sole reason to not have a 3.5mm male jack sticking out near volume pot.

If the amp module already has a "volume pot", why not use that to turn down the input signal.

Unless that volume pot is actually a gain pot, not directly connected to the input signal.

ak
 
As has been said mostly all through the thread, simply use two resistors (per channel) as an attenuator, the standard solution ever since electronics first started. Also as already said, the single resistor version failed because of the capacitance of the power amp input causing the creation of a low-pass filter.
 
Just so you might learn something from this, here's how a voltage divider works:

View attachment 146745

It's a basic electronic concept used in a lot of places, so worth knowing about. Like the name implies, it divides a voltage (on the input side) into two voltages. The output side is at the voltage at the lower end (V2). The voltages are proportional to the ratio of the resistances. If R1 is a large value and R2 small, then V2 is a small voltage (and vice versa). Imagine turning your pot from one side to the other and think about what those 2 resistances are doing as you do that.
Try R1 = 1k,
R2 >= 100

or R1 = 100
R2 = >=10
 
Welll, since the OP has connected a pot to the input, my suggestion was to adjust the pot for good performance, then measure the two legs and use those values (approx.) for resistors. And I'd guess the values would be quite a bit higher than what you suggested. But we'll see.
 
Welll, since the OP has connected a pot to the input, my suggestion was to adjust the pot for good performance, then measure the two legs and use those values (approx.) for resistors. And I'd guess the values would be quite a bit higher than what you suggested. But we'll see.
I agree the values were far too low, I presumed they were just a general example of an attenuator, and not suggested values for this application. I'd suggest 10K for the top, and 1K for the bottom - on the grounds that the DAC might be giving out about 5V p-p.
 
Any Op Amp Buffer rated for 20mA current limit can drive 20V into 1k
or +/-2V out draws only 2mA.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top