4-20ma output from Arduino

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.

Here a little reading on this http://www.bapihvac.com/CatalogPDFs/I_App_Notes/Understanding_Current_Loops.pdf

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

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.

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

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