Inverting OpAmp mystery - Page 1
Forum section: electronics / projects

author: mboich
author_rank: Contributor
timestamp: March 10, 2014, 10:22:36 pm
content: I'm sampling a sensor with an Arduino, and using an amplifier to condition the signal. The output of the sensor is 0-5V, but in my application I'm only interested on the range from 2.3-3V. To improve resolution, I'm using an inverting opamp with a gain of -6.7 and an offset voltage of 2.61V. When I simulate this circuit, it does exactly what I want: An input of 2.3 volts creates an output of 4.67V, an input of 3.0V creates an output of 0.009V, and the intermediate signals all fall linearly between those values.You can see a representation of the circuit athttps://www.circuitlab.com/circuit/7j27u7/inverting-opamp/.I've built the circuit up (multiple times), and the outputs are slightly off. Poking around with my multimeter, it seems that the opamp is not obeying the promise to do whatever it can to make voltages at its inputs equal. I measure the non-inverting input to be 2.592V, and the inverting input to be 2.604 volts, which is a difference of 120mV. (These measurements are consistent for various input voltages in the range I mentioned above - 2.3-3.0V.) That difference accounts for the discrepancy between the outputs I see and the outputs I expect.But I can't account for the discrepancy. I'm using an TI OPA 2350 opamp, which is a rail-to-rail opamp, with the rails at 0V and 5V. The output is only driving an ADC pin on the Arduino, and the circuit behaves the same way when I disconnect the output. After seeing the discrepancy, I breadboarded just the amp, so there's nothing else going on that should affect things. I do realize that this type of amplifier has a relatively low input impedance (based on the feedback resistors), and am driving it with a buffer.Any suggestions?Thxmboich

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 10, 2014, 10:41:13 pm
content: Is it oscillating by any chance?

author: mboich
author_rank: Contributor
timestamp: March 10, 2014, 10:47:23 pm
content: No oscillation. I realize I may need to add some capacitance to make it robust, but it's stable at the moment.

author: Lunasix
author_rank: Regular Contributor
timestamp: March 10, 2014, 11:04:13 pm
content: I also think to oscillations. Adding capacitor and reading with a multimeter is not sufficient to be sure. And 2.604 - 2.592 = 12mV, not 120mV, but is always too much for this amp. And bias is low. Power supply can also be responsible.

author: mboich
author_rank: Contributor
timestamp: March 10, 2014, 11:19:05 pm
content: Oops! 12mv. But still a lot compared to the 150 microvolts in the datasheet.I'll look for oscillations, but I have connected my scope and don't see anything. I'm attaching a photo from the scope. Channel 1 is the inverting input of the opamp, and channel 2 is the opamp output.Thanks for the suggestions.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 11, 2014, 12:18:32 am
content: Does that thing have a "PK DETECT" acquisition mode? Zoomed all the way out at 100ms/div you aren't going to see anything your meter can't see.Tim

author: mboich
author_rank: Contributor
timestamp: March 11, 2014, 12:51:45 am
content: Tim,I'm attaching 3 images at 20ns/div. (I'm a relative novice, so I'm no virtuoso with the scope.) Do they suggest oscillation? I tried putting a couple of different capacitors (4.7nf and 10 nf) in parallel with the feedback resistor, and didn't see any change in behavior.thxMike

author: Andy Watson
author_rank: Super Contributor
timestamp: March 11, 2014, 12:58:20 am
content: Quote from: mboich on March 10, 2014, 10:22:36 pm2.604 - 2.592 = 12mV. The value of 2.604 is reasonable assuming you've used 1% (or worse) resistors in the offset divider. The lower voltage on the positive input to the op-amp is consistent with the divider chain being loaded down by, say, the 10M input impedance of a DVM.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 11, 2014, 01:01:24 am
content: Hi,The offset of the op-amp is specified at the input. The Offset at the output is amplified by the gain of the stage.I think this picture will help:The Vos is shown as voltage source in series with an ideal op-amp input.Regards,Jay_Diddy_B

author: mboich
author_rank: Contributor
timestamp: March 11, 2014, 01:27:06 am
content: Jay_Diddy_B,Yes, I'm biasing by providing 2.6V into the non-inverting input. The overall math works, but I'm mystified as to why I measure different voltages at the two inputs.Andy,I think you've nailed it. The 2.592 is what I read when I check the bias voltage at the non-inverting input (supplied through the divider), and it looks like a 10M input impedance of the meter would cause around a 14mV drop. Am I correct that I won't see a similar drop when measuring the inverting input, since the opamp has enough drive (through the feedback network) to overcome the added load?thxMike

author: Andy Watson
author_rank: Super Contributor
timestamp: March 11, 2014, 01:32:03 am
content: Quote from: mboich on March 11, 2014, 01:27:06 amYes you are correct. As long as the op-amp is "operating" the negative input will appear to have negligible impedance.

author: mboich
author_rank: Contributor
timestamp: March 11, 2014, 01:37:23 am
content: Mystery solved. Thanks again! As you can tell, I'm a relative novice. I've read about these cases where the test equipment alters the circuit, but it didn't occur to me that I was in that territory.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 11, 2014, 04:33:11 am
content: Quote from: mboich on March 11, 2014, 12:51:45 amHmm, probably not. I'm guessing that looks intermittent, bursty? Probably nearby loads with crappy filtering.Tim

author: mboich
author_rank: Contributor
timestamp: March 11, 2014, 04:44:56 am
content: Tim,After I posted that, I removed the power from the circuit and it looked about the same.Another post from Andy Watson spotted the problem: The input impedance of my multimeter loads the voltage divider (bias voltage) by about 12 mV, whereas when I measure the inverting input of the opamp, the opamp has low enough effective output impedance that no drop occurs. So in reality the two inputs of the opamp are at identical voltages, but naive use of a multimeter led me to believe otherwise!Mike

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 11, 2014, 04:51:36 am
content: Another reality check,probe between the inputs. If it's a 10M meter, at worst you've increased the stage gain a little; if it goes high-Z on that range, you should see no change at all (like if you have a second meter watching the output, or measure with scope, or..), and be able to measure Vos directly.Tim

author: mboich
author_rank: Contributor
timestamp: March 11, 2014, 05:09:19 am
content: Tim,Yes, maybe I should have thought of that! Measuring the offset voltage directly (as opposed to measuring each input relative to ground) yields 0.0 volts, which confirms the diagnosis.Thanks.Mike