View Full Version : 4-20ma Output
04-26-2007, 08:01 AM
Anyone have an easy idea for 4-20ma output.и I have an Lm35 to an A/D converter.
I would like to adjust an pneumatic valve which runs 4-20ma to adjust air pressure
according to the temp read into the stamp.
I could use a D/A converter, but is there an easier way?
04-26-2007, 08:26 AM
The proper way to do this ( to give proper 4-20 mA industrial quality signals) is to use an external voltage to current converter.
и BUT, what has worked for me is this:
иииииииии Put +12 volts on one lead of the valve.и Take other valve lead through a resistor and milliammeter to ground. Measure the current through the valve.
ииииии Now add enough resistance so the maximum valve current is 20 mA.
ииииии Pick a stamp pin. Connect a 470 ohm resistor from the pin, through the resistor to the base of a 2N2222 transistor. Connect valve and resistor as shown in circuit "B".
иии Change the valve current with changes to the PWM command. Its not perfect, but the mechanical inertia will usually give a smooth enough response.
04-27-2007, 12:01 AM
And the next step up would be to include an op amp in a feedback loop to make the output more accurate and to smooth out the PWM before the valve wiring.
The attached circuit is a voltage to current converter. The RC circuit formed by R2*C1 filters the PWM from the Stamp, and R2=100kohm, C1=1uF (or something like that). That also sets the attack and decay time. The current is set by R1, and is Vin/R1. So if you want 20 milliamps for
and 4 milliamps from
That will produce a voltaqe range at the input to the op amp of, 0.8 to 4.0 volts, and R1=200 ohms. The op-amp has to be either a rail to rail type, or, if not, it has to be powered from a voltage of 8 or 9 volts. The transistor could be a either an logic level n-mosfet, or an NPN transistor, like a 2N2222, or I like the zetex super e-line like the ZTX1051. There should also be a catch diode in parallel with the valve.
Post Edited (Tracy Allen) : 4/26/2007 4:07:29 PM GMT
04-27-2007, 10:36 AM
What type of valve is this? Is it like a pressure regulator or variable flow valve ?
Can you tell me make / model / mfg. or post a link ?
You guys are brilliant, I have an immediate application for this.