Arm Mbed OS support forum

How to bias ADC pin at Vcc/2 using coupling capacitor and voltage divider?

I am trying to bring in an Analog signal from an audio cable into one of the AnalogIn pins on the mbed, but I have to bias it at Vcc/2 using a coupling capacitor and voltage divider, but I am confused how to do that?

Based on the frequencies I’ll be using, I know the value of the capacitor I that I need, and I know that to set up a voltage divider to half the Vcc I just need two resistors of the same value, but I am confused about what Vcc I am bringing into the pin? Am I bringing in Vcc from the mbed itself, and if so, wouldn’t that result in just the mbed powering it’s own pin? I’m really confused on this, so any help would be really appreciated.

Hello Leith,

The simplest method is to use only a capacitor + voltage divider:
bias_1

The analog signal is added, over the capacitor, to the 3.3V/2 (1.65V) ADC. If the signal amplitude is greater than 3.3V then it’s clipped to 0 to 3.3V range. If the output impedance of the signal source is high than the signal could be distorted.

But a better solution is to use an op-amp. For example a cheap LM358 (two op-amps in one package):

Op-amps are configured here as signal buffers. They don’t amplify the analog signal (gain is equal to one) but the signal won’t be distorted because they have very high input impedance and very low output impedance.

Best regards, Zoltan