Go Down

Topic: 4-20ma output from Arduino (Read 10208 times) previous topic - next topic

lemming

I want to make my arduino mimic an industry standard 4-20ma sensor.

I understand that the load that it will drive (PLC, VSD, etc) are usually around 100 ohms.

Has anyone got any ideas on the circuit that would be required to do this?

winner10920

Are you talking about an analog or digital sensor? If its digital (on or off) than a simple npn transistor will do the job(or better yet optoisolator)
analog would be a little trickier but still doable

lemming

I'm talking analogue; e.g. pressure, water level, etc.

winner10920

You could use a pwm pin and a lowpass filter to drive a transistor, hardest part will be finding the right combination of base resistor and cap to give a sufficiently smooth yet responsive result, perhaps the best way would be a separate lowpass into an opamp as a buffer before the transistor to separate the base resistor from your lowpass filter
you may find you need to use a potentiometer to limit the base current as the hfe of a transistor can vary alot under various conditions and you may need to tune it to get your needed limits

retrolefty

#4
Nov 26, 2012, 02:34 am Last Edit: Nov 26, 2012, 02:46 am by retrolefty Reason: 1
Emulating a 4-20ma current loop transmitter sensor is a matter of implementing a programmable constant current output. This will cannot be done with a single transistor as it involves having and using a feedback reading of the actual loop current to set and control the loop current to the desired measurement output value desired based on the sensors primary measurement. There are special industrial ICs that help perform this function. Also the source of the 'loop voltage' used to generate the loop current will need to be defined as if at the transmitting end (emulating a 4 wire transmitter with active output) or from the receiving end (emulating a 2 wire transmitter, with passive output).

Lefty  

dhenry

If you are sensing a current loop transmission, you can use a resistor;

If you are sending a current loop transmission, you can use a current generator. You can build one from an opamp + transistor, or with just four transistors + some resistors. Either way, it is fairly simple.

be80be

#6
Nov 26, 2012, 02:46 am Last Edit: Nov 26, 2012, 02:50 am by be80be Reason: 1
Here a little reading on this http://www.bapihvac.com/CatalogPDFs/I_App_Notes/Understanding_Current_Loops.pdf

Quote
The transmitter is the heart of the 4-20 mA signaling system. It converts a physical property such
as temperature, humidity or pressure into an electrical signal. This electrical signal is a current
proportional to the temperature, humidity or pressure being measured. In a 4-20 mA loop, 4 mA
represents the low end of the measurement range and 20 mA represents the high end.
BAPI specifies the power to our current transmitters as a range, 15 to 24 VDC for a humidity
transmitter or 7 to 40 VDC for a T1K temperature transmitter. The lower voltage is the minimum
voltage necessary to guarantee proper transmitter operation. The higher voltage is the maximum
voltage the transmitter can withstand and operate to its stated specifications

retrolefty


If you are sensing a current loop transmission, you can use a resistor;

If you are sending a current loop transmission, you can use a current generator. You can build one from an opamp + transistor, or with just four transistors + some resistors. Either way, it is fairly simple.



I would dispute that assertion, especially for a passive 2 wire transmitter, as the power to actually operate the sensors electronics has to also be derived from the energy available from less then 4 ma zero measurement value. That is, with the loop set to 4 ma when a sensor needs to signal that it's measuring 0% of operating measurement range, then the power to operate that sensor at that time comes from where? There is no other independent voltage/power source out there at the end of a 2 wire 4-20ma  sensor transmitter. Loop powered 2 wire sensor transmitters are very challenging to design and construct.

Lefty

winner10920

Now im assuming an arduino is involved from the title so I would think its not the general scheme of things,
What exactly are you trying to emulate or achieve and in what enviroment? If you need to do like the industrial standard(which I don't know too well) it would seem there are quite a few restrictions, tho if its going to act like a regular 3 wire sensor it'll be alot easier

be80be

It don't look like any one reads any thing that's posted and start dumping out Idea's

First this is a loop you power this on the high side with power able to output more then 20mA at 24 volts the transmitter reads say a temp of 10 C and that means it needs to lower the low side to 5mA then the receiver which is a 250 ohm resistor Is read and show 5 mA the uC then tells you the reading is how these work. 

lemming


What exactly are you trying to emulate or achieve and in what enviroment?


It probably doesn't matter what I'm trying to measure as long as I can output the industry standard 4-20ma.
There are a few scenarios which I would like to use it for, however the one at hand is for pressure measurement as previously stated, into the aforementioned VSD (or VFD as some call them).

Its starting to sound like the complexity of the circuit may be a bit beyond me, but I may play around with this setup:

The base of a transistor connected (through a resistor) to a PWM pin of the Arduino. A resistor in the circuit collector->load(vsd)->power-> emitter to measure the current flowing through the load. The voltage across this resistor is fed into an analogue input of the Arduino so that it can read the current flowing through the load and regulate the voltage going out the PWM pin and into the base of the transistor; thereby completing the feedback loop.

This may be a bit simplistic but I will see how it goes. Any views on improvement?


dhenry

The typical implementation is a current mirror + a current amplifier: the input voltage is used to generate a current into one leg of the mirror, and the current amplifier amplifies the mirrored current in another leg. It can be either a current source or a current sink (less common). Fairly simple.

A opamp - based solution would be a simple opamp buffered by a current amplifier, typically as a current sink.

winner10920

So you are talking about a three wire or two wire sensor? Id assume three to keep it simple?

retrolefty


So you are talking about a three wire or two wire sensor? Id assume three to keep it simple?


That is the thing. The OP stated he would like to have the arduino send a 4-20ma measurement signal to a PLC like system. The majority of PLC interface via two terminals to the remote 2 wire transmitter and the loop voltage is coming from one of the two 'field terminals' of the PLC. So my contention is that it will be a difficult interface circuit to design. If however the PLC is supplying just a passive 250 ohm ground based resistor to the 2 field wires then it would be somewhat easier but still not simple.

I've noticed that no one has supplied an example circuit for a arduino to PLC current loop interface, so that would back my opinion that is not as simple a task that a few have stated it is.

Lefty

be80be

Here look like a workable idea

Go Up