Electronic – Op-amp output clipped

operational-amplifier

I've been trying to get into using opamps… I have a bit of experience with digital electronics, but this is definitely new ground for me. I tried to set up an inverting amplifier like this:

schematic

simulate this circuit – Schematic created using CircuitLab

When I measured the output, it seemed to be "clipping" in that it suddenly levels off at a consistent level: (these two graphs have equal scale)

enter image description here

I expected the output to go very close to 0 and 5V, perhaps with a slight margin, but in the range of millivolts.

To test this I removed the feedback resistor so the opamp would essentially attempt infinite gain, but the same problem occurs:

enter image description here

Notice how the output is still constrained.

Am I doing something wrong? Is there something I don't know about opamps?

Best Answer

Welcome to the world of real opamps. Real opamps are not ideal. For this particular case - the output does not swing exactly to rails. Event for opamps that are advertised as "rail to rail" output will be several mV from the real rail.

Output swing is usually specified in the datasheet. It's called output swing, min/max output or something like that, look for output specifications. For 741 it's +-16V when powered from +-20V or +-13V when powered from +-15V. It varies with load and many different factors.

Usually when designing opamp circuits you try to opearate in the middle between the rails, and avoid going near the rail (except for comparator configurations). Note that in amlifier case opamp will start to behave funky when you swing close to a rail - you wil start getting distortion. YMMV, depends on how good your opamp is.

Another thing - you are doing inverting configuration wrong. You have to tie noninverting input to a midpoint between the rails. 2.5V in this particular case. It does not necessarily have to be the exact mid point - it all depends on your input signal.

Think about it intuitivelly - in your case for the opamp to swing high, your input signal has to go below the ground, so you set up "virtual ground" somewhere between rails so that your opamp has some reference agains which to invert the input signal.