Boosting PC line out audio voltage level?

Hello.
I’m working on a project that requires measuring the audio level from PC audio output. I have made two circuits for left and right channel that look like this:
4be69acdcaf8ebdcecd3a3ce8e51a12c63f5327b.gif
But I’m only getting about -30/+30 difference in the analog reading at full volume. I want to boost that audio signal to be around 2.5 V in amplitude in order to utilize the full Arduino analog pin resolution.
How can I achieve that?
I was thinking about using an Op Amp, like NE5534, but I don’t really know how I would connect it to the circuit then.

The quickest way to boos the AC voltage is to use an audio transformer.

Paul

Paul_KD7HB:
The quickest way to boos the AC voltage is to use an audio transformer.

Thanks for reply. I know I could use an audio transformer, but I can't find any commercially available step up audio transformers that would not be too big and have an appropriate turns ratio. I don't think that making one myself would be an easy job. Also, it would be nice to be able to later change the amplification ratio (re-calibrate the circuit with Arduino code), e.g. when some day a higher amplitude signal would be fed to the circuit, that's why I would prefer some semiconductor based method over an audio transformer.

How do you sample that audio, and how often.

Switching Aref to 1.1volt Aref, and using a voltage divider to 0.5volt (from the 3.3volt) pin increases sensitivity about five times.
That might be enough.
Leo..

I quickly found a cheap source:on EBAY.

Operate is in reverse. Put a 10k pot across the output to vary the voltage and get what you want.

Paul

komajster:
But I'm only getting about -30/+30 difference in the analog reading at full volume. I want to boost that audio signal to be around 2.5 V in amplitude in order to utilize the full Arduino analog pin resolution.
How can I achieve that?
I was thinking about using an Op Amp, like NE5534, but I don't really know how I would connect it to the circuit then.

The NE5534 isn't a low voltage rail-to-rail opamp, so you'd need something like +/-9V or more supplies
using it.

A precision low voltage rail-to-rail chip with low distortion would be needed for 5V audio circuit, one I've
used is the AD8656.

The kind of circuit you'd need is:

This one is set up for a gain of about 3 - set by (10k + 4k7)/4k7. You might want more gain,
in which case reduce the 4k7 in the feedback network.

The 4k7 on the output is to protect the Arduino pins should the opamp supply range be larger than
0V..5V

The virtual ground is generated at 2.5V, the audio shifted to this with a capacitor, then amplified
relative to the virtual ground, leaving is centred about about 2.5V.

MarkT:
This one is set up for a gain of about 3 - set by (10k + 4k7)/4k7. You might want more gain,
in which case reduce the 4k7 in the feedback network.

The 4k7 on the output is to protect the Arduino pins should the opamp supply range be larger than
0V..5V

The virtual ground is generated at 2.5V, the audio shifted to this with a capacitor, then amplified
relative to the virtual ground, leaving is centred about about 2.5V.

Thank you so much for that! I will try to build this circuit, but I need to understand it better. AD8656 is a dual channel op amp, so I think that you meant on that schematic to use these two channels for left and right audio channel, but I don't quite get the virtual ground circuit, is there another op amp used?

Wawa:
How do you sample that audio, and how often.

Switching Aref to 1.1volt Aref, and using a voltage divider to 0.5volt (from the 3.3volt) pin increases sensitivity about five times.
That might be enough.
Leo..

Thank you, that's a smart idea, I didn't know that it is possible to change the analog reference voltage.
I sample that audio every "loop" function cycle, by reading the analog pin value. That value later gets processed based on how much it "sticks out" from the idle value set by the voltage divider. It's used to drive RGB LEDs brightness.
For now, it seems to work much better than with a 100kΩ/100kΩ voltage divider and 5V reference.