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.
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:
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?
Thanks to everyone for their help. Here's the schematic for my final working circuit:
And the oscilloscopic proof: