4-20ma output from Arduino

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

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.

winner10920:
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?

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.

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

winner10920:
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

Here look like a workable idea

Almost there.

  1. Don't ground the inverting input.
  2. Take the output on the drain. Ground the current programming resistor.
  3. For fast opamp + high power mosfet (or bjt), put a small resistor on the opamp's output pin to dampen the capacitive loading.

This is a current sink. Use a current mirror to turn it to a current source.

The work been done and ready to run .

4to20.PNG

If you are happy with a current sink, the left half of the circuit will do - I would add a resistor to the bjt's base though. You can implement an open circuit detection similarly.

The output current is programmed by that resistor on the emitter.

The opamp approach is its (seeming) simplicity.

The current mirror approach appeals to me as it allows for flexibility.

dHenry How does a current mirror work in this application is it not inverting current amplifier.

Where as the 4 to 20 mA is more for a data transmitting based on how much current the receiver reads.

For a voltage input, you will need to convert that into a current output, mirrored to the other leg of a current mirror (typically a widlar current mirror).

Let's say that the voltage signal is referenced to ground. You use 3 npn to form a widlar current mirror. On the output leg, it funds as a current sink, and its current sink is regardless of the load / voltage on that leg (within certain limitations).

But most people would not just use that. The output is typically buffered by a current amplifier - in this case a pnp. The resistor on the pnp's emitter determines the delta V / delta I relationship for the current output.

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?

How about using a digital potentiometer? Digital Potentiometers (DigiPOT) | Analog Devices

Lots to choose from. Only thing to worry about is ground isolation. A 4-20 current loop is typically isolated from everything (ESPECIALLY earth ground).

Again I'll say having an arduino generate a sensor output and wiring to an existing loop powered 4-20ma current loop is not a trivial task, but of course can be done. There are industrial IC that handle just such an application. The following one has decent 'block diagrams' and practical applications showing the details of how it can be accomplished:

Lefty

retrolefty the diagram I posted on the first page is basically the same thing you posted just it's not a one chip package. It's from TI appnote.

The this is not that hard of a deal 4 mA is the low 20 is the high you can send t data stream out like that that's easy to read. This was used back before rs232 to send data the first IBM pc had 4 to 20 on the card that had the com port on it and people rented phone lines to send data over the copper wire this way.

MIDI is a digital forum of this

be80be:
retrolefty the diagram I posted on the first page is basically the same thing you posted just it's not a one chip package. It's from TI appnote.

The this is not that hard of a deal 4 mA is the low 20 is the high you can send t data stream out like that that's easy to read. This was used back before rs232 to send data the first IBM pc had 4 to 20 on the card that had the com port on it and people rented phone lines to send data over the copper wire this way.

MIDI is a digital forum of this

I think you are terrible confused or mistaken about the industrial standard 4-20ma current loop. It's not a digital transport link using just 4ma or just 20 ma as it's two signalling levels. Rather it's a true continuous analog measurement link where a 4ma state means the measurement is at 0% value of the measurement range, 12ma is 50% value and 20ma is the 100% range value. The actual current flowing in the loop can be at any value between 4 to 20ma at any given time depending on what the sensor measurement is.

You are confusing that with the old teletype serial communications standard that used a 0 and 20ma DC current loop to send digital serial data. That is a totally different animal that has no connection to the analog 4-20ma current loop standard used in the process control industry.

Lefty

I no how it works Have you ever used one I worked where this was used to control mixing valves read fluid temperature sensors

Analog current loops are used where a device must be monitored or controlled remotely over a pair of conductors. Only one current level can be present at any time.

Given its analog nature, current loops are easier to understand and debug than more complicated digital fieldbuses, requiring only a handheld digital multimeter in most situations. Using fieldbuses and solving related problems usually requires much more education and understanding than required by simple current loop systems.

Additional digital communication to the device can be added to current loop using HART Protocol. Digital process buses such as FOUNDATION Fieldbus and Profibus may replace analog current loops.

be80be:
I no how it works Have you ever used one I worked where this was used to control mixing valves read fluid temperature sensors

Analog current loops are used where a device must be monitored or controlled remotely over a pair of conductors. Only one current level can be present at any time.

Given its analog nature, current loops are easier to understand and debug than more complicated digital fieldbuses, requiring only a handheld digital multimeter in most situations. Using fieldbuses and solving related problems usually requires much more education and understanding than required by simple current loop systems.

Additional digital communication to the device can be added to current loop using HART Protocol. Digital process buses such as FOUNDATION Fieldbus and Profibus may replace analog current loops.

Yes I worked in a oil refinery for 29 years as an instrumentation analyst. We had thousands and thousands of current loops. Most used the true analog 4.-20ma current loops. Some use the Honeywell 'smart meters' in DE mode where they did drive the current loop in true digital serial data mode rather then analog mode. And then there were the Rosemont transmitters (that developed the original HART digital protocol) that could use the current loop as analog but at the same time superimpose a tiny FSK ac signal onto the loop so that digital communications could be had between the remote field transmitting device and the control house controller device while still sending the analog measurement value on the same 4-20ma current loop.

So what was your point about an old IBM PC that could send serial data with 4-20ma current loops. Did you really mean that is the same method this thread has been dealing with?

Lefty

This is my point the Op said he wanted to make a transmitter with the arduino for
"pressure, water level" I was just pointing out that there is more that could be done then read the steps on a resistor purely analogue.