Page 1 of 1

LM358 differential voltage and amplifier circuit

Posted: Wed Oct 20, 2021 8:04 pm
by Deion Adel
I designed a circuit that's rather common:

Image

I designed a circuit that's rather common:

schematic

simulate this circuit – Schematic created using CircuitLab

And I have a problem. I have got few LM358s, (LM358 datasheet) some from ST, some from other companies. (I tested LMV358 also - it puts ~5 V as V_OUT_FINAL). I made a designed circuit and already put every one of those LM358s in it and none works the way I want them to do. I always get a constant error of 1-3 V as V_OUT_FINAL. I also get wrong result as V_OUT_1 (because it's around 0,5-1 V). I don't know what's wrong. The values in my real project are wrong in terms to the designed and simulated. I simulated it on many tools already and all give me results like those from attached circuit.

V_IN_1 = 12 V, V_IN_2 ~ 12 V (little less than 12V). V_OUT_1 = few mV. V_OUT_FINAL ~ 3 V.

Re: LM358 differential voltage and amplifier circuit

Posted: Wed Oct 20, 2021 9:29 pm
by dyarker
What is the tolerance of resistors R1 to R4?

The difference in resistance could cause the difference in voltage to OA1 to be larger than Sense_Res voltage.

Try - Short Sense_Res, then adjust the R1, R2, R3, R4 so the voltage between V_IN_12 and V_IN_22 is zero. STOP! R4 is also feedback for OA1. I do not believe it can be same value as R3.

My first impulse would be a separate feedback resistor to - input (inverting) of OA1. (and R4 to common)

Time for paper and calculator. Will be back, unless someone else is faster.

Cheers,

Re: LM358 differential voltage and amplifier circuit

Posted: Wed Oct 20, 2021 9:40 pm
by dyarker
What is the variation of LOAD you're trying to measure? And V_Out_Final for each end of variation?

Re: LM358 differential voltage and amplifier circuit

Posted: Thu Oct 21, 2021 3:12 am
by dyarker
V_IN_12 is 2.45V. By itself that would cause V_OUT_1 to go to +5V, so V_IN_22 would be 6.97V. Which would actually drive V_OUT_1 lower then 5V. Making V_IN_22 lower, but not but not enough to make V_IN_22 about 2.45V. Voltage drop by Sensor_Res is swamped out.

No point looking at OA2 section till OA1 is working as expected.

Cheers,

Re: LM358 differential voltage and amplifier circuit

Posted: Thu Oct 21, 2021 12:40 pm
by haklesup
easiest way to see if Dyarker is on to something regarding tolerance is to measure each resistor you used and update your model with actual values.


Start on the left and compare each node to your model until you find the disagreement and debug from there.

Re: LM358 differential voltage and amplifier circuit

Posted: Fri Oct 22, 2021 1:06 pm
by UhClem
Deion Adel wrote: Wed Oct 20, 2021 8:04 pm I designed a circuit that's rather common:
Why not use a part designed specifically for this sort of thing like the INA195?