Opamp exercices - inconsistent calculation results (solved) - Page 1
Forum section: electronics / beginners

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 08:26:51 pm
content: I am revisiting old exercises because I want to sum and multiply in one step for a project...I don't see the point of breadboarding if I don't have an expected result.Some of theses questions were discussed a year ago,https://www.eevblog.com/forum/beginners/beginner-opamp-questions/but no real methods were given.Datasheets don't treat this circuit.Course method,The prof did it with mental calculation, but he did give us the method, that yields a disticnt result...When I run with a simulator, the answer is totally different from the previous 2:

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 08:35:22 pm
content: The output voltage is +5 V.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 08:39:37 pm
content: Explanation:V3 is 1 V. Therefore Va is 1 V.If Va is 1 V, then I(R1) = -5 mA. And I(R2) is 1 mA.Therefore I(R3) is -4 mA.Therefore (Va - Vo) / R3 = (1 - Vo) / 1k = -4 mA, so Vo = 1 - (-4) = 5 V.(Note: all resistor voltage differences and current flows measured from left to right.)

author: dom0
author_rank: Super Contributor
timestamp: January 01, 2016, 08:40:22 pm
content: The sources in your simulation might be just all the wrong polarity, I can never tell with this strange battery symbol.The error in your calculation is that you forgot that the sign of the current in R3 is opposite the current of R2 and R1 (just add the currents you calculated: -5 mA + 1 mA - 4 mA = -8 mA, that's not zero!). If you correct that mistake you have 4 mA * 1 k? = 4 V + 1 V = 5 V like the professor correctly said.#(LT)1128

author: mstevens
author_rank: Regular Contributor
timestamp: January 01, 2016, 08:42:34 pm
content: Look at your sign convention in the simulation. Your inconsistency is there. This is probably the most common problem in circuit analysis. You have to pick a convention and stick with it. As long as your sign convention (polarity) is consistent you should always get the same and right answer.Succinctly: Your 2V and 1V batteries are wired in the wrong direction in the sim.

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 08:53:00 pm
content: Quote from: dom0 on January 01, 2016, 08:40:22 pmOk, from your consistent results, it seems he wrote down the equation to obtain I of R3 wrong (signs). With that corrected it all fits in.Additionally, it now corresponds to the course method about summing Opamps (but to ground).

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 09:03:03 pm
content: Quote from: dom0 on January 01, 2016, 08:40:22 pmChecked that, did a simulation with a voltmeter on each source to be sure. So the simulator MUST be wrong here... Interesting.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 09:07:15 pm
content: Quote from: gildasd on January 01, 2016, 09:03:03 pmI doubt it. It is very unlikely for something like that to occur.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 09:12:24 pm
content: If you look at the last line of your working, you have i(R3) = -0.004 (correct).But in the next line you write i(R3) = (Vo - Va) / R3. This is where your error lies. You should have written i(R3) = (Va - Vo) / R3 instead.This is because the current of -0.004 is flowingfromVatoVo. If i(R1) and i(R2) are flowing into the Va node, then i(R3) must be flowing out of the Va node to balance the currents.If you fix this, your answer will work out correctly.

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 09:19:29 pm
content: Quote from: IanB on January 01, 2016, 09:12:24 pmThanks a bunch Ian.It's the way it was written on the blackboard... And what you say is what's written in his course.There are quite a few typos in the course, so I was ambivalent about what was right.Nobody said anything in class because this professor can look at a radar dish 5 miles away and say "38.5V on the 3rd rail" and be spot on...So everybody assumed all the formulas were right...

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 09:29:12 pm
content: Regarding your circuit simulation, take a look at how you have set up the batteries for the voltages.Firstly, note that the wide, thin plate is the positive end, and the short, thick plate is the negative end.Secondly, note that batteries have positive voltages. If you want a negative potential in your circuit you have to reverse the battery.So, Vdc2 has the right orientation, but you should set its voltage to +4 V.Vdc0 has the wrong orientation. You should switch it around so that the positive end faces R1. (And leave it at +2 V.)Similarly with Vdc1.If you do this, then what does the simulator say?

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 09:35:44 pm
content: Quote from: IanB on January 01, 2016, 09:07:15 pmIt seems this is a know bug/faffing about symbols.Here is the file:http://www.docircuits.com/my-circuit/36912/exam-mn2-2015

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 09:42:09 pm
content: Quote from: IanB on January 01, 2016, 09:29:12 pmTried that and got +3V on the output... The other power supplies seem to have the same issue... Or there is a parameter that I'm not seeing.I've did a quick check of the user issues and it seems it's a problem others have.But I bet it runs an FPGA with no problems.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 09:54:52 pm
content: I still have trouble believing it's a bug. I can't try it myself however because I can't access the simulator without registering first. There doesn't seem to be a demo or trial mode.

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 10:00:13 pm
content: Quote from: IanB on January 01, 2016, 09:54:52 pmThere is a free mode, but you need an email to set it up.http://www.docircuits.com/pricing

author: Nerull
author_rank: Frequent Contributor
timestamp: January 01, 2016, 10:08:40 pm
content: Works fine here. Post exactly what you built that got 3V.

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 10:31:18 pm
content: Quote from: Nerull on January 01, 2016, 10:08:40 pmWOW! What is that program, that's one hell of a learning tool!Annnnd I get the same result. Put the sources the wrong way around...

author: Nerull
author_rank: Frequent Contributor
timestamp: January 01, 2016, 10:39:31 pm
content: The top one is EveryCircuithttp://everycircuit.com/

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 10:40:50 pm
content: Quote from: Nerull on January 01, 2016, 10:39:31 pmThat's very good to visualize, thanks.

author: IanB
author_rank: Super Contributor
timestamp: January 01, 2016, 11:14:23 pm
content: Quote from: gildasd on January 01, 2016, 10:31:18 pmThat's what I told you in Reply #10...

author: gildasd
author_rank: Frequent Contributor
timestamp: January 01, 2016, 11:22:50 pm
content: Quote from: IanB on January 01, 2016, 11:14:23 pmI see that now... Sorry.But I am truly thankful for the help and patience, Thank you again.

author: gildasd
author_rank: Frequent Contributor
timestamp: January 03, 2016, 03:01:32 pm
content: In the same vein as before, we have this OpAmp based monostable Multivibrator.It comes with two pages of equations, that don't explain what happens when you change the value of a capacitor or a resistor.Has anybody seen this circuit before and has the setup equations?In real life, i'd breadboard it and use variable resistors and a oscilloscope to debug it... Not allowed in exam.Changed the drawing to make it more relevant.If we were to trigger this, what would we need to get, for example, a 2 second "blip"?

author: gildasd
author_rank: Frequent Contributor
timestamp: January 03, 2016, 10:14:22 pm
content: Think I solved it... Sorry for the French, only the graph at the bottom is of "real" interest.