1
\$\begingroup\$

As many people on the internet I'm trying to add a DC offset to an audio signal. I've amplified it with an LM324 op-amp, using dual supply (+/- 5V). Afterwards I'd like to input this audio in my MCP3008 ADC, that has a 0 to 5V input voltage range.

For this reason I used a voltage divider, and I supplied one leg of the divider with 5V and the other one to ground.

Sorry for the really basic and trivial question, but is capacitor needed in front of the voltage divider? Because without it the signal isn't affected, so I was wondering whether the problem is somewhere else or if it is in the lack of the capacitor?

Thank you in advance,

Alberto

Edit: I even tried to use the output of the op-amp as input of another one, and I applied 5V to non-inverting input, as shown here, but with no results:

enter image description here

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

You should have a capacitor between the LM324 output and the middle of your voltage divider, which is also going to be the node that is the input on the ADC. The capacitor will allow the DC offset, while at the same time allowing the middle voltage of the divider to be pushed around by the audio signal. The divider provides the bias voltage (presumably 2.5V).

Since your amp output has a 10V swing, you will need to choose values for the resistors such that the output impedance of the LM324 cannot push the input of the ADC beyond 0-5V. (or add a resistor to the output of the LM324 to control the output impedance). How? Just consider the output at it's maximum (+5V above the node voltage*) and that going through the output impedance of the LM324 and the impedance of the capacitor in parallel with the top resistor of the divider, with the lower leg dragging it down.

Ra || Ro in series with Rb --> solve for the voltage at the junction, and that will be the maximum voltage that the input of the ADC. Do a similar analysis for the lower range.

In all of this you will have to consider the frequency response at the input to the ADC, as well in choosing your resistors and capacitor values.

*/as the top of Ro seeing +-5V above/below the bias voltage, the top of Ro is essentially between 7.5V and -2.5V

Similar to this: Bias circuit Transient Analysis The AC source is the output of the LM324, and the 1000k resistor is the input to the ADC. The value of the capacitor isn't very important, but you should do a frequency analysis to make sure that the circuit covers the range that you're looking for. Generally if you are dealing with AC signals you isolate parts of the circuit with a series capacitor, which will not pass the DC component, only the AC/signal portion. For example, the input to the LM324 should have a capacitor in front of it -- this protects the circuit, if someone were to connect a DC source to it.

The black line is the voltage at the ADC input. The orange line is a 10Vpp signal offset from the ADC's voltage range.

\$\endgroup\$
3
  • \$\begingroup\$ I chose two resistors of 3.3kOhm and one 0.47 microfarad capacitor, but the output isn't affected, are the values wrong? \$\endgroup\$
    – user25006
    Jun 16, 2017 at 10:58
  • \$\begingroup\$ Thank you very much for better explanation! One thing only: should I set the oscilloscope to DC? Because if I set it to AC the signal goes down. Is it right that DC stands for DC coupled and the same for AC? Because in DC mode the signal is perfect! \$\endgroup\$
    – user25006
    Jun 17, 2017 at 20:35
  • \$\begingroup\$ If you set it to DC you will see the DC offsets, which may be helpful, but you also have to adjust the scale on the scope so that the measured voltage is in range of the display. AC will only show the signal, without DC offset. \$\endgroup\$ Jun 19, 2017 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.