Problem with LM358n based circuits "guitar to xmega adc" and "xmega dac to amp"


I'm trying to build AtXmega16a4 based, simple guitar effect(Guitar to xmega adc -> audio modifications -> xmega dac to guitar amp).

Right now I'm having problems with lm358n based circuits. Guitar signal(avg. 300mV peak) should be amplified to positive voltage(range of ADC is 0 - 2,5V). After processing, it should be amplified back to guitar voltage range(avg. 300mV peak).

Everything works great on simulator, but not on my breadboard.

Schematic: (Amps supply is single 5V)

Please, help me.
(First post, sorry for mistakes)

The two output inverting stages have 0V as virtual ground, so it cannot work as
an inverting stage needs either input or output below virtual ground, ie virtual ground must
be mid-rail, not 0V.

Or you must generate a negative supply voltage.

Ok, I've created virtual ground from 9V so I've got +4,5 and -4,5V.

I've made simple inverting amp circuit to see results and It's not working either:

I set Vin = 3.3V(to real GND), so my Vout should be -3.3V but it is Vout = ~5.46V. Why? :frowning:

Thank you for your help

Have you also connected the other Op Amp in the package? If you leave it floating, it can oscillate or otherwise lock up and cause the other Op Amp to not work right. Best practice: connect the inverting input to the output with a 10k resistor, and the noninverting input to the same 4.5V point.

You should also have something like a 0.1uF bypass cap from the 4.5V point to ground. You can use resistors a lot higher than that, if it isn't being loaded down by anything but the Op Amp.

For an audio virtual ground two 10k resistors and 10uF decoupling would be reasonable -
keep the virtual ground closely decoupled to the 0V rail across the audio spectrum, not just
the high frequencies. 220 ohms is crazy low, wastes lots of current. If the opamp has
low input currents you can happily increase those resistors to 100k.

A virtual ground that goes only to non-inverting inputs can be shared as there only
high-impedance loads.