Author Topic: DC Bias on Two Audio Channels  (Read 3332 times)

0 Members and 1 Guest are viewing this topic.

Offline selkathguyTopic starter

  • Supporter
  • ****
  • Posts: 88
  • Country: us
DC Bias on Two Audio Channels
« on: October 07, 2013, 03:37:06 pm »
I'm trying to bias two different audio channels (left and right) from their typical 1.5v(p-p) AC headphone drive level up to one half of a 3.3v rail, while keeping them both separate and not interfering with each other.  I'm doing this so that both channels can be read by an ADC. 

Also:  Are the op-amps even necessary?  (EDIT: Yes.)  I know they don't take much current, but someone suggested to include them so that I do not kick noise back into the audio stream (it's a passthrough design, where there are 2 audio jacks connected straight through and simply tapped for sampling).

Here's my first attempt:



After realizing they would interfere with each other via the common 3v3 rail, I tried to suppress the audio by adding a capacitor on each rail tap, on the rail side of the resistor.


Please tell me what I'm doing wrong cause this feels wrong.   Thanks in advance!
« Last Edit: October 07, 2013, 04:38:50 pm by selkathguy »
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17728
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: DC Bias on Two Audio Channels
« Reply #1 on: October 07, 2013, 03:45:25 pm »
You want a summing amplifier to add the DC biasis to the existing signal. Yes you need to do it with an opamp
 

Offline selkathguyTopic starter

  • Supporter
  • ****
  • Posts: 88
  • Country: us
Re: DC Bias on Two Audio Channels
« Reply #2 on: October 07, 2013, 04:34:23 pm »
Thanks, Simon!

So if I understand how that works correctly, I should just go for something like:


If I'm reading the wikipedia article correctly, that should just do a 1:1 straight add of the signal and 1.6v, and follow it between GND and 3v3.  Correct?
 

Online ConKbot

  • Super Contributor
  • ***
  • Posts: 1380
Re: DC Bias on Two Audio Channels
« Reply #3 on: October 07, 2013, 04:41:12 pm »
How are you getting your 3.3v supply? A 1.5vpp signal applied though a 100k resistor shouldn't cause a large fluctuation on it. (and there should be capacitance on the supply already for the op-amps ) 

The circuit you attached should work just fine if you have bypass caps on the opamps. If not definitely add those. You will have a cutoff of 3.2Hz, If you want response  to DC, you'll need an op-amp to add a DC offset, but if you're fine with down to 3.2Hz, then just using the op-amp as a buffer is fine.

I'd keep the op-amps too, as many ADC's have a low(ish) input impedance and that would vary the roll-off caused by C67. For example, if the ADC had a 5k input impedance, that would push the cut-off upto 30Hz.


If you really want to keep your noise separated out. I'd use a regulator for the analog side and the analog side of the ADC power, and a second regulator for all the digital stuff. and I'd use star grounding if you dont have a big ground plane(I.e. breadbording or protoboarding).


EDIT: the 3rd schematic you posted would have a static DC offset as desired and frequency response down to DC. However your divider for 1.6v should probably be 1k and 1k or lower so that the 10k resistor doesnt load it too badly. As it is now, it would be loaded down to 1.1v, because U6 pin 2 is going to be held at agnd potential by the op-amp.
« Last Edit: October 07, 2013, 04:46:03 pm by ConKbot »
 

Offline selkathguyTopic starter

  • Supporter
  • ****
  • Posts: 88
  • Country: us
Re: DC Bias on Two Audio Channels
« Reply #4 on: October 07, 2013, 05:00:54 pm »
How are you getting your 3.3v supply? A 1.5vpp signal applied though a 100k resistor shouldn't cause a large fluctuation on it. (and there should be capacitance on the supply already for the op-amps ) 
It isn't shown,  but there is definitely decoupling capacitance on the rail for the dual op amp.  I'm just more concerned with crosstalk between the channels, but as you say with 100k it should be negligible enough that the little current that seeps back should fall into the capacitance of the rail.


The circuit you attached should work just fine if you have bypass caps on the opamps. If not definitely add those. You will have a cutoff of 3.2Hz, If you want response  to DC, you'll need an op-amp to add a DC offset, but if you're fine with down to 3.2Hz, then just using the op-amp as a buffer is fine.

I'd keep the op-amps too, as many ADC's have a low(ish) input impedance and that would vary the roll-off caused by C67. For example, if the ADC had a 5k input impedance, that would push the cut-off upto 30Hz.
I need response down to 20hz roughly, and I need the amplifier to output a signal that swings between (at very most) AGND and 3v3, centered on 1.6, as the ADC can only sense in that range.

If you really want to keep your noise separated out. I'd use a regulator for the analog side and the analog side of the ADC power, and a second regulator for all the digital stuff. and I'd use star grounding if you dont have a big ground plane(I.e. breadbording or protoboarding).
The digital stuff is all on its own regulators; the AVCC3_1 net is a dedicated 3v3 rail purely for the ADC supply and op amps.  I keep these two tied together on the same supply so that noise on one will be present on the other, and in the Analog Reference (also AVCC3_1).  It should just kind of auto compensate;  If the op amp supply drops due to noise or something, so will the analog reference (tied to AVCC3_1), so it all stays within the same relative scope.  That's all terribly worded but I hope you get my meaning.
« Last Edit: October 07, 2013, 06:10:16 pm by selkathguy »
 

Offline selkathguyTopic starter

  • Supporter
  • ****
  • Posts: 88
  • Country: us
Re: DC Bias on Two Audio Channels
« Reply #5 on: October 09, 2013, 02:09:25 pm »
This seems to be giving a straight 2.8v output (on either channel, "AUDIOSENSE").  Note that the ground from the audio source is separate from AGND, as I'm a little weary of connecting the two together.   Also I'm not sure this is the approach I want to take if I want to have headphones be driven from the audio source. 


I think I was closer with my original schematic...

Again my goal here is to tap into a headphone/speaker drive signal (-1.4v to +1.4v) and sample it (0v to 3.3v) without distorting the original audio, or at least as little as possible.
 

Offline victor

  • Regular Contributor
  • *
  • Posts: 110
  • Country: 00
  • Boy who writes code and take things apart
    • vitim.us
DC Bias on Two Audio Channels
« Reply #6 on: October 09, 2013, 02:21:33 pm »
I'm sorry, but what this actually does?
I don't understand why you need >20Hz from a audio jack, most of audio stuff clip everything this low frequency. I'm just curious
your body is limited, but not your mind
 

Offline selkathguyTopic starter

  • Supporter
  • ****
  • Posts: 88
  • Country: us
Re: DC Bias on Two Audio Channels
« Reply #7 on: October 09, 2013, 02:24:28 pm »
I'm sorry, but what this actually does?
I don't understand why you need >20Hz from a audio jack, most of audio stuff clip everything this low frequency. I'm just curious
I'm making a high speed high-resolution Audio FFT.  A microcontroller is sampling the output and it can select which channel it wants.
 

Offline Hideki

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: no
Re: DC Bias on Two Audio Channels
« Reply #8 on: October 09, 2013, 08:21:44 pm »
Feed your 1.65 volt bias into the non-inverting input of the opamps instead of connecting those inputs to ground. Don't try to sum the bias.

 

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: DC Bias on Two Audio Channels
« Reply #9 on: October 11, 2013, 11:49:58 pm »
You need to keep an eye on the common-mode voltage of the op-amp---in a single-supply design, don't connect the non-inverting input to ground.

I've knocked together a quick design (linked below), which works in LTSpice, though you might want to increase the blocking capacitor to 10uF or 22uF to improve low-frequency response.  An inverting amplifier produces less distortion than a non-inverting one because its inputs are always at roughly the same voltage.  You can reduce low-frequency noise by adding a large capacitor in parallel with the 100nF one.

http://twopif.net/files/blocking.png

Edit: Followup question, what ADC are you using? It would help determine whether our suggestions are quiet enough for you.
« Last Edit: October 12, 2013, 01:50:19 am by sub »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf