[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: 4-20mA Application: need some advice, please



In article <46166607$1$17943$4fafbaef@xxxxxxxxxxxxxxxxxxx>,
 andrea@xxxxxxxxxxxxxxxx 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


comp.home.automation Main Index | comp.home.automation Thread Index | comp.home.automation Home | Archives Home