General Home Automation 4-20mA Application: need some advice, please

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
4-20mA Application: need some advice, please andrea 04-06-07
Posted by on April 6, 2007, 11:23 am
Please log in for more thread options

Hi all,
I need to monitor six 4-20mA sensors at once, with a resolution of 16 bits.
It is half a hobby project and half a favour to my grandfather, although
I'd also like to put it in my curriculum vitae, for further advantage. I
am not an engineer, I am a self-taught programmer, but the more stuff I add
to my resume, the better, ain't it? ;) So, I think it's now time to start:
I'd like to use one single 12V or 24V battery to power all 6 sensors (one
at a time), convert the 4-20mA signal to a voltage, channel it (through a
multiplexer) into an ADC and read and log the data via a microcontroller.

Could you give me some advice if I'm doing right or wrong? And why?

a) For the battery part, I thought about using one or two 12V sealed lead
battery or two PP3 9V lithium 1200mA/H batteries (a friend told me they
exist and look like normal 9V batteries, although they have x 10 mAH!).

b) For the input stages, I'm thinking about using a scheme like this:

Battery +24V or +18V (not yet decided)
|
RES (to limit max current in case of Sensor's short circuit)
|
===Sensor (4-20mA type)
|
MOSFET-- on/off control (would a relay be better? why?)
|
*------*--- to Analog MUX / ADC (Sensor's 0..20mA becomes e.g. 0..5V)
| |
5V Zener RES (to convert current to voltage)
| |
*------*--- ground

I saw the RCV420 by Texas Instruments/Burr Brown, but it costs $22 here
in Italy! And anyway I'm not sure it would really help in my application.

The MOSFET is there to "isolate" every other sensor, so that only one is
getting current at a time. However, I'm not really expert of high-side,
P-Channel MOSFETs and at first I thought about a N-Channel solution, but
on the bottom, between ground and Zener/Resistor. The N-Channel solution
would cause a measuring error though, unless I can take it into account
on the ADC. I think the P-Channel solution may be more "proper" anyway.

The purpose of the bottom Resistor is easy to understand, it will convert
the current into a voltage. The Zener is there to make sure that voltage
doesn't go too much beyond 5V even in case of a Sensor short circuit (the
current will be limited anyway by the top Resistor).

Would a Transil diode instead of the Zener be really useful as protection?
I am thinking about some hundreds of meters of cable which, due to its own
induction, could kick very hard when the MOSFET turns on. Of course, if a
cheaper Zener solution is as good in practice, why waste a Transil there?
A reason may be electrostatic interference or nearby lighting strikes,
would a Transil be a more valid choice than a Zener then (I know that if
the lighting strikes right on the cable, nothing can be saved anyway!).

Now I (think) I could feed directly an ADC input (should I buffer it with
an op-amp? Why? The impedance is already pretty low, and while the ADC
input may draw bias current, I think I can calibrate the whole system at
the digital output, cannot I? Or the ADC input bias current will vary, thus
introducing an error in the measure? I'd like to get near 16bit resolution).

I saw some interesting ADC's from Texas Instruments which contain also an
analog multiplexer. For example the ADS1243 IC, which contains a 8-MUX, a
buffer and even a programmable gain amplifier, and it's even 24 full bits!

Thank you very much for any useful advice,
--
Andrea


Posted by isw on April 7, 2007, 12:41 am
Please log in for more thread options
andrea@NOSPAMPLEASE.com wrote:

> Hi all,
> I need to monitor six 4-20mA sensors at once, with a resolution of 16 bits.
> It is half a hobby project and half a favour to my grandfather, although
> I'd also like to put it in my curriculum vitae, for further advantage. I
> am not an engineer, I am a self-taught programmer, but the more stuff I add
> to my resume, the better, ain't it? ;) So, I think it's now time to start:
> I'd like to use one single 12V or 24V battery to power all 6 sensors (one
> at a time), convert the 4-20mA signal to a voltage, channel it (through a
> multiplexer) into an ADC and read and log the data via a microcontroller.
>
> Could you give me some advice if I'm doing right or wrong? And why?
>
> a) For the battery part, I thought about using one or two 12V sealed lead
> battery or two PP3 9V lithium 1200mA/H batteries (a friend told me they
> exist and look like normal 9V batteries, although they have x 10 mAH!).

Why do you want to use batteries? You have to have a complete loop from
the ADC location to wherever the sensors are anyhow, so just put a small
power supply there. It doesn't even need very good regulation -- the
constant current aspect of the sensors will take care of it.


> b) For the input stages, I'm thinking about using a scheme like this:
>
> Battery +24V or +18V (not yet decided)

Look at the data sheets for the sensors; there'll undoubtedly be a
maximum voltage rating. As long as you don't exceed that, a higher
voltage will allow you to run longer loops or use smaller wire,
whichever is more convenient.

|
> RES (to limit max current in case of Sensor's short circuit)

I'd suggest a fuse instead. You only need one, at the power supply.

> ===Sensor (4-20mA type)
> |
> MOSFET-- on/off control (would a relay be better? why?)
> |
> *------*--- to Analog MUX / ADC (Sensor's 0..20mA becomes e.g. 0..5V)
> | |
> 5V Zener RES (to convert current to voltage)
> | |
> *------*--- ground
>
> I saw the RCV420 by Texas Instruments/Burr Brown, but it costs $22 here
> in Italy! And anyway I'm not sure it would really help in my application.
>
> The MOSFET is there to "isolate" every other sensor, so that only one is
> getting current at a time. However, I'm not really expert of high-side,
> P-Channel MOSFETs and at first I thought about a N-Channel solution, but
> on the bottom, between ground and Zener/Resistor. The N-Channel solution
> would cause a measuring error though, unless I can take it into account
> on the ADC. I think the P-Channel solution may be more "proper" anyway.

A set of small relays may be easier to get going, and will be far more
resistant to static from lightning, or transients.

If the sensor loops go off in all directions, it may be convenient to
place the relays in the hot leads, at the power supply (of course, you
can do that if the sensors are all in one place as well; you'll just
have to run separate feeds to each one.

Switching the low side may give the ADC some problems; the input may try
to rise to the supply voltage, depending on the sensors.

> The purpose of the bottom Resistor is easy to understand, it will convert
> the current into a voltage. The Zener is there to make sure that voltage
> doesn't go too much beyond 5V even in case of a Sensor short circuit (the
> current will be limited anyway by the top Resistor).

I'd still suggest you use that fuse.

> Would a Transil diode instead of the Zener be really useful as protection?
> I am thinking about some hundreds of meters of cable which, due to its own
> induction, could kick very hard when the MOSFET turns on. Of course, if a
> cheaper Zener solution is as good in practice, why waste a Transil there?
> A reason may be electrostatic interference or nearby lighting strikes,
> would a Transil be a more valid choice than a Zener then (I know that if
> the lighting strikes right on the cable, nothing can be saved anyway!).

I'd suggest you look around for what is considered industrial "good
practice" for that. The sensor manufacturers may have some suggestions.

> Now I (think) I could feed directly an ADC input (should I buffer it with
> an op-amp?

No reason, unless it's a weird low-impedance input.

> The impedance is already pretty low, and while the ADC
> input may draw bias current, I think I can calibrate the whole system at
> the digital output, cannot I?

Yes, you can, and the ADC input current is probably negligible in any
case. You'll also have to calibrate out the 4 mA "zero current" too, but
that's not a problem.

If you really need a full 16 bits of resolution for the
zero-to-full-scale range of the sensors, don't forget that you lose
about 20% because of that 4 mA. That is, your DAC will go zero to full
scale with input current from ZERO to 20 mA, and you have to throw away
the bottom 20%. So, you might need a few more than 16 bits on the ADC.

> Or the ADC input bias current will vary, thus
> introducing an error in the measure? I'd like to get near 16bit resolution).

If it varies, you have chosen a very poor ADC.

> I saw some interesting ADC's from Texas Instruments which contain also an
> analog multiplexer. For example the ADS1243 IC, which contains a 8-MUX, a
> buffer and even a programmable gain amplifier, and it's even 24 full bits!

Since you intend to switch the sensor circuits anyhow, it's not clear
why you need a mux; also, you'll only need one I-to-V conversion
resistor.

Alternately, you may find it less expensive to get a larger power supply
(still under 200 mA) and power all the sensors all the time. Then use a
mux and six separate load resistors. That may be less expensive overall
than switching the power to the sensors, as well as being much simpler
-- you don't need to design and build a FET (or relay) driving circuit).

Do the sensors have a "warm-up" time before they become stable? If they
do, leaving them on all the time may be very desirable anyhow.

Isaac

Similar ThreadsPosted
4-20mA Application: need some advice, please April 6, 2007, 11:23 am
CM11A Monitor/Control Application March 31, 2005, 5:31 pm
Cat-6 Installation Advice April 5, 2005, 11:42 am
Need some antenna advice (for my CM15A, of course) March 6, 2005, 2:04 am
advice for retro installation March 21, 2005, 5:02 am
Re: Need some antenna advice (for my CM15A, of course) May 22, 2005, 6:02 pm
Home run -- advice needed May 23, 2005, 10:38 am
Newbie Advice needed May 30, 2005, 8:39 am
Need Advice on Video Problem! January 23, 2006, 4:49 pm
Getting Started Project, advice please March 12, 2006, 1:40 pm
Advice on two Tranceivers with the same house code... March 12, 2005, 4:13 pm
Video cabling advice needed January 20, 2006, 3:08 pm
About to build house, advice needed. August 21, 2007, 2:48 pm
OT: Advice on Good Online Store Setup July 30, 2005, 5:25 pm
Need Advice on cctv DVR card selection & software July 13, 2007, 12:41 pm