EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: dB on January 28, 2016, 04:06:51 pm

Title: Op Amp Circuit Math
Post by: dB on January 28, 2016, 04:06:51 pm
Hello everyone, longtime listener, first time caller...

I have a simple circuit I've built up to experiment with opamps. I've included a crappy picture of it. It's a basic non-inverting op amp circuit.

I have a 10K resistor at R1, and a 2K2 resistor at R2. 10/2 + 1 == 6. Which is the gain I expect. However, I'm only getting a 1.2 gain, as if the resistors are switched. If I switch the resistors so I have 2K2 at R1 and 10K at R2 I get a gain of six! I'm measuring the gain with my Rigol Oscope, sorry I didn't include any screen shots.

I know I'm doing something wrong, because every opamp calculation says R1/R2 +1 for a non inverting circuit, I'm getting just the opposite. WTH!!! :scared:

PS the opamp is a TI tlo82 dual opamp if that matters, I've checked the pinout many times...

Thanks,
Brian
Title: Re: Op Amp Circuit Math
Post by: w2aew on January 28, 2016, 07:47:48 pm
What are your power supply rails?
What exactly is your input signal?

My guess is that you're not obeying the input common mode voltage limits of the op amp.  For the TL082, the input common mode range only extends to within a few volts of either supply rail.
Title: Re: Op Amp Circuit Math
Post by: dB on January 28, 2016, 09:54:01 pm
The op amp rails are being fed from +10V and -10V from a bench power supply  through a TLE "railsplitter". I'm feeding in a 2V p2p sine wave from an app on my phone, since I don't have a proper signal gen.

I'll attach a photo of my scope, the Yellow is the orig signal and the Blue is taken from the output pin of the opamp.

Title: Re: Op Amp Circuit Math
Post by: newbrain on January 28, 2016, 11:08:31 pm
Have you checked the resistor values? From the (quite out of focus) pic, it would seem 1k ohm (brown, black, black, brown) rather than 10k ohm (br,bk,bk,red).
That would give a gain less than 1.5 in one configuration and just above 3 in the opposite one.
Title: Re: Op Amp Circuit Math
Post by: Lee Leduc on January 28, 2016, 11:52:38 pm
Sorry, I'm a little confused here. If your power supply provides +10 volts and -10 volts, why are you using a TLE "railsplitter"?
Title: Re: Op Amp Circuit Math
Post by: Audioguru on January 29, 2016, 02:19:42 am
Maybe this and maybe that.
We need a detailed schematic showing resistor values that were measured with a multimeter and power supply voltages also measured.
Maybe the power supply is a 10V supply with two terminals marked  positive and negative.
Where is the detailed and labelled schematic of the TLE rail splitter?
Is the opamp a cheap Chinese fake from ebay?
Title: Re: Op Amp Circuit Math
Post by: w2aew on January 29, 2016, 02:40:28 am
Are you using 10x probes, and properly accounted for the probe attenuation in both channels?
Title: Re: Op Amp Circuit Math
Post by: dB on January 30, 2016, 01:16:22 pm
Thanks for all the responses...

I've checked the resistors with my DMM. I'm not proficient on color codes, so that's how I pick them, with my meter...
I've double-checked the probes and o scope, they are both set for 10x .

My bench power supply is set to output 20 Volts. The railsplitter gives +10v and -10v. (Measured with trusty fluke 87V)

Op amp is straight from Mouser.

I've put together a schematic in Eagle, I hope it's clear enough...

Title: Re: Op Amp Circuit Math
Post by: dB on January 30, 2016, 01:37:46 pm
I'll add some bonus pictures in to try and help you help me!!!
Title: Re: Op Amp Circuit Math
Post by: Brumby on January 30, 2016, 01:40:53 pm
The output (pin 1) of the TLE2426 should be your 0v (virtual ground).  This is where the bottom of R2 should go.

The positive of your supply becomes the +10v rail and the negative becomes the -10v rail.  You need to change the +ve supply connection to the op-amp.
Title: Re: Op Amp Circuit Math
Post by: dB on January 30, 2016, 02:25:49 pm
Of course you're correct. An error in drawing up the schematic.

Here's an updated version.
Title: Re: Op Amp Circuit Math
Post by: Brumby on January 30, 2016, 02:42:25 pm
Looking better.

Where is your scope earth connected and where is your input signal earth connected?
Title: Re: Op Amp Circuit Math
Post by: Brumby on January 30, 2016, 02:52:51 pm
Ahhhh - hang on...

(https://www.eevblog.com/forum/beginners/op-amp-circuit-math/?action=dlattach;attach=197900;image)

That's a 1K resistor!

As stated above:
Have you checked the resistor values? From the (quite out of focus) pic, it would seem 1k ohm (brown, black, black, brown) rather than 10k ohm (br,bk,bk,red).
That would give a gain less than 1.5 in one configuration and just above 3 in the opposite one.
Title: Re: Op Amp Circuit Math
Post by: dB on January 30, 2016, 03:16:03 pm
Ahhhh - hang on...

(https://www.eevblog.com/forum/beginners/op-amp-circuit-math/?action=dlattach;attach=197900;image)

That's a 1K resistor!

As stated above:
Have you checked the resistor values? From the (quite out of focus) pic, it would seem 1k ohm (brown, black, black, brown) rather than 10k ohm (br,bk,bk,red).
That would give a gain less than 1.5 in one configuration and just above 3 in the opposite one.

Well, that's only a LITTLE embarrassing!!! :-+

Sure enough, when I replace the 1K resistor with a 10K resistor, the math works!!!!
10 / 2.2 = 5.54

This is NOT the lesson I wanted to learn from this experiment, but apparently it was neccessary!!!
Thank you all for the help, I'll go back to lurking now... ;D

The proof!
Title: Re: Op Amp Circuit Math
Post by: Brumby on January 30, 2016, 03:19:55 pm

This is NOT the lesson I wanted to learn from this experiment, but apparently it was neccessary!!!


That's OK.  We've all had moments like that - but we try and avoid doing so on a global stage.   ;)
Title: Re: Op Amp Circuit Math
Post by: newbrain on January 30, 2016, 07:52:38 pm

This is NOT the lesson I wanted to learn from this experiment, but apparently it was neccessary!!!


That's OK.  We've all had moments like that - but we try and avoid doing so on a global stage.   ;)
Yes, but sometimes the only way to see the obvious is through someone else's eyes!
Glad to have been of some help.