BS driven 4-to-20 mA current loop
Archiver
Posts: 46,084
Hello!
I've got a stamp controlling a variety of 0-5 VDC input instrumentation, but now
I'm
trying to interface with an instrument (An SCR power controller) that requires a
"4 to
20 mAmp current loop". The instrument's manual does _not_ specify the impedance,
but I have a (kindof) working (but really ugly) pure-analog circuit that I can
take
measurements from.
At 20mAmp, I'm seeing 7.28V. (->346 Ohmish)
At 5mAmp I'm seeing 5.85V (fluctuating by .2V!) (->1170 Ohmish)
So the short version of the question is:
How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+ bits
of precision from a BS2IC?
Long version:
So I thought I'd be safe extending my 0-5 V DC approach:
Stamp-to-DAC-to-OpAmp -> Solid 0-5V DC output.
5V doesn't quite do it for the current loop, so I changed the Op Amp to run off
a
+12V source (V+ off the NX1000, like that board, would like reference to its
schematic for some parts) to produce 0-10V DC... which still didn't do it.
So I've added a MOSFET, also running off of +12V.
Then I moved the MOSFET to +24V off an external regulated transformer.
Now I can step the DAC output up very slowly and watch the current loop.
Around 5.5 V (from the MOSFET) the current jumps from 4.4mA to 19.5mA! 19.5 mA
-> device full-on.
And lowering the voltage back down .1 V or so -> 4.4mA -> device full off.
That's no good! (The entire point is to do, um, somewhat BETTER than ON/OFF
control [noparse];)[/noparse]
So, the simple question is:
How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+ bits
of precision from a BS2IC?
(Preferably using, um, very few pins.)
My DAC(s) have 12-bit accuracy, but willing to try/buy other parts if that is
"better".
Thanks in advance for any comments, critiques, or leads you all can provide.
nevyn@f...
I've got a stamp controlling a variety of 0-5 VDC input instrumentation, but now
I'm
trying to interface with an instrument (An SCR power controller) that requires a
"4 to
20 mAmp current loop". The instrument's manual does _not_ specify the impedance,
but I have a (kindof) working (but really ugly) pure-analog circuit that I can
take
measurements from.
At 20mAmp, I'm seeing 7.28V. (->346 Ohmish)
At 5mAmp I'm seeing 5.85V (fluctuating by .2V!) (->1170 Ohmish)
So the short version of the question is:
How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+ bits
of precision from a BS2IC?
Long version:
So I thought I'd be safe extending my 0-5 V DC approach:
Stamp-to-DAC-to-OpAmp -> Solid 0-5V DC output.
5V doesn't quite do it for the current loop, so I changed the Op Amp to run off
a
+12V source (V+ off the NX1000, like that board, would like reference to its
schematic for some parts) to produce 0-10V DC... which still didn't do it.
So I've added a MOSFET, also running off of +12V.
Then I moved the MOSFET to +24V off an external regulated transformer.
Now I can step the DAC output up very slowly and watch the current loop.
Around 5.5 V (from the MOSFET) the current jumps from 4.4mA to 19.5mA! 19.5 mA
-> device full-on.
And lowering the voltage back down .1 V or so -> 4.4mA -> device full off.
That's no good! (The entire point is to do, um, somewhat BETTER than ON/OFF
control [noparse];)[/noparse]
So, the simple question is:
How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+ bits
of precision from a BS2IC?
(Preferably using, um, very few pins.)
My DAC(s) have 12-bit accuracy, but willing to try/buy other parts if that is
"better".
Thanks in advance for any comments, critiques, or leads you all can provide.
nevyn@f...
Comments
nevyn@f... writes:
So the short version of the question is:
How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+
bits
of precision from a BS2IC?
Go to www.maxim-ic.com
They sell (and will send free samples) of DAC with current outputs.
[noparse][[/noparse]Non-text portions of this message have been removed]
16 ma - 5 volts. The DAC would read the voltage across the resistor. If you
DAC reads 5 volts your software would say, "Yep, that's 20 ma. The current loop
should provide the power and if not a PS would need to be added. That would be
the same as in a 'conventional' current loop.
The other values would be:
Current Output
voltage
0.0040 1.0000
0.0050 1.2500
0.0060 1.5000
0.0070 1.7500
0.0080 2.0000
0.0090 2.2500
0.0100 2.5000
0.0110 2.7500
0.0120 3.0000
0.0130 3.2500
0.0140 3.5000
0.0150 3.7500
0.0160 4.0000
0.0170 4.2500
0.0180 4.5000
0.0190 4.7500
0.0200 5.0000
Leroy
: Hello!
:
: I've got a stamp controlling a variety of 0-5 VDC input instrumentation, but
now I'm
: trying to interface with an instrument (An SCR power controller) that requires
a "4 to
: 20 mAmp current loop". The instrument's manual does _not_ specify the
impedance,
: but I have a (kindof) working (but really ugly) pure-analog circuit that I can
take
: measurements from.
:
: At 20mAmp, I'm seeing 7.28V. (->346 Ohmish)
: At 5mAmp I'm seeing 5.85V (fluctuating by .2V!) (->1170 Ohmish)
:
: So the short version of the question is:
: How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+
bits
: of precision from a BS2IC?
:
: Long version:
: So I thought I'd be safe extending my 0-5 V DC approach:
: Stamp-to-DAC-to-OpAmp -> Solid 0-5V DC output.
:
: 5V doesn't quite do it for the current loop, so I changed the Op Amp to run
off a
: +12V source (V+ off the NX1000, like that board, would like reference to its
: schematic for some parts) to produce 0-10V DC... which still didn't do it.
:
: So I've added a MOSFET, also running off of +12V.
: Then I moved the MOSFET to +24V off an external regulated transformer.
:
: Now I can step the DAC output up very slowly and watch the current loop.
: Around 5.5 V (from the MOSFET) the current jumps from 4.4mA to 19.5mA! 19.5 mA
: -> device full-on.
: And lowering the voltage back down .1 V or so -> 4.4mA -> device full off.
:
: That's no good! (The entire point is to do, um, somewhat BETTER than ON/OFF
: control [noparse];)[/noparse]
:
: So, the simple question is:
: How can I most simply make a _regulated_ 4-to-20 mAmp current loop with 12+
bits
: of precision from a BS2IC?
: (Preferably using, um, very few pins.)
:
: My DAC(s) have 12-bit accuracy, but willing to try/buy other parts if that is
"better".
:
: Thanks in advance for any comments, critiques, or leads you all can provide.
:
: nevyn@f...
:
:
:
: To UNSUBSCRIBE, just send mail to:
: basicstamps-unsubscribe@yahoogroups.com
: from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
:
:
: Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
:
:
:
I think he needs to make 4-20, not read it.
the remote device is using the resitor to parse the 4-20 into some
voltage on the remote, so he needs to create a 4-20 output from the
stamp. (or pull the resistor off the remote board)
the simple pwm output to an op-amp set for current output will go a
long way, but will have errors from op-amp temperaturs fluctuaionts.
Heck, I even have problems spelling temperature fluctuations !
if it's feedback PID loop stuff, those kinda go away as the process
dictates output in real time.
what we don't know is if the remote unit is a 2 wire and gets it's
power off the current output ? as they say, that changes everything.
Dave
> Hi Leroy,
>
> I think he needs to make 4-20, not read it.
>
>
> if it's feedback PID loop stuff, those kinda go away as the process
> dictates output in real time.
>
> what we don't know is if the remote unit is a 2 wire and gets it's
> power off the current output ? as they say, that changes everything.
>
> Dave
Yes.
The instrument has only two pins for the signal to connect to, and I can "run"
the
control signal part with main power to the device off. (There's an LED that
flashes on
the instrument at a rate proportional to the 4-20mA signal with nothing but the
control signal hooked up)
I expected the "just scale your V signal so it goes from 4-to-20 A" to work
also.
Going all the way up to an active control loop seems massive overkill (unless
there's
some sneaky way to do this in analog circuitry, at which I'm _very_ bad [noparse];)[/noparse]
I checked Maxim's site as smartdim suggested. The "Max543" would seem to be just
what I requested: Serial, single, 12bit DAC with a _current_ output. But looking
at the
functional diagram they provide, it seems to just be a std DAC with an extra
resistor
thrown in to do exactly what we're talking about here!
I'm not expecting to need to change output fast - I'm picturing it tracking a
physical
knob. But if the "knob's" at 7mA, I need to be sure I've got (close to) 7mA...
and it
seems like the resistance on the far end fluctuates too much for a simple
resistor to
do the job.
At 20mAmp, I'm seeing 7.28V. (->346 Ohmish)
At 5mAmp I'm seeing 5.85V (fluctuating by .2V!) (->1170 Ohmish)
The odd thing about this is I've done quite a bit of Googling and results have
been a
lot slimmer/less useful than I would expect. There's only a couple of std analog
signaling methods for instruments (0-5V DC, 0-12DC, 4-to-20mA, 0-to 20mA and
some varients) -> I'd expect this to be a _very_ common problem. Or, at least,
an
issue that has a very common _solution_.
nevyn@f...
http://www.elecdesign.com/Files/29/2985/Figure_02.gif
[noparse][[/noparse]Non-text portions of this message have been removed]
converter that I have used for quite a few applications, with an
app-note.
http://www.emesys.com/pdfs/VICO-ops.pdf
The unit as shown is a 0 to 20 milliamp transmitter, but if you use
it with a BASIC Stamp and a 12 bit DAC, then you would start the
input voltage at a level that gives 4 milliamps output and scale your
signal into the remaining 4/5 of the dynamic range. Also, for your
purpose, you would need to run the op-amps on a ~12 volt power
supply. (Contact me off list if you need a circuit board or an
assembled module.)
The Stamp itself cannot be loop-powered, because it requires more
than 4 milliamps for its own operation. Circuits that require less
than 4 milliamps for their own operation can often be powered by the
loop with no additional power supply.
-- regards,
Tracy Allen
http://www.emesystems.com
>--- In basicstamps@yahoogroups.com, "Dave Mucha" <davemucha@j...> wrote:
>> Hi Leroy,
>>
>> I think he needs to make 4-20, not read it.
>>
>>
>> if it's feedback PID loop stuff, those kinda go away as the process
>> dictates output in real time.
>>
>> what we don't know is if the remote unit is a 2 wire and gets it's
>> power off the current output ? as they say, that changes everything.
>>
>> Dave
>
>Yes.
>The instrument has only two pins for the signal to connect to, and I
>can "run" the
>control signal part with main power to the device off. (There's an
>LED that flashes on
>the instrument at a rate proportional to the 4-20mA signal with
>nothing but the
>control signal hooked up)
>
>I expected the "just scale your V signal so it goes from 4-to-20 A"
>to work also.
>Going all the way up to an active control loop seems massive
>overkill (unless there's
>some sneaky way to do this in analog circuitry, at which I'm _very_ bad [noparse];)[/noparse]
>
>I checked Maxim's site as smartdim suggested. The "Max543" would
>seem to be just
>what I requested: Serial, single, 12bit DAC with a _current_ output.
>But looking at the
>functional diagram they provide, it seems to just be a std DAC with
>an extra resistor
>thrown in to do exactly what we're talking about here!
>
>I'm not expecting to need to change output fast - I'm picturing it
>tracking a physical
>knob. But if the "knob's" at 7mA, I need to be sure I've got (close
>to) 7mA... and it
>seems like the resistance on the far end fluctuates too much for a
>simple resistor to
>do the job.
>
>At 20mAmp, I'm seeing 7.28V. (->346 Ohmish)
>At 5mAmp I'm seeing 5.85V (fluctuating by .2V!) (->1170 Ohmish)
>
>The odd thing about this is I've done quite a bit of Googling and
>results have been a
>lot slimmer/less useful than I would expect. There's only a couple
>of std analog
>signaling methods for instruments (0-5V DC, 0-12DC, 4-to-20mA, 0-to 20mA and
>some varients) -> I'd expect this to be a _very_ common problem. Or,
>at least, an
>issue that has a very common _solution_.
>
>nevyn@f...
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
is that it was used for 110 to 300 baud communication
with 232-type NRZ modulation, to talk long distances --
we're talking miles here.
Current was used instead of voltage, because with a
current loop you would definitely get 4 mA or 20 mA
through the entire loop. A voltage signal would
drop over distance.
Make sure you're using the right standard -- the
message I'm replying to seems to have it right.
--- In basicstamps@yahoogroups.com, smartdim@a... wrote:
> Home brew 4 to 20 ma voltage to current converter
>
> http://www.elecdesign.com/Files/29/2985/Figure_02.gif
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
wrote:
> My understanding of the "20 mA current loop" standard
> is that it was used for 110 to 300 baud communication
> with 232-type NRZ modulation, to talk long distances --
> we're talking miles here.
>
> Current was used instead of voltage, because with a
> current loop you would definitely get 4 mA or 20 mA
> through the entire loop. A voltage signal would
> drop over distance.
>
> Make sure you're using the right standard -- the
> message I'm replying to seems to have it right.
wow, I thought it was the reduced power version of the 10-50mA
insturmentation signal loop. all analogue as the signal did not
degrade over distance and was not effected by the stray voltages in
the plant or across the refinery. The low current offered a reduced
spark risk over a voltage signal.
I think it might be save to assume that today, a 4-20mA is an
anlalogue signal line that can be a voltage signal with the addition
of one resistor. said resistor usually resides on the receiving
instrument's board.
Dave
I do not know the very original question and I agree totally re 10-50 & 4-20
for Analogue.
But there was a time before RS-422/485 etc. when 0-20mA was used digitally
as a noise immune version of RS-232. I used it and very successfully
world-wide in the harshest of environments.
David
www.rhombus-tek.com
Original Message
From: Dave Mucha <davemucha@j...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, August 24, 2003 7:54 AM
Subject: [noparse][[/noparse]basicstamps] Re: BS driven 4-to-20 mA current loop
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > My understanding of the "20 mA current loop" standard
> > is that it was used for 110 to 300 baud communication
> > with 232-type NRZ modulation, to talk long distances --
> > we're talking miles here.
> >
> > Current was used instead of voltage, because with a
> > current loop you would definitely get 4 mA or 20 mA
> > through the entire loop. A voltage signal would
> > drop over distance.
> >
> > Make sure you're using the right standard -- the
> > message I'm replying to seems to have it right.
>
>
> wow, I thought it was the reduced power version of the 10-50mA
> insturmentation signal loop. all analogue as the signal did not
> degrade over distance and was not effected by the stray voltages in
> the plant or across the refinery. The low current offered a reduced
> spark risk over a voltage signal.
>
> I think it might be save to assume that today, a 4-20mA is an
> anlalogue signal line that can be a voltage signal with the addition
> of one resistor. said resistor usually resides on the receiving
> instrument's board.
>
> Dave
>
>
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
I've got this working, (from around post 35000) and just wanted to report what I
did
back to the group.
First, the device I'm controlling isn't expecting a digital signal, but an
analog 4-20
mAmp signal where 4mA = full-off, 20mA = full-on, and 12mA = half-on. (Scaled
linearly for points inbetween)
I used smartdim's reference to the schematic below. I had some trouble finding a
"SK100" transistor, but a Fairchild PN2907A works for me. P2=281 Ohm, P1=5.29-
wiper-4.25, and "V+" is around 13.1VDC.
Oh, and a LM358 dual op-amp.
I can't get above 19.5 mA, (probably due to the lowish V+, or a bad choice of
transistor), but I'm pretty satisfied with the range, precision, and
current-stability I've
got. (Especially given that the impedance of the device I'm controlling appears
to
fluctuate pretty wildly from 300 Ohm to 1200 Ohm at 60Hz).
Thanks again for the prompt and correct answers, as well as the comments that
focused the question.
--- In basicstamps@yahoogroups.com, smartdim@a... wrote:
> Home brew 4 to 20 ma voltage to current converter
>
http://www.elecdesign.com/Files/29/2985/Figure_02.gif
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
> (Belated) thanks all.
>
> I've got this working, (from around post 35000) and just wanted to
report what I did
> back to the group.
>
> First, the device I'm controlling isn't expecting a digital signal,
but an analog 4-20
> mAmp signal where 4mA = full-off, 20mA = full-on, and 12mA = half-
on. (Scaled
> linearly for points inbetween)
>
> I used smartdim's reference to the schematic below. I had some
trouble finding a
> "SK100" transistor, but a Fairchild PN2907A works for me. P2=281
Ohm, P1=5.29-
> wiper-4.25, and "V+" is around 13.1VDC.
>
> Oh, and a LM358 dual op-amp.
>
> I can't get above 19.5 mA, (probably due to the lowish V+, or a bad
choice of
> transistor), but I'm pretty satisfied with the range, precision,
and current-stability I've
> got. (Especially given that the impedance of the device I'm
controlling appears to
> fluctuate pretty wildly from 300 Ohm to 1200 Ohm at 60Hz).
>
> Thanks again for the prompt and correct answers, as well as the
comments that
> focused the question.
Thanks for the up-date.
regarding the 19.5mA, what is the voltage on the circuit ?
Also, since the notes said the circuit can reach 500 watts, I assume
that either the SK100 is one heck of a transistor, or they are using
additional parts.
Dave
>
>
> --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
> > Home brew 4 to 20 ma voltage to current converter
> >
> http://www.elecdesign.com/Files/29/2985/Figure_02.gif
> >
> >
> > [noparse][[/noparse]Non-text portions of this message have been removed]
> > http://www.elecdesign.com/Files/29/2985/Figure_02.gif
depends on a well-regulated V+ supply, because it is the reference
for both the 4ma offset and the 4--20 scale.
Dave, it says 500W for the resistor, but I think it should really say
500 ohms. Sometimes graphic programs have trouble converting the
ohms symbol (‡<--this is ohms as I type it) and come up with W
instead.
20ma through 500 ohms will drop 10 volts (0.2 watt), and the 100 ohm
resistor P2 will drop 2 volts. With a 15.0 volt supply, that leaves
3 volts across the transistor for it to do its thing. With a 12 volt
supply, that margin would taper off and the output not get all the
way up to 20 ma.
If resistor P2 is 281 ohms instead of 100 ohms, then at 20 ma it
drops 5.62 volts, and, allowing 2 volts across the transistor to do
its thing, that leaves 4.38 volts of compliance for the load, which
would allow a load resistor of up to 219 ohms, to take the full 20 ma.
The circuit would work also with a darlington or superbeta transistor
or a p-channel mosfet at the output. For less base current error.
-- Tracy
>--- In basicstamps@yahoogroups.com, "clnevyn" <nevyn@f...> wrote:
>> (Belated) thanks all.
>>
>> I've got this working, (from around post 35000) and just wanted to
>report what I did
>> back to the group.
>>
>> First, the device I'm controlling isn't expecting a digital signal,
>but an analog 4-20
>> mAmp signal where 4mA = full-off, 20mA = full-on, and 12mA = half-
>on. (Scaled
>> linearly for points inbetween)
>>
>> I used smartdim's reference to the schematic below. I had some
>trouble finding a
>> "SK100" transistor, but a Fairchild PN2907A works for me. P2=281
>Ohm, P1=5.29-
>> wiper-4.25, and "V+" is around 13.1VDC.
>>
>> Oh, and a LM358 dual op-amp.
>>
>> I can't get above 19.5 mA, (probably due to the lowish V+, or a bad
>choice of
>> transistor), but I'm pretty satisfied with the range, precision,
>and current-stability I've
>> got. (Especially given that the impedance of the device I'm
>controlling appears to
>> fluctuate pretty wildly from 300 Ohm to 1200 Ohm at 60Hz).
>>
>> Thanks again for the prompt and correct answers, as well as the
>comments that
>> focused the question.
>
>
>Thanks for the up-date.
>
>regarding the 19.5mA, what is the voltage on the circuit ?
>
>Also, since the notes said the circuit can reach 500 watts, I assume
>that either the SK100 is one heck of a transistor, or they are using
>additional parts.
>
>
>Dave
>
>
>>
>>
>> --- In basicstamps@yahoogroups.com, smartdim@a... wrote:
>> > Home brew 4 to 20 ma voltage to current converter
>> >
>
> > http://www.elecdesign.com/Files/29/2985/Figure_02.gif
> > >
>> >
>> > [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the
>Subject and Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> Note that the circuit
> > > http://www.elecdesign.com/Files/29/2985/Figure_02.gif
> depends on a well-regulated V+ supply, because it is the reference
> for both the 4ma offset and the 4--20 scale.
>
> Dave, it says 500W for the resistor, but I think it should really
say
> 500 ohms. Sometimes graphic programs have trouble converting the
> ohms symbol (‡<--this is ohms as I type it) and come up with W
> instead.
Thanks, that clear that up for me. Devil is in the details.....
http://www.elecdesign.com/Files/29/2985/Figure_02.gif
This was the link he offered, and it is a pretty simple 500W,
although I cannot figure who would want an output signal to drive
such a load. In re-reading it does make sense that the load is 500
ohms.
Dave
(thinking of re-checking the Tesla coil circuit, the neighbors cat
looks like a cotton ball.....)
> http://www.elecdesign.com/Files/29/2985/Figure_02.gif
>
> This was the link he offered, and it is a pretty simple 500W,
> although I cannot figure who would want an output
> signal to drive such a load. In re-reading it does make
> sense that the load is 500 ohms.
This figure:
http://www.elecdesign.com/Files/29/2985/Figure_02.gif
comes with this article:
http://www.elecdesign.com/Articles/Index.cfm?ArticleID=2985
which explains the circuit & how to choose resistors etc. for it.
My actual "Load" fluctuates from 300 to 1100 Ohms, so I'd have
to say it can't mean "500 Ohms" either really. (Unless my resistor
choices are too far from std)
Neither the voltage regulator nor the "SK100" replacement
get warm (at 13V), so perhaps I've got a better transistor.