Electronic – Convert an audio signal to 0-5V using single supply op amp

dc-offsetoperational-amplifiervoltage divider

I'm trying to capture an audio signal using an analog input of an Arduino Uno. The Arduino's analog input must be between 0-5V. I'd like to use a single power supply via an 9V battery, so I'm using a voltage divider to offset the input signal and feeding that to an LM321 op amp. Here's my current circuit:

Updated Circuit: Added 100uF cap before voltage divider.

schematic

Note: The audio input can be a microphone, mixer output, headphone jack, electric guitar, etc.

Originally, I was using the 5V power supply from the Arduino but I found that the amplified signal was being clipped around 3.8V. I believe this is because the LM321 is not a rail to rail op amp, and is limited to V+ – 1.5V according to the Vcm (input common-mode voltage range)…though I really don't understand exactly what that spec means. Is this correct?

I switched to a 9V supply and changed the voltage divider resistors to the values above to get close to a 2.5V DC offset. The non-inverting op amp is setup for a 2X gain, which works. However, the issue now is that although I have successfully amplified the signal, it is no longer centered at 2.5V. Here's a screenshot from my scope, the original source signal is in yellow and the output from the op amp is in blue:

enter image description here

What is the simplest way to get the output signal "re-centered" around 2.5V? Or, is this just a bad approach to solving the problem?

Solution

Thanks to everyone for their help. Here's the schematic for my final working circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

And the oscilloscopic proof:

enter image description here

Best Answer

You are close to having a working solution.

I attempted to edit your schematic but I don't see a edit link below the schematic in the preview window. So I'll draw a new one here.

schematic

simulate this circuit – Schematic created using CircuitLab

R5 & C2 filter noise from your 5V rail. You may need to increase the value of C2 if you are getting excessive noise.

R1 & R2 set the gain. Gain is set to 11 with the values shown.

R1 & C1 set the low-frequency response of the amplifier. Increase C2 if you need a lower break-point.

C3 & the parallel resistance of R4 & R3 also set the low frequency break point of the amp. Note that R5 doesn't affect the low frequency response because C2 keeps the node of R5, R4, C2 at AC ground potential.