XTR116-Proteus Simulation

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
Hi everyone,
I'm new to circuit design and simulation, working on a standard 4-20mA 2-wire loop-powered system to convert a 0-50mV differential sensor output. I'm using the XTR116, but since I couldn't find an available library, I designed it based on the datasheet. My calculations seem correct, but I'm having issues with the IRET pin, and the output current isn't behaving as expected—possibly due to a misunderstanding, component choice, or calculation error. Can anyone guide me on properly handling the IRET pin in a loop-powered system, common simulation mistakes with XTR116, or better ways to model it without a library? Thanks in advance!

1744113791311.png
 

0ri0n

Joined Jan 7, 2025
160
Strip everything that you don't need for simulation, like the internal current limiting. See attached example. You may need a preamp to get the sensor voltage up. The GND supply/reference for the preamp, Vreg, Vref is IRET. There is a single, real GND at the 24V supply. Vref + series resistor can be used as shown (see datasheet p.10) if a low scale offset current is needed.

XTR116_Simple_Circuit.png .
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
Hello,
Thank you for your guidance! I removed the unnecessary parts from my circuit as you suggested. However, now I am not seeing any output from my probes and I am getting "NAN" errors in the simulation. What could be the reason for this problem? Thanks again for your time!

1.jpg



Strip everything that you don't need for simulation, like the internal current limiting. See attached example. You may need a preamp to get the sensor voltage up. The GND supply/reference for the preamp, Vreg, Vref is IRET. There is a single, real GND at the 24V supply. Vref + series resistor can be used as shown (see datasheet p.10) if a low scale offset current is needed.

View attachment 346545 .
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
I’ve made some progress, but I’m facing a couple of issues. When I grounded the instrumentation op-amp separately at the output, I measured 20mA, which seems correct. However, the output of the AD620 doesn’t match my calculations, and the current is shown as negative. Could there be a problem with my setup or calculations?
Additionally, in a 2-wire loop-powered system, I understand that all other components should be connected to the IRET pin. But when I connect them to IRET, I start getting errors in the simulation.

1.jpg
 

0ri0n

Joined Jan 7, 2025
160
A couple of issues stick out. The AD620 differential amplifier uses a single 5V supply. Neither the input nor the output is rail-to-rail respectively goes down to 0V. Common mode input voltage range with 5V supply is limited to 1.9V...3.8V and the output voltage is limited to 1.1V...3.8V.

You mentioned the 50mV from the sensor being a differential voltage, probably from a bridge circuit. Does it have a common mode voltage?

The inverting input of the differential amplifier is grounded, directly connected to the GND of the 24V supply, overriding everything inbetween.

The negative supply pin of the op amp inside the XTR116 is connected, although not shown in the datasheet, to IRET. As you are using a real op amp with non-zero supply current do the same. I didn't do that in my example because the virtual op amp I used for demonstration has no significant supply current.

Test the two stages, differential amplifier and current sink, separately.
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
Based on your responses, I decided to replace the AD620 with the INA333 amplifier. According to my sensor’s datasheet, it states 'Common mode voltage output: 50% input (typ.)'. When I tested the circuit separately, placing a probe across the 250-ohm resistor, I measured 20mA, which worked as expected.


xtr11620mA_output.jpg


I also connected all the supply references to IRET and updated my internal circuit accordingly. However, when I tried integrating it with the other components, the simulation failed to run, and I encountered convergence errors.



ALL_TOGETHER.jpg
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
Even with the simulation issues, if I produce the PCB based on this circuit schematic, would it work in real life? Your guidance has already been incredibly helpful—thank you!

kicadxtr116.jpg
 

0ri0n

Joined Jan 7, 2025
160
Based on your responses, I decided to replace the AD620 with the INA333 amplifier. According to my sensor’s datasheet, it states 'Common mode voltage output: 50% input (typ.)'.
INA333 looks OK and 2.5V common mode voltage with a 5V supply is perfect. I used an AD8422 which also has a R2R output. As expected, the output voltage doesn't really go down to 0V. Because of this I switched from injecting a low scale 40uA offset current to instead biasing the differential amp REF-input with a 0.4V offset voltage. The offset voltage could be generated by dividing down the 4.096V REF-voltage and buffering the 0.4V with an additional low power op amp.

XTR116_v2.png

I also connected all the supply references to IRET and updated my internal circuit accordingly. However, when I tried integrating it with the other components, the simulation failed to run, and I encountered convergence errors.
Probably because the input of the differential amplifier is not biased correctly yet. The inputs are floating and the bias currents flowing in or out have nowhere to go. Add the 2.5V CM voltage source like I did. If you still experience convergence issues that you can not resolve, test the stages separately.

Even with the simulation issues, if I produce the PCB based on this circuit schematic, would it work in real life?
Yes, it will work in real life. Check if the R2R-output of the INA333 really goes down to 0V. If it doesn't then you will probably have to switch from injecting an offset current to generating an offset voltage for the REF-input. Consider adding some EMI filtering at the input of the diff amp, protection (Zener diode, rectifying bridge) at the output of the current sink and bypass capacitors, grounded to IRET and not actual GND.
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
INA333 looks OK and 2.5V common mode voltage with a 5V supply is perfect. I used an AD8422 which also has a R2R output. As expected, the output voltage doesn't really go down to 0V. Because of this I switched from injecting a low scale 40uA offset current to instead biasing the differential amp REF-input with a 0.4V offset voltage. The offset voltage could be generated by dividing down the 4.096V REF-voltage and buffering the 0.4V with an additional low power op amp.

View attachment 346674



Probably because the input of the differential amplifier is not biased correctly yet. The inputs are floating and the bias currents flowing in or out have nowhere to go. Add the 2.5V CM voltage source like I did. If you still experience convergence issues that you can not resolve, test the stages separately.



Yes, it will work in real life. Check if the R2R-output of the INA333 really goes down to 0V. If it doesn't then you will probably have to switch from injecting an offset current to generating an offset voltage for the REF-input. Consider adding some EMI filtering at the input of the diff amp, protection (Zener diode, rectifying bridge) at the output of the current sink and bypass capacitors, grounded to IRET and not actual GND.
Hello, it's me again!

This time my question is about the output of the 0mV input. Since I couldn't find the model for INA333 in Proteus, I decided to use AD623. I added an input EMI filter and placed a few diodes on the output. According to the datasheet, I can operate AD623 with 12V, but for INA333, 5V from VREG of XTR116 is enough(if there is also a problem here , please share with me.). At the output, I get good results when 10-50mV is applied to the input, but when 0V DC is different to the input, the output output goes up to 8mA. What could be the reason for this problem?

AD62312V_50mV.jpg
AD62312V_10mV.jpg

AD62312V_0mV.jpg
 

Thread Starter

Kemaltekbas

Joined Apr 7, 2025
7
Hi all,
I’m new to circuit design and working on a 4-20mA 2-wire loop-powered system to convert a 0-50mV sensor output using the XTR116 (simulated based on the datasheet since I couldn’t find a library). I’m stuck on a couple of issues and need help:

  1. My sensor has a common mode voltage (50% of input). I added a voltage source at the AD623 input to simulate this. For 1-50mV inputs, I get 4.32-20mA output, which is great. But the AD623 output has an offset from the REF pin (tied to my simulated IRET). Oddly, the current through my 25kΩ resistors is always correct (e.g., 160µA at 50mV). Why is this happening?

  1. At 0mV input, the AD623 output doesn’t go to 0V due to the REF pin offset, so I get 7mA instead of 4mA. How can I fix this to ensure 0mV gives 4mA?

Thanks for any help!
AD6235V_1mV_4.32mA.jpg

AD6235V_50mV_20mA.jpg
 

0ri0n

Joined Jan 7, 2025
160
At the output, I get good results when 10-50mV is applied to the input, but when 0V DC is different to the input, the output goes up to 8mA. What could be the reason for this problem?
Take a look at the datasheet, the output of the AD623 does not go down to 0V. With a 10k load it's good for 0.2V, with 100k load it is able to go down to 50mV. This means that the loop current will not start at 4mA. I already showed you one way to circumvent this by injecting an offset voltage into the REF pin of the differential amplifier instead of an 40uA offset current (R6/102.4k) into the input of the XTR116. The 0.8V offset voltage shown below is generated from the 4.096V reference voltage supplied by the XTR116.

XTR116_Preamp_0mV.png

XTR116_Preamp_50mV.png

Vout = Vsensor x Gain + Voffset
Gain = 64
Voffset = 0.8V
Vsensor = 0 ... 50mV
Vout = 0.8V ... 4V

The current into the XTR116, with a 20 kOhm resistor (R2) in series with the input of the XTR116, is Vout / 20 kOhm = 40uA ... 200uA. After 100x amplification inside of the XTR116, the loop current is 4mA ... 20mA:


XTR116_Loop_Current.png
 
Top