Author Topic: OpAmp not gaining?  (Read 3046 times)

0 Members and 1 Guest are viewing this topic.

Offline sci4meTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: us
    • sci4me.com
OpAmp not gaining?
« on: June 15, 2015, 09:15:50 am »
Hey guys! So I am trying to make a simple opamp circuit. I am using a LM358 in a non-inverting configuration. My R2 is 470 ohm and my R1 is 330 ohm. Using the formula Av = R2 / R1 + 1, we should have a gain of 2.42.

Here is where I suspect I am doing something wrong. I am feeding in a square wave from an arduino.

Theoretically this should change the signal from 0-5v to 12.1v right?

However, my positive supply to the opamp is only 5v.

BUT, looking at the input and output signals on the scope, they are almost identical. They have nearly the exact same amplitude and frequency, it just appears to have a little distortion added. This signal is the EXACT same output I get when using a voltage follower configuration.

So what am I doing wrong? (besides only having a 5v rail and expecting 12.1v (that should just clamp it to 5v right?)) Let me know if you need more info.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: OpAmp not gaining?
« Reply #1 on: June 15, 2015, 09:29:27 am »
You already appear to have an idea of what you've done wrong; how can an op-amp possibly output a 12v signal with a supply of only 5v?

The output of the op-amp is clipping because the input is attempting to drive it past the op-amp supply rails.  Because the arduino and the op-amp have a same supply rails, you get more or less the same voltage out of the op-amp as you do the arduino.
 

Offline sci4meTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: us
    • sci4me.com
Re: OpAmp not gaining?
« Reply #2 on: June 15, 2015, 09:34:56 am »
Oh... wow... I feel like an absolute idiot now...

Haha, thanks! Of course, it's so obvious.
 

Offline sci4meTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: us
    • sci4me.com
Re: OpAmp not gaining?
« Reply #3 on: June 15, 2015, 09:42:53 am »
Gah, still no go! I put in a voltage divider between my arduino and the op-amp so that the input is much less than 5v, and when I probe the output of the opamp, it's the SAME as the input!

Hmm...
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: OpAmp not gaining?
« Reply #4 on: June 15, 2015, 09:57:27 am »
Gah, still no go! I put in a voltage divider between my arduino and the op-amp so that the input is much less than 5v, and when I probe the output of the opamp, it's the SAME as the input!

Hmm...

What is the actual voltage swing going into the non-inverting input?  "Much less than 5v" doesn't really help us.

Note that the output of the LM358 can only get within about 1v of it's +ve supply rail even for very small loads.  This means the output will start clipping with about 4/2.42 ~ 1.6 volts on the input.

If you have a suitable potentiometer then hook that up to the input so you can vary the input level all the way from 0 to 5v, and you should then be able to see the point at which the output starts clipping.
 

Offline sci4meTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: us
    • sci4me.com
Re: OpAmp not gaining?
« Reply #5 on: June 15, 2015, 10:06:59 am »
I originally tried an input of 1.5v, but I just tried up to 2.5v.
I am using a potentiometer to adjust the voltage. It doesn't seem to matter how low I go on the input, the output signal stays the same as the input.

I would try using a higher voltage supply but I don't have any bananna plugs for my power supply :P I've been using a 5V 10A converter.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: OpAmp not gaining?
« Reply #6 on: June 15, 2015, 10:17:36 am »
I originally tried an input of 1.5v, but I just tried up to 2.5v.
I am using a potentiometer to adjust the voltage. It doesn't seem to matter how low I go on the input, the output signal stays the same as the input.

You need to go lower than 1.5v, not higher.  If the output is still clipping with e.g. 0.5v on the input, then it suggests that either your circuit is wired incorrectly, or the resistor values are not what you think they are.  Can you show us a pic of your circuit?
 

Offline sci4meTopic starter

  • Regular Contributor
  • *
  • Posts: 139
  • Country: us
    • sci4me.com
Re: OpAmp not gaining?
« Reply #7 on: June 15, 2015, 10:24:49 am »
Alright guys, I got it.

I made a pretty embarrassing mistake... I won't tell you what it is except to say it has to do with the resistors.....

Thanks a lot guys!
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: OpAmp not gaining?
« Reply #8 on: June 15, 2015, 10:40:43 am »
Glad you got it working.  To err is human; to get your circuit working, divine ;)
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: OpAmp not gaining?
« Reply #9 on: June 15, 2015, 12:10:54 pm »
Alright guys, I got it.

I made a pretty embarrassing mistake... I won't tell you what it is except to say it has to do with the resistors.....
Thanks a lot guys!
Bloody color code?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf