Solving system of two equations results in no solution

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
I'm using the generic equation for a difference amplifier.
upload_2019-3-8_9-39-41.png

Let V1 = 5, R2 = 5600. R1 = 295k (expecting to use a 300 kΩ standard resistor).
At an input of 263 mV, the output should be 1 V;
at an input of 96 mV, the output should be 0.
upload_2019-3-8_9-35-54.png
https://www.symbolab.com/solver/system-of-equations-calculator/1=0.263\left(\frac{\left(295000+5600\right)}{\left(x+y\right)}\right)\cdot\frac{y}{295000}-.09589, 0=0.096\left(\frac{\left(295000+5600\right)}{\left(x+y\right)}\right)\cdot\frac{y}{295000}-.09589

I'm stuck. What should I do?
 
Last edited:

pmd34

Joined Feb 22, 2014
527
Solve for y...
First times everything by (x+y) (to get rid of this denominator)
Rearrange and simply both equations
Then substitute you y=....... from one equations into the other.
 

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
Solve for y...
First times everything by (x+y) (to get rid of this denominator)
Rearrange and simply both equations
Then substitute you y=....... from one equations into the other.
Ya, see the link. I solved it first by hand, and then typed it into that website. Solving results in false or no solution.
 

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
Ah sorry I see the problem. Are you sure you have V1 and V2 correct? As Vout = Gain (V2-V1). You cant have V2 < V1 and have a positive output.
I just figured I need to shift the 0.096 volts down first (since that needs to be zero). So I thought scaling that down first was the way to go: y = mx = b. The "b" term to scale. So I set the V1*R2/R1 = 0.096 V. I assumed a value for R2 and solved for R1. Then...the rest.
 

pmd34

Joined Feb 22, 2014
527
If V2 > V1 then V out is >0
If V1 > V2 then V out is <0
Regardless of resistor values. (So you can only solve and get positive values of resistance if you swap your V1 and V2 input values over).
 

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
If V2 > V1 then V out is >0
If V1 > V2 then V out is <0
Regardless of resistor values. (So you can only solve and get positive values of resistance if you swap your V1 and V2 input values over).
At an input of 0.096 V, the output needs to be 0;
at an input of 0.263 V, the output needs to be 1 V.

So you're saying I should swap the 5 V with ΔV...but I don't know how to start assuming resistor values then.
 

pmd34

Joined Feb 22, 2014
527
No im saying that Vout cant be >0V (ie positive) if V1 is 5V and V2 is <5V ie. 263mV

If V1 is less than V2.. then your equations will solve.. so V2 could be 5V and V1 could be 263mV...
 

Jony130

Joined Feb 17, 2009
5,488
At an input of 263 mV, the output should be 1 V;
at an input of 96 mV, the output should be 0.
Your line equation is

Vout = 5.98802 * Vin - 0.57485

Hence the circuit you have chosen is wrong.
Because you need positive voltage gain (5.988V/V)

But you can use this idea


12.png

With this output

11.png


The gain is 5.98802V/V = (1 + R2/(R1||R3))

And to get Vout = 0V for Vin = 96mV we need 96mV at the inverting input also.
Therefore the current through R2 resistor is equal to

I = 96mV/68k = 1.41176μA the same current must follow through (R1||R3) resistor and must comes from Vref source.
Hence Vref = 96mV+ I *(R1||R3) = 0.115251 = 115.251mV
 

Thread Starter

Adam Uraynar

Joined Dec 21, 2015
67
upload_2019-3-8_13-32-4.png

Well, I tried that, and somehow my sensor is reporting different values now:
At an input of 300 mV, the output should be 1 V;
at an input of 107 mV, the output should be 0.

Vout = 5.18*Vs - 0.554
(link)

Gain = 5.18 V/V = (1 + R2/(R1||R3))

A) Let R2 = 68k.

I = 0.107V/68k = 1.57μA the same current must follow through (R1||R3) resistor and must comes from Vref source; Vref = 0.107V+ I *(R1||R3).

5.18 V/V = 1 + 68000/Rp
Therefore, Rp = 16267
B) sengpielaudio.com/calculator-parallel.htm
R1 = 18k
R3 = 180k
Rp' = 16363

Vref = 0.107 + 1.57e-6*Rp' = 0.133 V

C) Voltage divider
Rv = 56.4 (measured)
Rd = 2064 (theoretical) = 2k-2.1k (standard).
upload_2019-3-8_13-35-35.png
upload_2019-3-8_13-36-22.png
...although, I would like to get that lower end (107 mV input at least under 5 mV at the output).
 

Attachments

WBahn

Joined Mar 31, 2012
30,087
Ah sorry I see the problem. Are you sure you have V1 and V2 correct? As Vout = Gain (V2-V1). You cant have V2 < V1 and have a positive output.
The problem isn't so much the sign of V2-V1, since the circuit isn't Vout = Gain(V2-V1). It is Vout = G1·V2 - G2·V1 where G2 and G1 do not have to be equal. So it is possible to chose R3/R4 such that the zero point in the output is at a point other than V2 = V1.

The problem is that we don't have two independent equations in two unknowns. With the information given, all we can determine is the required ratio of R3/R4. But with two such equations, we get no solution unless both equations yield the same ratio.
 
Top