# How to design a unity gain with LM358 op amp?

I am trying to get a unity gain out of an LM358 to increase the current of an AC sine wave input from 5mA to something slightly higher. I thought I had it hooked up correctly for unity gain, but most of the negative parts of the sine wave are getting clipped.

Is there something I need to be doing to get the negative parts of my input to pass through correctly?

Below is an image of basically what I have. I ended up switching to +12 and -12V references where as previously I was using just a ground at pin 4. I was getting this clipping even with no voltage supply attached and just the + of the input in Vin and the - into ground (pin 4).

• Can you provide a schematic of the current setup? Aug 5 '13 at 18:14
• You need to include a schematic of what you have built to give us any hope of figuring out what the issue is. Aug 5 '13 at 18:18
• Quite possibly you have tried to apply a signal that is biased at the negative rail - you probably need to create a centre rail (voltage midpoint) and ac couple in and out via a capacitor. Aug 5 '13 at 18:30
• The circuit is OK what supplies do you have? If you positive and negative input you will need positive and negative supplies. Aug 5 '13 at 18:50
• Well, if you're not providing the op-amp a negative rail, how do you expect it to produce a negative output voltage? Your best bet will probably be to bias the input, and then remove the bias at the output via a capacitor. Aug 5 '13 at 18:53

Create a mid-rail voltage point by using two 10k resistors; one connected to positive supply and one connected to ground. Join the two in the middle and connect to Vin+.

With your input disconnected you will see half the supply voltage on the output of the op-amp. Now connect your input via (say) a 10uF capacitor to Vin+. You should now see the signal repeated at the output.

To use this output signal as an ac source, use another 10uF in series with the output. If you are needing low frequencies 10uF maybe too small.

This TI document has some good circuits with and without gain for ac inputs and biasing. It's called "a single supply op-amp collection".

The LM358 isn't a rail-to-rail op-amp, so you will not be able to achieve voltages close to ground or supply. You can either bias the signal a little bit to avoid the clipping with a level shifter with unity gain, or choose a different op amp that is rail-to-rail.

I needed a negative rail, and when trying to add that I was still getting clipping because I was using that as the ground from the AC input instead of making a separate ground with the two output DC supply's common ground.

AKA i was using the negative rail as ground for the input.

Simple problem, but you guys helped me figure it out thanks.