Op amp woes.

So, I ordered this opamp called the MCP602 on a recommendation.

The idea was to run it on the arduino 0-5v power, amplifying my guitar (AC 300mv max), and then reading the output with the arduino ADC.

I posted my circuit image below, as well as the simulation output image. Unfortunately the MCP602 was not available in the sim, so I picked the closest thing, the LM358.

In the simulation, it runs like it should, clipped lows are at zero, and highs hit at around 5v+. But in real life, the output does not stay 0-5v and instead sinks down and goes from negative 2.5v for the lows to positive 2.5v for the peaks. What the hell is making it drop into negative territory?

I know I'm using a different chip, but is there a difference between the MCP602 and the LM386 that would cause this problem? If it's not the chip, then what am I missing?

Thanks for any help.

Your signal ground needs to be something like 2.5V

uberdanzik:
But in real life, the output does not stay 0-5v and instead sinks down and goes from negative 2.5v for the lows to positive 2.5v for the peaks. What the hell is making it drop into negative territory?

Where do you see that? The orange is the output, right? That doesn't go below zero.

Where do you see that? The orange is the output, right? That doesn't go below zero.

The image is from the simulation, which is performing correctly. My real life circuit is going negative.

Your signal ground needs to be something like 2.5V

Thanks for your input, but I'm more interested in why the simulation does not reflect the offset result I'm getting in my real life circuit.

uberdanzik:
The image is from the simulation, which is performing correctly. My real life circuit is going negative.

Right. Well I just made up your exact circuit, fed in 500 mV sine wave, powered the LM358 from 5V, and got this:

The output doesn't go negative.

Right. Well I just made up your exact circuit, fed in 500 mV sine wave, powered the LM358 from 5V, and got this:

Wow. I wasn't expecting such awesome help. This was a real physical circuit? I guess the MCP602 chip I'm using has some major difference with it then that makes it perform differently.

Thank you very much for that.

Yeah, a real circuit. I had the LM358 sitting there anyway, just changed the resistors.

I don't offhand see how the op-amp can go negative (below ground) but I'm no expert on them.

Yeah, a real circuit. I had the LM358 sitting there anyway, just changed the resistors.

Perfect, thanks Nick, you just saved me a lot of trouble.

uberdanzik:
In the simulation, it runs like it should, clipped lows are at zero, and highs hit at around 5v+. But in real life, the output does not stay 0-5v and instead sinks down and goes from negative 2.5v for the lows to positive 2.5v for the peaks. What the hell is making it drop into negative territory?

Negative compared to what? Is there a missing ground connection somewhere, or some source of capacitance?

A dual supply opamp would do that, which the 602 is not
but unless your feeding it with -+ 2.5 volts I don't see how that's happening, how are you reading the output? I assume an oscilloscope? Make sure you connect the ground from the probe to your ground

I assume an oscilloscope?

If so also make sure the input is switched to DC coupling not AC.

If so also make sure the input is switched to DC coupling not AC.

You're talking about changing the scope input setting to DC coupling and not AC? This is strange to me. So the scope will incorrectly show a negative voltage on the line if the input is set to AC ? Why is that the case? Does it just try to center my signal or something?

Why is that the case? Does it just try to center my signal or something?

That is how physics works. Voltage is a relitave measure and AC coupling removes any objective DC level. It is a high pass filter, no DC gets through.

uberdanzik:
So the scope will incorrectly show a negative voltage on the line if the input is set to AC ? Why is that the case? Does it just try to center my signal or something?

If you remove the DC component, then yes. Say an AC voltage of +/- 0.5V is centered around +5V DC. So you get 4.5V to 5.5V. But on AC coupling, the +5V is gone, so you now get -0.5V to +0.5 because that is all that is left.

In AC mode the average (to be precise the mean) voltage will be 0V for a repeating waveform, which means equal areas above and below the 0V line. The way AC mode is done is by connecting a capacitor between the scope probe and the scope's input circuit, which then averages at 0V due to the 1M load resistor to ground at the scope Y-amp's input. In DC mode this capacitor is bypassed.