Arduino controlled current loop (4-20mA) transmitter

Hello dear forum!

I am looking for a way to build an arduino-controllable power supply with adjustable constant current output: Meaning a voltage up to 25 Volt should get adjusted depending on the load to get the desired current flowing.
Also I do not need more than 100mA output.

Everything I am finding is for much more current and the tolerance/error in the mA area is way too much. It would be sad to adjust for 20 mA and get 30 mA because this is .. well 50%.

Thanks in advance!

EDIT: After more measures, searching and reading looks that what I need is a 'current loop transmitter' for 4-20mA

EDIT2 : To clarify more I want to intercept an current loop, log and eventually modify the signal and then transmit it. This question was about the transmitting part, but I am open to suggestions for the receiver too.

Hi,

Are you looking to purchase one or build one?

I am looking to build one.

2 typical 4...20mA current source diagrams enclosed.

One with a rail-rail opamp, one 'old fashioned' discrete version.

Edit
Or ( it's not quite clear from your question) if you want to do things the other way around - ie control the 4-20mA, use smoothed PWM from an arduino to drive the 3rd circuit.

/edit

Allan

20mAd.pdf (18.1 KB)

20masrc.pdf (17.6 KB)

20ma.pdf (16.1 KB)

See edit above

Allan

allanhurst:
2 typical 4...20mA current source diagrams enclosed.

One with a rail-rail opamp, one 'old fashioned' discrete version.

Edit
Or ( it's not quite clear from your question) if you want to do things the other way around - ie control the 4-20mA, use smoothed PWM from an arduino to drive the 3rd circuit.

/edit

Allan

Thanks Allan!

The 'modern' versions are preferable because of the low count of parts :slight_smile:
The loop power supply is 24 Volt, meaning the second circuit will not work?

About the third circuit - I plan to power the arduino from the same power supply for the loop (through some voltage controller of course). Does this make any difference in regards of common ground, noise or something?

I also edited the question to hopefully make it more clear.

1/ The discrete circuit would work fine with 24v. The limitation is mainly power dissipation. Do some sums!

2/ Ditto with the opamp version - you'll need one that'll handle a 24v psu. If not, there are ways round this.

3/ The 3rd circuit is also fine - though would need a r-r opamp, or power the LM324 with say 9v, .

It would require an isolated psu, as you don't know what voltaqe that part of the line will be sitting at compared to the 20mA source. This because there will be a voltage drop in the wiring due to it's resistance.

The original system used the 4mA from the line to power the sensor electronics, which then drew the rest according to the measurement. No other psu was required.A standard arduino takes far more than this - though you could use a pro-mini without it's regulator, power LED etc plus some other circuitry to achieve this.

Ditto for any intercepting measuring device.
If you need to collect data from such a point , some isolated data transferal method is required - eg using a v-f convertor and optoisolator. Look at the LM331.

The whole reason for the 4-20mA system is to take out the effect of resistance in the wiring - which is significant in long runs.

Allan

Thanks again Allan - your posts are very informative and helpful!

Can you please explain a bit more about you point 3 - powering the LM324 with 9V or using r-r opamp? I can't really follow here

The LM324 has an input compliance of Vcc - 1.5v - that is to say it won't work properly with inputs higher than this. If you look at the datasheet it's obvious why - the input stage contains pnp darlingtons.

Also the voltage drop across the sense resistor is 5v at 20mA - and the output of the '324 must pull at least 0.7v above this to drive the transistor. It can't do this with with a 5v supply.

Even a r-r opamp has this limitation , so the circuit as shown won't work.... sorry. Though it would with the suggestions below..
.
So: power the opamp from a rail higher than the maximum input volts + 1.5... I suggested 9v.

As an alternative , reduce the max input voltage to say 2.5 with a resistive divider and halve the 250 ohms sense resistor to 125 ohms. Then you can run it from 5v.

There's a lot of ways to skin a cat!

Allan

I hope I am understanding this right - the Arduino can control the LM324 with its 0-5V output, but for the LM324 I need more voltage - like the suggested 9V ?

Yes.... or reduce the swing required as also suggested.

Allan

Okay, thanks.

One more question - about the 'isolated psu' - I have one 24V power supply - can I somehow 'split' it to power the loop, the LM324 and (maybe through a voltage regulator) the Arduino?

Which bit of the loop? I think i detect an X-Y problem.

The 4-20mA system. You can buy all these bits commercially, but they're not cheap.

There's a current sourcing end ( my diagrams 1 and 2) at a constant voltage ( typically in industry 48V) and a sinking end (diagram 3 - the measuring device - temperature, pressure transducers etc plus signal conditioning electronics which vary the current drawn) connected by a long pair of wires of unknown resistance.

There is only one '0V' point in this whole loop, and that is the 0V of the sourcing end. All other points are at an unknown voltage, depending on the current flowing and the long connecting wire's resistance. Perhaps a km or more in a big plant such as an oil refinery..

So to power it all is tricky.

Add the requirement to make it 'intrinsically safe' ( ie impossible to ignite explosive gas mixture atmospheres even with multiple component failures ) and the designs become complex. Dunnit. You probably don't need this....

As mentioned the classical circuits used the 4-20mA from the current sourcing end ( diags 1/2) to power the sensor electronics ( diag 3 elaborated) , so there was only one psu - at the current sourcing end.

You can buy opto-isolated 4-20mA drivers. AD do them.

What exactly are you trying to do?

Allan

Well I have four sensors which report their reading over current loops to their receivers. I also have a separate power supply of 24V.

My goal was to intercept the signals, log them and transmit them again as needed. Reading and logging looks doable, the problem was how to retransmit the signals.

Kind of 'copy-paste' an electrical current ... never thought it will be so hard :frowning:

Ah.

Why do you need another 4-20mA output?

Why not take the (eg) 1-5V output of the receivers and use that? Or whatever interface the receiver provides.....

How close is the intercept point to the receivers?

Allan

Sorry, my explanations are confusing. I am not a native english speaker. Just wanted to control 4-20mA with the arduino. I'll try your 3-rd circuit.