summing amplifier sim not as expected - Page 1
Forum section: electronics / beginners

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 04:23:56 am
content: The circuit for an inverting summing amplifier seems pretty basic. When I build one and run it in partsim.com, I get an unexpected result.For summing 2 DC voltages of +1V and +2V, my output is -2.91V instead of -3V. In the schematic I have an additional resistor R3 as suggested by a TI tech note that says this is needed to offset bias current error. However I get the same exact result when R3 present or absent.When I create the exact same circuit in circuitlab.com, it reports -2.999V.When I do a time domain analysis, in circuitlab.com it shows -2.999V from 0us through to the end of the run. In partsim, the output starts at +1V and goes to -2.91V by about 200us. I'd discount the partsim results if not for the time domain simulation which seems more accurate since of course the output of the op amp can't just instantaneously go to the final value.Any ideas? I'm not 100% confident that my circuit is correct (I'm a noob), although it seems damn simple so it should be correct. I wonder if there's some real world consideration that partsim might be taking into account, whereas circuitlab is using more "ideal" components for its model?I did try reducing the voltages in partsim just in case, for some odd reason, it considered the rail voltages to be +/- 3V and that's why I couldn't reach 3V. But the output voltage is always less than expected.

author: Aleksandar B.
author_rank: Contributor
timestamp: October 12, 2015, 04:50:06 am
content: I don't have much experience with simulators, but if the model is good I guess you could be in the non-linear region of the opamp.

author: oaliey
author_rank: Contributor
timestamp: October 12, 2015, 04:53:28 am
content: Check your currents going into the inputs of the opamp. The error is only 9nA, which is not an unreasonable value.Edit: Whoops, I missread your schematic. You don't have 10Meg ohm resistors there, instead you only have 10mili ohm.

author: Vgkid
author_rank: Super Contributor
timestamp: October 12, 2015, 05:05:42 am
content: Just a thought, could the input bias current be causing issues with the 10Meg ohm resistors on the input.

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 05:19:36 am
content: Quote from: oaliey on October 12, 2015, 04:53:28 amNo, they are 10mega ohm

author: oaliey
author_rank: Contributor
timestamp: October 12, 2015, 05:22:04 am
content: Spice is not case-sensitive. So both m and M stand for milli. Meg is what Spice uses for MegaIf you check your currents, they show ~100A and 200A, which confirms that the resistances are being interpreted as milli-ohms

author: jitter
author_rank: Frequent Contributor
timestamp: October 12, 2015, 05:23:06 am
content: Quote from: oaliey on October 12, 2015, 04:53:28 amWell, I don't blame you, a capital M next to the value of a resistor indicates mega, not milli.M= megam = milliK = Kelvink = kiloEdit: why doesn't Spice use the S.I. conventions?

author: tec5c
author_rank: Frequent Contributor
timestamp: October 12, 2015, 05:31:46 am
content: Quote from: oaliey on October 12, 2015, 05:22:04 amTrue for SPICE, not for circuitlab.com

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 05:33:45 am
content: Quote from: oaliey on October 12, 2015, 05:22:04 amThey do show quite high currents, I was wondering what the heck that was about also! Let me fix that and report back.

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 05:39:44 am
content: -3.0V dead nuts, after fixing M-->meggracias

author: oaliey
author_rank: Contributor
timestamp: October 12, 2015, 05:45:14 am
content: Keep in mind the concerns with opamp bias currents are still valid when using real opamps. Although the design does take it partly into account with the 3.3M resistor. This means it is only the input offset current specification you need to look at, you want this <1nA. Your jellybean LM741 is not going to cut-it. Thankfully most modern precision opamps will meet this spec.Is there any particular reason for using such large resistors?

author: DrGeoff
author_rank: Frequent Contributor
timestamp: October 12, 2015, 06:14:40 am
content: Quote from: jitter on October 12, 2015, 05:23:06 amSPICE was originally written in FORTRAN, which only used upper case. To maintain consistency and compatibility with the large number of models out there written for the original SPICE simulator, the input syntax was maintained.There is a manual for SPICE which details this. I think I still have my old dog-eared one from the early 80's.

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 08:28:46 pm
content: Quote from: oaliey on October 12, 2015, 05:45:14 amThe 100K resistor is part of an existing and calibrated DAQ system. I need to tap the sensor output with minimal disturbance so as to not change the calibration. I went with 10M with the reasoning that this is what scopes do. Is that a valid line of reasoning?

author: oaliey
author_rank: Contributor
timestamp: October 12, 2015, 09:30:17 pm
content: You also have an option of buffering the inputs with opamps, however in your case it might not be necessary. If you need greater than 10mV of precision you might find buffering is easier and then using resistors in the 10-100k range.

author: electrolust
author_rank: Unknown
timestamp: October 12, 2015, 09:38:27 pm
content: Thanks I was just going to ask that after pricing precision 10M resistors.I need .25% precision on a 5V signal (12.5mV).Can I use any old op amp as buffer?An OPA4277 quad precision op amp is $8, whereas the single OPA277 is $3. If I can use the OPA277 + a $1 dual op amp as buffer, then that cuts the cost in half.

author: DrGeoff
author_rank: Frequent Contributor
timestamp: October 12, 2015, 09:43:58 pm
content: Quote from: electrolust on October 12, 2015, 09:38:27 pmNot if you want high input impedance.Use a FET input op-amp to get a very high input impedance.

author: Zero999
author_rank: Super Contributor
timestamp: October 12, 2015, 10:29:57 pm
content: Quote from: electrolust on October 12, 2015, 08:28:46 pmThe trouble is bias currents both increase the error and noise when the resistor values are high. You could use a FET input op-amp which will have a very low bias current but as you want an input impedance of 100k, you might as well go for 100k input resistors.