Go Down

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

mwahlgreen

Okay

I have read this post like 10 times, and I don't see the solution for this problem anywhere specific, everybody comes up with about 2-3 solutions, but the author (as always on a forum) never gives the thumps up for what he/she did, that actually works.

So please dear author of this post, please elaborate, what did you end up doing, that made it work for you?

I might also be the stupid guy for asking, but I'm really missing the point here, as I don't see how I implement a working solution, as much in the thread seems to be done by guessing and not actual testing. (No working sketch/schematic/pictures)

I have read my way around the 4-20mA sensor loop (both 2- and 3-way loops) and I know it is complicated, however I just need something that works for a prototype of mine, the real pain in the ass of my project is not suppose to be how to send four milliamps or 20mA on a sensor line, but how to make/read the sensor data in the first place from my own home build liquid level sensor.

mwahlgreen

#31
Jun 11, 2014, 02:56 pm Last Edit: Jun 11, 2014, 04:02 pm by mwahlgreen Reason: 1
Like seconds after my reply I did find something that might become my solution:

The XTR110 from TI together with a precision 250 Ohm resistor, PNP transistor, and a secondary power supply.
See the datasheet of the XTR110 for an application note.

This will make a 15-30V 3 wire 4-20mA sensor.

Again I'm only doing a prototype and don't care at first about power supply.

lemming

#32
Jul 14, 2014, 01:18 am Last Edit: Jul 14, 2014, 01:24 am by lemming Reason: 1
Accidently revisited this thread and saw thats its still alive.


but the author (as always on a forum) never gives the thumps up for what he/she did, that actually works.


I put it in the too hard basket and delayed the project, but I am now looking to revive it.
I have done a lot of Googling since and am leaning towards a simple  op-amp/transistor setup. Like the diagram below, but using an analogue pin and smoothing cap instead of the zenner to provide the input voltage.

I will prototype it in the coming days and  will make up my mind then.

ranjithraptor

I use same type (4 -20 ma) ultrasonic sensor,simply connect the sensor output series to a 250 ohm resistor and the output to micro-controller directly...why 250 ohm? because

4 ma x 250 ohm =1 v
20 ma x 250 ohm =5v
so u get a 0 to 5 volt analog signal to your controller,but make sure that both the sensor and the controller has common power supply ie powering 24 volt and 5 volt s derived from a single power source,thats what i do and i works for me.hope it helps

lemming

I think you misunderstand what I was getting at.
I don't want to to accept a 4-20ma input from a 4-20ms sensor into the arduino.
I want to use the arduino to simulate a 4-20ma sensor. e.g.

- Connect a microphone to the arduino and output a 4-20 output according to the volume.
or
- Connect a colour sensor to the arduino and output a 4-20 output according to the proportion of red light.

TomasD

I found this description that may help.
 
"Voltage To Current Converter Circuit , Lakehead University, Chemical Engineering

The Voltage to Current converter circuit is designed to interface the 0 - 5Volt output of the
Matheson Model 8143 Mass Flow meter to the 4-20mA current loop input of the Bailey Freelance DCS.
The circuit consists primarily of the Burr - Brown XTR110 Voltage to Current converter chip. This chip
can take multiple ranges of voltage input and will give a linear and proportional current output of various
ranges. The configuration of the chip determines the input and output ranges. The following schematic
shows the connections required to have a 0-5V input and give the proportional 4-20mA output current.
The output from the XTR110 are source and gate voltages for a P-channel MOSFET or can be substituted
with the capacitor C2 and the PNP 2N3906 bipolar transistor. The chip allows for callibration via the zero
and span adjust potentiometers R1 and R2.
The remainder of the circuit is a 24Vdc power supply required to drive the XTR110.

http://electricallabs.lakeheadu.ca/projects/others/projects/v2c.pdf


cjdelphi

4 to 20ma range.

0  - 5v can be a low pass filter.

BeArd

Hi! does anyone solved the problem 0-5v --> 0-20mA? (control SSR Relay)

BeArd

I found VMA420 board, it seems, that it's what I need, but it's rather expensive.
http://www.eidusa.com/Interface_Boards_4_20.htm

Quote
This board offers effective, state-of-the-art, reliable linear control of HVAC 4-20mA dampers and valves.

 

The CONVERTER-VMA420 voltage to current converter is a signal control (Proportional) 4-20 mA voltage to current transducer board for HVAC (Heating, Ventilation and Air Conditioning), electro-hydraulic and servo electronics; actuator, dampers, bleed pilot valve, globe valves, butterfly valves, plug valves, dampers and more.

 

The CONVERTER-VMA420 board is designed to perform voltage to current conversion (transducer). If used properly, it will eliminate the need for an expensive board, which would otherwise be needed to carry out the same tasks.   


 

The CONVERTER-VMA420  is easy to install, setup, and operate. If you want to do professional remote voltage measurement related functions, The CONVERTER-VMA420 offers the features you need. It can be mounted easily via two 0.125" mounting holes using 4-40 screws.

 

Simply connect the board to 24VDC or 24VAC connect your voltage source 0-10V to the input and our board will convert it to 0-20mA. For input voltage 2-10V the output current is 4-20mA.

 

 

 The CONVERTER - VMA420 transducer board is an accurate, linear, and an efficient way to convert industrial standards voltage (input DC voltage models) 0 to 10V, 2 to 10V, 0mV to 1.2V, 66mV to 1.2V,  0mV to 2V, 400mV to 2V,0-5V, 1 to 5V, 0-15V, 3 to 15V, 0-24V, 4.8 to 24V into industrial standards (output current float on 16-20V DC) current 0 to 20mA, 4 to 20mA signals.... See below table "voltage to current industrial standard configuration models".

Paulcet

BeArd: I sense an XY problem here. 

What are you controlling with the SSR?  If you don't absolutely need phase angle control, you probably don't need a 0-20ma input SSR.

BeArd

I'm controlling heater. I understand, that I can simply take 60sec and turn it on 3-10-50sec, but that is not so good move, because when heater is fully on, it give too much heat, so the product burns.

I'm not good electronic, and don't understand fully "phase angle control". I just need to make heater work not on full power (some time 10%, 30%,..100%)

Paulcet

Ok, here are your options:

-Buy or make a PWM to 4-20mA converter.  I am not sure if there are any commercially available ones, and the price may be the same as the VMA420.
-Use the VMA420 and feed it with a filtered output from your arduino. 
-Use a short time-base PWM to drive a simple zero-crossing SSR.  (I say short because you mentioned up to 50 seconds.  This is quite long in terms of heating control, and a virtual eternity in terms of microcontrolers.)

The last one is what I would do for a heating process.  If 3 seconds on will burn the product, it is no problem to turn on the SSR for a fraction of a second.  In fact, I would set the time base at 3 seconds!

raschemmel

#43
Feb 23, 2015, 04:28 pm Last Edit: Feb 23, 2015, 06:16 pm by raschemmel
Quote
I have read this post like 10 times,
You must have a lot of free time ...(I'm still on my first read... :D )

This is a fascinating post. I had no idea a 4-20 mA current loop was that complicated.  I've never tried to
create one before. Maybe I'll give it a shot now...

I found this.


FYI,
(The OP is lemming)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

polymorph

Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Go Up