Oh yeah you said it right Once again, sloppiness is my undoing.. I meant:So you are just going to completely ignore everything I said about Vsense needing to be negative and go ahead and use Vsense = 0.2 V.
Then I need two equations and can do equation 2 minus equation 1 , right?Why do you think you get to arbitrarily pick one of the two resistor values? You have two unknowns and two conditions that have to be met.
Two equations, ***ONE*** variable: R2 / (R1 + R2).Equation 1: 0.5=-0.2+((1+0.2)/(R1+R2))*R2
Equation 2: 0.5=-1+((5+1)/(R1+R2))*R2
If I convert equation 1:These two equations lend themselves to solving one of them for (R1+R2) and then substituting that into the other equation. That will leave you with an equation that only have R2 in it. Then, once you have a value for R2, you can substitute that into either of the starting equations to get R1.
That means my equations are false?Generally, no solution in situations like this. No amount of math, not matter how fancy it is, can solve that problem
But this are 2 variables, R1 and R2!?Two equations, ***ONE*** variable: R2 / (R1 + R2).
Generally, no solution in situations like this. No amount of math, not matter how fancy it is, can solve that problem
Dont understand what I have to do, for which variable I have to convert the equation?et me save you a bit of time, however. The particular values you are trying to use require a Vin+ value of 0V. That's a problem since your opamp is single-supply powered.
But by choosing a different value for Rsense, you can move the voltage around.
That's actually a bit of illusion. For the problem here, R1 and R2 always appear as the ratio of the two. To see that this is the case, considerBut this are 2 variables, R1 and R2!?
With the constraint you've given, I would say the best way would be to plot Vin_min and Vin_max as a function of Vin-.But how can I find out the values of Vin, min and Vin, max that it works?
And Vin- =0.5V I can change too if necessery, to a value that it better for our calculating for R1 and R2.
can you solve it for 20mA?The same equation that governs the kneeing in point of V_signal governs the "gain":
(V_signal - 0.5) / R1 = (0.5 + Iout * R_sense)/R2.
You have two pairs of boundary conditions: Iout = 4ma @ V_signal = 1v; and Iout=20ma @ V_signal = 5v;
Solve for any combinations of R1/R2/R_sense.
It is simple.
The key is that the opamps inverting and non inverting inputs sit at the same potential (0.5v) once q1 starts to conduct.
R_sense has 4ma going through it. So r2's lower side sits at 0.2v below ground. That means r2 has a voltage drop of 0.5v - (-0.2v) = 0.7v.
That means the current flowing through r2, thus r1, must be 0.7v / 10k = 70ua.
If you want the curve starts to bend at v_signal = 1v, that means the voltage drop over r1 is 1v minus 0.5v = 0.5v.
So r1's resistance must be 0.5v / 70ua = 7k, approximately.
You can confirm that via experiment or simulation, .
Can someone help me to set the equations right? I think with Iout = 4ma @ V_signal = 2.6v and Iout=20ma @ V_signal = 5v; it should work.The same equation that governs the kneeing in point of V_signal governs the "gain":
(V_signal - 0.5) / R1 = (0.5 + Iout * R_sense)/R2.
You have two pairs of boundary conditions: Iout = 4ma @ V_signal = 1v; and Iout=20ma @ V_signal = 5v;
Solve for any combinations of R1/R2/R_sense.