News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Question on multi 4-20ma outputs

Started by TimB, Aug 08, 2023, 06:55 AM

Previous topic - Next topic

TimB


Hi all

I want to implement 4 x 4-20 ma outputs and have been doing a little reading on the subject.

I have already code to drive some mchip 12bit DACS so can already produce 0-5v.
I'm now looking at the 4-20ma conversion

It turns out its not easy as the 2 wire 4-20ma chips cannot use the common ground as my DAC chip does. It seems you need to have a floating ground. One 4-20ma output will be OK but when you add more you get all kinds of voltage issues.


Now I'm stuck
I could use an opto isolated i2c buffer to talk to the mchip DAC's and have them individually ground referenced and powered by a chip (say the XTR117) that its self is powered of the 4-20ma line

I'm not sure where to go next. Any hints appreciated

Tim

John Lawton

I don't think you have to use a floating ground. Look at alternative devices, such as the XTR110 where a single ended output application circuit is shown on page 6.

XTR110 datasheet

John

TimB

#2
Thanks John

I will try and find an alternative as those ones are expensive >$12.00

The XTR111 looks promising

ken_k

#3
Hi Tim
I'm getting old and think that if someone can blow it up they will. The XR117 looks OK the Reverse Voltage Operation and Over-Voltage Surge Protection on page 6 of the data sheet looks like good advice. The reverse hook-up bridge can be a very small SMD bridge rectifier.
I would recommend a small galvanically isolated DC to DC converter for each channel and have each channel galvanically isolated from the entire planet else someone will find a way to stuff it up.

Ok a quick edit I would use a bidirectional TVS diode on the AC side the bridge to protect the bridge and not fit D1 in the Reverse Voltage Operation and Over-Voltage Surge Protection on page 6 to protect the bridge as well. One could also place a PCB track fuse (no cost) so the TVS diode could not be blown up, a warranty repair would entale fitting an actual fuse link.

Regards
Ken K

okaman

DWIN Sale Manager TURKEY
(info@kamantek.com)
http://www.kamantek.com/shop/index.php

John Lawton

You've missed Tim's wish for a common ground return, so current sensing must be done at a high level, not on the ground side. The TR111 therefore also looks suitable.

TR111

John

Peter Truman

#6
I've just done this very thing

He's my approach (I also needed a 2 wire, common ground)

Used the TI XTR116UAE4

Any value?

TimB

#7
Quote from: Peter Truman on Aug 09, 2023, 02:30 AMI've just done this very thing

He's my approach (I also needed a 2 wire, common ground)

Used the TI XTR116UAE4

Any value?



Thanks

Very handy. What did you use for Q301?

Also if the 4-20ma IO is not connected so the XTR116 is not powered does it have an effect on the part supplying the voltage on Vin + and -

John Lawton

The application circuit shows a series input resistor and is labelled as a current input, so that should protect the source device.

However the XTR115/6 devices doesn't seem to have a common ground as they sense the return current, so not sure they meet your requirements anyway.

TimB

Hi John

The XTR116 seems ok. The common ground issue was with the Pic side to the chip and the 4-20ma devices. The XTR116 is separated from the main boards ground as the inputs are Vin + and -. I can replicate that across the 4 devices and they will each handle 4-20ma inputs with no crossing of "grounds" of each device.

I'm going to say it has 2 wire 4-20ma only.

Let me know if I have it all wrong as I'm winging it.

John Lawton

Not sure I understand what you are saying, but I assume the XTR116 will have a common mode voltage that shouldn't be exceeded, so the 0V return for the 4..20mA side will need to be close to your analogue (PIC) circuitry for it to work properly. I suggest you prototype the circuitry before committing to pcb.

John

Peter Truman

The way this is intended to operate involves a VSD in a pumpshed - colocated with the controller. The VSD has it's 3 phase supply. It also has a low voltage (24vDC) supply built in. What will happen is the 0v side of that supply will be connected in common with the 0v of my controller. So, both 24v supplies 0v are common.

I have the XTR116UAE4 iRet (Pin 3) connected to my local ground (which is also the VSD ground). My 24v supply (which is an independent supply since the 24v from the VSD doesn't have enough grunt to drive the rest of my controller), is connected to the collector of the BJT (MMBTA28-7-F).

The XTR116UAE4 drives the base of the BJT to allow between 4-20ma to flow in the loop according to the voltage (current) applied at pin 2 from my DAC. The VSD has a resistor (internal) that will convert the current in the circuit to a voltage and an ADC that will do the rest.

That's the plan anyway (I spent weeks designing this controller (much more to it than just the 4-20ma loop)

If it's of interest, I had previously done this with the AD694BRZ from Analogue devices - this clearly has a common ground - and I know it works because I have a small drive on the bench currently (excuse the pun) being controlled by this device on the end of the bench for testing.

The best way to think about this is to remember that the device being controlled (VSD in my case) doesn't care what is behind the transistor - only how much current is allowed to flow in the circuit. 

The problem with the AD694BRZ is the cost - Digikey has it for A$41.86 which is silly, especially since the XTR116UA-ND is only A$6.40

I only need the 2 wire current loop since my controller is always colocated with the drive so no risk of any significant  potential difference between grounds and, having an external supply for my controller means I don't have to worry about not having the power I need.

Having said all of that - the XTR116UA-ND circuit is still only on my screen - not in production yet so if anyone with more experience of this stuff has anything to offer, I'm all ears.


ken_k

#12
Quote from: Peter Truman on Aug 10, 2023, 11:57 PMThe way this is intended to operate involves a VSD in a pumpshed - colocated with the controller. The VSD has it's 3 phase supply. It also has a low voltage (24vDC) supply built in. What will happen is the 0v side of that supply will be connected in common with the 0v of my controller. So, both 24v supplies 0v are common.

I have the XTR116UAE4 iRet (Pin 3) connected to my local ground (which is also the VSD ground). My 24v supply (which is an independent supply since the 24v from the VSD doesn't have enough grunt to drive the rest of my controller), is connected to the collector of the BJT (MMBTA28-7-F).

The XTR116UAE4 drives the base of the BJT to allow between 4-20ma to flow in the loop according to the voltage (current) applied at pin 2 from my DAC. The VSD has a resistor (internal) that will convert the current in the circuit to a voltage and an ADC that will do the rest.

That's the plan anyway (I spent weeks designing this controller (much more to it than just the 4-20ma loop)

If it's of interest, I had previously done this with the AD694BRZ from Analogue devices - this clearly has a common ground - and I know it works because I have a small drive on the bench currently (excuse the pun) being controlled by this device on the end of the bench for testing.

The best way to think about this is to remember that the device being controlled (VSD in my case) doesn't care what is behind the transistor - only how much current is allowed to flow in the circuit. 

The problem with the AD694BRZ is the cost - Digikey has it for A$41.86 which is silly, especially since the XTR116UA-ND is only A$6.40

I only need the 2 wire current loop since my controller is always colocated with the drive so no risk of any significant  potential difference between grounds and, having an external supply for my controller means I don't have to worry about not having the power I need.

Having said all of that - the XTR116UA-ND circuit is still only on my screen - not in production yet so if anyone with more experience of this stuff has anything to offer, I'm all ears.


Hi Peter Will the VSD always be located next to the controller? If so many VSD's also have a 0 to 10V control input if so this may be a cheaper satisfactory solution.
It seems many of the 4-20mA chips are a bit expensive. Unfortunately I could not find spice models for the AD694BRZ or the XTR116UA, it beats me why manufacturers don't supply models it would make life much more predictable.

Maybe the XTR111 would work, it is very cheap, I believe Tim was looking at these.
https://www.ti.com/lit/ds/symlink/xtr111.pdf?ts=1691686182681&ref_url=https%253A%252F%252Fwww.google.com%252F

ken_k

I found a home grown spice model on the web and made a simulation, no guarantees to accuracy.
change
XTR111 ken test.txt
to
XTR111 ken test.asc
and run in LTspice.

Peter Truman

Well that looks pretty good. Although without biasing the Vin pin (or possibly the Set pin in this example) the 4ma offset would have to be done in firmware (not a big deal)

Not had time to find the pspice models for the actual parts I'm using but this does appear to demonstrate the point?




ken_k

#15
In LTspice mouse over a component and left click for current.
Hold alt key down mouse over a component for a thermometer symbol for power in watts, mouse over the formula above the trace hold down the Ctrl key and left click for the power, interval and integral.

Off to see Oppenheimer this evening, saw Barbie last night.

Peter Truman

Quote from: ken_k on Aug 11, 2023, 07:40 AMOff to see Oppenheimer this evening, saw Barbie last night.


Got it - thanks. Saw Oppenheimer last week - good movie, quite long, but told the story well. Saw Barbie last night - went out with a dozen friends for tea - One of them is very wealthy and had booked the entire cinema out. There was maybe 75 -80 of us, All in various Barbie related outfits. Proper laugh (and surprisingly good movie that every little girl (and boy) should watch). Don't know why people are getting their knickers in a knot about it.

ken_k

#17
Quote from: Peter Truman on Aug 11, 2023, 11:09 PMAll in various Barbie related outfits
That would have been a sight to see :) I did not go as a "Ken" and my wife would not let me wear pink.  Enjoyed both movies. I see Joe Rogan went to see Barbie.

BTW the integral function in LTspice is great when looking at snubber networks.