Attached is a schematic which is mixing an audio signal from an MP3 player and PWM signal from a micro. I am using a single supply op amp MCP6001 to do the job.
I think i have most of the circuit figured out, but i need to know the best way to DC shift the audio signal so that it is centered at Vdd/2 so that it will not clip due to being near the negative rail(ground).
Sidequestion.
Is noninverting the best opamp configuration for this job? I could look at the non inverting configuration if it may be a better fit.
The easiest way is to put a capacitor in series with R2. You should use a larger value capacitor, 10 uF or higher. If you use an aluminum electrolytic capacitor, which is typically polarized, put the + side towards R2 and the - side is where you connect your MP3 audio.
The voltage rating on the capacitor should be Vdd or higher.
It would seem that this would strip any dc and center the audio signal around ground. Is this not the case? I want to raise the audio signal and center it around vdd/2.
Yeah, that did the trick. I've always considered using a cap inline as being blocking the DC, but in this case it appears that it raises the DC level as it is coupled with the output.
As you can see my analog skills suck, not a good thing to bring a digital guy into the analog realm.