LTSpice measurement differs from reality - Page 1
Forum section: electronics / beginners

author: Aeternam
author_rank: Unknown
timestamp: December 22, 2015, 04:54:06 pm
content: The title says it all. I have a schematic that reads a different output in LTSpice than what I measure on the prototype board.Every readout on the nodes is pretty much identical to what I measure on my breadboard, except for the output. LTSpice says it should read 130 mA (bottom right), whereas "in real life" I get 50 mA output. I'm pretty sure it's a user error, but I'm kinda lost. It would help if I knew how to measure the voltage drop across R6 but it wouldn't let me set a measurement reference on the right side of it (probably because it's hooked up to ground.) I can put it on the left side of it, but then it won't pop up the probe when I hover over the right leg. BummerI attached the schematic. (The R1 and R7 voltage divider is representing a potentiometer, seemed like the easiest way to set it up.) I should also mention that U2s output is a measured 4.87V on the breadboard whereas Spice calculates it to be 4.397V.Can anyone point me in the right direction?Pretty please?

author: awallin
author_rank: Frequent Contributor
timestamp: December 22, 2015, 05:04:45 pm
content: first guess: 128 mV is too close to your op-amp negative supply (which looks like 0 V or GND).either bias the whole circuit so your operating point is at say 1V, or provide bipolar supplies to the op-amps so they can swing close to GND without issues.

author: Kleinstein
author_rank: Super Contributor
timestamp: December 22, 2015, 05:53:03 pm
content: The LM324 may have an offset of up to about 10 mV. So thight explain some difference but not all. WIth a 1 Ohm resistor, the lines connectors might also add a little there. There is also a small chance that the circuit is oscillating thus dilivring 100 mA part of the time. However the circuit in principle looks ok.The slight difference in OP output voltage jst reflects variabel threashold of the MOSFET - not all of them are the same. SO nothing to warry about that.

author: AndyC_772
author_rank: Super Contributor
timestamp: December 22, 2015, 06:40:18 pm
content: Quote from: Aeternam on December 22, 2015, 04:54:06 pmIf you just click on the left leg, you get a plot of voltage with respect to ground. Since the right legisgrounded, the plot you getisthe voltage across R6.You only need the click-drag-release way to plot a voltage if neither of the nodes is ground.

author: Kalvin
author_rank: Super Contributor
timestamp: December 22, 2015, 06:57:02 pm
content: What happens if you add a 100nF capacitor across the R6?

author: owiecc
author_rank: Frequent Contributor
timestamp: December 22, 2015, 07:05:08 pm
content: If every readout you see is similar to the simulation then R6 is not 1ohm. Another option is that your circuit is unstable and is oscillating.

author: eetech00
author_rank: Regular Contributor
timestamp: December 22, 2015, 07:41:24 pm
content: If you change R6 to about 0.25 ohms it will measure about 50mV. R6 probably isn't 1 ohm.How are you making the measurement?

author: Aeternam
author_rank: Unknown
timestamp: December 22, 2015, 08:08:22 pm
content: Did I read oscillation? Looks like I finally have the excuse I needed to get that scopeLots of ideas on what to check, thanks all for your input. I'll head over to the bench and check them out!

author: Aeternam
author_rank: Unknown
timestamp: December 22, 2015, 08:18:55 pm
content: The cables that I used to hook up R6 have a 1 Ohm resistance each. Sure enough if I change R6 to reflect that I get a 43mA output in Spice.Problem solved, you guys are the best

author: Kalvin
author_rank: Super Contributor
timestamp: December 22, 2015, 08:26:21 pm
content: Quote from: Aeternam on December 22, 2015, 08:18:55 pmClassic!