Using Arduino for converting 4-20mA input to pulsed relay output

Hi!

I am facing a challenge and would love to get some insights. I have an orifice type (DPT - Differential Pressure Transmitter) gas meter which has a 4-20 mA output which is proportional to the rate of flow of gas. This 4-20 mA output is to be fed into a volume conversion device known as EVC (Electronic Volume Corrector) which expects a pulse input and cooperates with AGA7 (pulse meter flow measurement) i.e. the device registers flow volume based on number of pulses eg: 1 pulse = 1 m3 of gas. The device will totalize the volume and then further convert the volume into respective mass and energy readings.

Can I use an Arduino to convert 4-20 mA to pulse format and output pulses into the EVC ??

Thanks.

Yes, but there are many things that can go wrong.

When you connect a resistor to the 4-20mA, then the Arduino can read the voltage over the resistor. The Arduino GND will be connected to one wire of the gas meter. Is that okay ?
The Arduino can do calculations and generate the right pulses. Do you know what kind of pulses they are (voltage, current, open collector, ttl logic level). When you can use a optocoupler for the pulses, then the Arduino is isolated from the EVC.

Do you have programming experience ? Any programming language is good.

The Arduino is for fast prototyping and to learn programming. The Arduino boards are not for an industrial environment. If you buy a cheap clone, then it might stop working with freezing temperatures.

What is the EVC's expected pulse voltage and width? What is the gas flow rate at 4mA? At 12mA? At 20mA? What is the pulse rate at 4mA? At 20mA? Which Arduino?

In a word yes, it can be done. The specifics are needed as pointed out in the questions above. In a nutshell the Arduino is used as a Voltage to Frequency converter. You run your 4 to 20 mA current loop through a precision resistor of 250 Ohms. Your loop ground and Arduino ground must be a common ground. Now you have a 1 to 5 volt signal proportional to your gas flow rate. That 1 to 5 volts becomes an analog input to your Arduino. Then you can use a map function and map the analog in value to a frequency using the tone function.

Problem is your numbers, as mentioned, need to be known. For example is a symmetrical square wave OK for the pulse out?

Ron_Blain:
You run your 4 to 20 mA current loop through a precision resistor of 250 Ohms.

Close. Use a 47 or 52Ω resistor instead, and do the analog reading using the built-in 1.1V reference. That way your reading will be much more stable as you're independent from whatever the real voltage your 5V supply happens to supply, and variations thereof.

Ya know, from force of habit over many years I still keep forgetting that. :slight_smile: Unlike before retirement where I was always on top of change and better ways I still seem to revert to a decade ago. :slight_smile:

Thanks for sharing yet again.

Ron

Dear JCA34F, Ron and WvMarle,

Thank you for your a support and quick assistance. I get an overall feel of how this can be done. I will check with my team and build further on this. I sincerely thank you for your time. Also I see that additional data is required for more inputs from your side, i shall arrange the same and share shortly.

Regards
Ekaansh

Not discussed is WHO is powering the 20 ma current loop? Is there mains power to the gas meter and it has a DC power supply. Or does your project have to supply the DC and the meter just adjusts a resistor to show the gas usage?
Paul

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.