interface to 4ma to 20 ma current loop

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

interface to 4ma to 20 ma current loop

Post by Ondra »

Good day all. Can someone direct me to a good resource for interfacing and programming to/for a "4ma to 20 ma current loop" using flowcode as the programming language if possible.
Thanks in advance.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Steve001 »

Hello Ondra ,

Are you wishing to measure 4 - 20 Ma or make a 4 - 20 Ma signal ?

to measure 4 - 20 you can use a 250 ohm resistor and measure the voltage across it ,

To generate 4 - 20 Ma you could use an AD5412

Example here ...

http://www.analog.com/static/imported-f ... N-1202.pdf

Steve
Success always occurs in private and failure in full view.

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Kenrix2 »

I am also interested in this. Thank you for the tips Steve001. Perhaps you could comment on the simplified interface drawing in the panel of the attachment since I am new to using 4-20ma. It looks like the tx micro program is doable using the spi component and the rx micro program just uses the ADC component.

Edit: changed drawing
Attachments
four_to_20ma_conceptv2.fcf
(51.06 KiB) Downloaded 365 times
Last edited by Kenrix2 on Tue May 20, 2014 8:56 pm, edited 1 time in total.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Steve001 »

Not got access to pc with flowcode at the moment :(

It is extremely simple and inexpensive to measure 4-20ma with a device that will measure only Voltage. Most A/D boards will accept a 0-5Vdc signal, but may not accept a 4-20ma signal directly.

Ohms law is used to calculate a resistor value in order to convert the 4-20ma to a voltage.

The most popular resistor value for this purpose is 250 Ohms, since it will produce a 1-5Vdc signal when 4-20ma flows through it, and a 0-5Vdc input is very common for most data acquisition systems and other analog measurement devices.

A good reference here :-

http://www.analog.com/en/digital-to-ana ... s/fca.html

Here are a couple of more interesting sources of useful information:

http://en.wikipedia.org/wiki/Current_loop
http://www.murata-ps.com/data/meters/dms-an20.pdf
http://gadgetsinside.wordpress.com/2013 ... ts-basics/

Forgot about this little ic it's a jem

http://www.ti.com/lit/ds/symlink/rcv420.pdf

One more important thing to remember is that the resistor tolerance should be 1% or less; preferrably 0.1%, since errors in the resistance will result in errors in the voltage drop. you don't want a resister that fluctuates much with time or temperature as it will effect the accuracy after you have selected a resistor value you must verify your readings and make any fine tuning adjustments in your software to compensate for any errors in the resistor.

These are the resistors we use at work

http://uk.farnell.com/rhopoint/8g16d-25 ... dp/9622004


Steve
Success always occurs in private and failure in full view.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Steve001 »

some more info here ..

http://www.ti.com/lit/an/sboa053/sboa053.pdf

makes nice bed time reading :lol:

I have used the XTR110 and the RCV420 before very nice ic's and stable too

I can vaguely remember matrix thinking about some 4- 20 e block's what happened to them ??

Steve
Success always occurs in private and failure in full view.

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Kenrix2 »

That is a nice chip combination. After a bit of looking into the XTR series, in place of the XTR110 I am leaning more towards the XTR116. The Vin min. is lower and is also available in a 1.27mm pitch SMT package.

There is a diagram in the data sheet with a micro using PWM thru an RC filter to interface with the XTR series. Attached is a simple program using that concept.
Attachments
PWM_Variable_Voltage.fcf
(54.81 KiB) Downloaded 370 times

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: interface to 4ma to 20 ma current loop

Post by Steve001 »

Hi Kenrix2,

Not to put a dampener on your project. Be careful when using a low voltage for 4 - 20 mA loop a long time ago we had a nightmare with a job that was running a loop of 10 volts , we used the 10 supply because it was available on the plc as a reference voltage and rated at 1.5 amps as current loops are used in electrically "noisey" and industrial environments a good stable supply is required and maybe some ESD protection.

before i get loads of comments about current loops are pure current and the voltage is irrelevant , after lifting the supply voltage to 15 volts the issue got better and then to 24 volts the problems went away all together .

We still to this day don't know why and cannot explain the problems of instability and drifting sometimes disappearing altogether we had or why. nothing changed on the system apart form the voltage.


It's something to be aware of .

Wish you all the best in your project

Regards

Steve
Success always occurs in private and failure in full view.

Post Reply