4-20 mA output
Dries
Posts: 23
Hi all,
For industrial invironment I'm looking for an (easy) way to make a stable 4-20 mA output. This output will be connected to the customer's control system. Maximum resistance eg 750 Ohm. I'm using the BS2. Which command do I need and which external circuit to realize ? Galvanic separation required.
Thanks, Dries
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dries Nelemans, Holland
For industrial invironment I'm looking for an (easy) way to make a stable 4-20 mA output. This output will be connected to the customer's control system. Maximum resistance eg 750 Ohm. I'm using the BS2. Which command do I need and which external circuit to realize ? Galvanic separation required.
Thanks, Dries
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dries Nelemans, Holland
Comments
I'm not sure about the galvanic separation part, but attached is a circuit that should convert 1-5V to 4-20mA. The LM358 may be used as single supply.
To generate the voltage to be converted, a DAC may be used, or in the figure a filter is being used to be able to PWM the output. So a PWM value of 5V/255 * 1 = 20 will be around 1V or 4mA, and a value of 255 will be 5V and 20mA. It fairly stable if refreshed once a second or so. The filter is used a is programmable voltage output in the Process Control text from Parallax, though we neglected to put in V/I I/V circuits beneficial to industry.
If you need electrical isolation, a opto-isolator may be used (2N35) on the output of the Stamp into the circuit.
Hope this helps?
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
The maximum is 750 Ohm but actual resistance can vary for each site.
/Dries
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dries Nelemans, Holland
For example, if after the filter you have 1V on (+), the op-amp wants 1V on the (-) terminal.
To achieve that, the voltage drop across the R on (-) much equal 1V.
1V/250 ohms = 4mA.
The load and line resistance has no bearing on the output current.
BUT, the supply voltage will limit how much total current. With a 9V supply, to achieve 20mA, the total loop resistance is limited to:
9V/20mA = 450 Ohms...... OK, I should have worked out the math before hand, we have insufficient voltage to drive the needed current.
Let's see...
If you use a 24V supply on the op-amp, (LM358 can handle up to 32V), the maximum loop resistance is:
24V/20mA = 1200 ohms.
1200 - 250 = 950 ohms.
So, the resistance of the wire + resistance of the load cannot exceed 950 ohms with a 24V supply to the op-amp.
Sorry about that...
-Martin
If this is being used on a customers machine, the safest route is to let the stamp generate an analog voltage with a D/A converter chip ( LTC 1451 is a good choice). Then use a commercial industrial signal conditioner to go from analog voltage to 4 -20 mA.
This will give isolation plus industrial quality signals.
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
The op-amp output will be about 1 - 1.5V less than the supply, reducing that number slightly.
Be careful not to connect anything > 5V to any BASIC Stamp terminal, JUST the op-amp supply and common ground to the BASIC Stamp.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
Here is a link to an industrial module:
www.dataforth.com/catalog/doc_generator.asp?doc_id=1304
To build this sort of thing from scratch, you could use an opto-isolator like to transfer the signal to a circuit like the one shown, and use an islolation power module (such as the ones from TI, ~$5) to supply power to the circuit.
A lot depends on where the power is coming from. The Stamp cannot be loop powered.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
-Phil
Thanks for your input. Generally I see two possibilities. The easiest way is using a commercial available converter 0-5V>0-20mA. I guess that generating a 0-5 V signal will be no problem with the BS2 (?). The other possibility is making my own circuit which is cheaper but takes more time and higher risk to blow up my BS2 .
/Dries
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dries Nelemans, Holland