Maker Pro
Maker Pro

4-20mA using XTR111

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
God it's so simple when you look at it again. To achieve 0.5 V on the inv terminal the output has to go to 0.4 V so effectively the gain is less than 1. As the input goes up the gain changes, when the input is 2 Volts the output will match this because the two inputs will also be matched due to the 1/2 supply on the inv input so the gain is 1. Effectively the 4K resistor is placed in parallel with the lower 120K to a varying degree.
Adam
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Probably not worth it now but here is my approach to working out the feedback resistor value for the first schematic.

We want to drop 4 Volts - 0.5 Volts across the top 120K so that’s 3.5 volts / 120 K = 29.16 uA

We know the bottom 120 K will have 0.5 volts across it. So it steals 0.5 Volts / 120 K = 4.16uA

We know we want a resistor that with 0.1 Volts across it and with 29.16 uA-4.16 uA =24.84 uA

Then 0.1 volts / 24.84 uA = 4025 Ohms or 4K Ohms.

But looks like you have already chosen another option.

Thanks Adam
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Probably not worth it now but here is my approach to working out the feedback resistor value for the first schematic.
We want to drop 4 Volts - 0.5 Volts across the top 120K so that’s 3.5 volts / 120 K = 29.16 uA
We know the bottom 120 K will have 0.5 volts across it. So it steals 0.5 Volts / 120 K = 4.16uA
We know we want a resistor that with 0.1 Volts across it and with 29.16 uA-4.16 uA =24.84 uA
Then 0.1 volts / 24.84 uA = 4025 Ohms or 4K Ohms.
I see what you mean. You've shown one way to calculate RF based on RA and RB (that's what I'll call them) to give the right output voltage (0.4V) at the corresponding input voltage (0.5V) for bottom of scale. But how do you calculate the ratio between RA and RB? We know it's 1:1 because I already calculated it. But if you didn't know it, how would you work it out?
 

PRIYADHARSHINI

Feb 6, 2014
137
Joined
Feb 6, 2014
Messages
137
Hi Kris,
i have DesigneD the circuit according to ur suggestion..can u explain me current mirror part in that IC (XTR111).
1.function of current mirror and how that concept is applied here

thanks regards..
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A current mirror is a circuit that accepts an input current and generates a corresponding output current. Both currents flow in the same direction - either "into" the mirror (for an NPN mirror, using conventional current) or "out of" the mirror (PNP mirror, conventional current). The current flowing into the input is determined by the driving circuit and is not limited by the mirror; the current flowing out of the output is regulated by the mirror.

Normally, input and output currents are the same, but in the case of this IC there seems to be a gain of 10 involved.

Current mirrors are documented in many places on the Internet. Google will find them for you.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
I see what you mean. You've shown one way to calculate RF based on RA and RB (that's what I'll call them) to give the right output voltage (0.4V) at the corresponding input voltage (0.5V) for bottom of scale. But how do you calculate the ratio between RA and RB? We know it's 1:1 because I already calculated it. But if you didn't know it, how would you work it out?

Ok I'll have a look.
Cheers
Adam
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Here's my attempt at it. God I hate rearranging formulas :) So I am guessing you chose the 120K first, and kept the value for RF low for stability purposes. And you knew you wanted 1/2 supply so the RABP(RA||RB) value is just 60K. Obviously standard values might of swayed you to your choice in initial values.
Cheers
Adam
OPAMP0420.PNG
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Oh Sorry I didn't show how to get m without knowing any values. It uses simultaneous equations of a straight line graph. You can do this because the op-amp is linear as it is configured. You have two Vouts 0.4 V and 2 V and two Vins 0.5 V and 2 V

Vout = m*Vin+b

0.4 = m*0.5+b
2 = m*2+b

Multiply the first one by 4 because 0.5*4 = 2 so you can then subtract them.

1.6 = m*2+4b
2 =m*2+b

Subtract top from bottom gives:
HERE
-0.4 = m -3b
b=-0.4/-3 = 0.133

Them m=0.4+0.133 = 0.533

I might have to check this again tomorrow it's getting late now, it's the right answer but I am not happy with the formula.
Cheers
Adam
 
Last edited:

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Ok I see it now. It should be this from HERE marked on original post.
0.4=m+3b
b=0.133
Put this back into the first equation (0.4=m*0.5+b)
0.4 = m*0.5+0.133
m=(0.4-0.133) / 0.5=0.534

Sorted!
Adam
 

PRIYADHARSHINI

Feb 6, 2014
137
Joined
Feb 6, 2014
Messages
137
hi Kris
i have tested the ciruit which was given by you..its works very nice..
i want to ask u one doubt..
how can we adjust the zero and span using XTR111
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
If you mean the circuit in post #8 on this thread, you can replace the two 120k resistors with a multi-turn 250k trimpot, and replace the 4k resistor with a multi-turn 5k or 10k trimpot, and they will adjust the zero and the span respectively, but each trimpot will also affect the other parameter, so getting them both adjusted properly requires a bit of practice and patience!
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I'm not sure what you're asking. But I have another suggestion that's a bit easier. Leave the two 120k resistors as they are. Replace the 4k resistor with a 5k multi-turn trimpot and use it to adjust the gain. Then adjust the offset by adjusting the 4V reference voltage, using the trimpot that's already there. Those adjustments should be independent, I think.

These adjustments are only suitable for fine adjustment, i.e. calibration, to remove small errors. If you want to adjust the parameters over a wide range, that's a different question.
 
Top