How To Drive and Read A 4-20mA Sensor

Hello,

I have limited experience with microcontrollers, all with freescale HC12 and HCS12 systems. I have dealt with 0-5V sensors through ADC before, too.

I currently have a project where I might have to use a 4-20mA sensor. How would I go about electrically interfacing a 4-20mA sensor to a generic microcontroller? How would you power it and read it? Is there an IC available?

Any suggestions or help would be greatly appreciated!

Reply to
eeboarder
Loading thread data ...

ADI makes a nice interface chip you could use.

Leon

Reply to
Leon

In general, a precision load resistor (E = I *R ) and a bit of signal conditioning. Usually you'll need something like a 12-24VDC power supply depending on the type of sensor (eg. 2-wire vs. 4-wire) and maybe isolation if it's a real-world application with long cables and serious EMC considerations. Usually you'll want to be able to handle a certain amount of overrange (somtimes more than 60% of span, eg. 30mA) under some conditions, so it's usually not best to make full scale equal to the full scale of your ADC, and you certainly want to be able to protect against fault conditions and transients. There is at least one >10 year old "chip" available, but I don't think it's a good solution in modern systems.

Reply to
Spehro Pefhany

Why not just use an opto coupler?

PhilW

Reply to
PhilW

Because you still have to power the sensor - also the "ADC" in the question implies an analog quantity, not a simple switched input.

--

John Devereux
Reply to
John Devereux

You will need the current source anyway, regardless if galvanic isolation or not is used to carry the signal.

If a galvanic signal connection is used, a floating power supply should be used with exactly one point of the current loop circuit connected to any kind of external ground, which in this case must be connected to the ADC analog ground. This can be problematic, especially when multiple current loops are used.

When galvanic signal isolation is used, the processor power supply can be completely separated from the current loop(s) and the loops can be grounded according to other requirements. If the optoisolator is not linear enough, various feedback systems can be used involving a dual optoisolator.

Especially when multiple sensors or long sensor cables are used, keeping the current loops totally separate from the processor circuit simplifies things a lot at the system level.

Paul

Reply to
Paul Keinanen

You could also connect a cheap microprocessor, e.g. ATmega8 with integrated ADC to the same power supply as the sensor and transmit the signal via serial port e.g. as digital 20mA curent loop signal over a optocoupler. So you would not need an analog isolation amplifier which might be a bit tricky.

In this case, you would simply connect the output of the sensor to a 150 Ohm resistor. The ATmega has a resulution of 10 Bits. This might be much better as if you use an analog isolation amplifier.

But the best solution depends on your demands, e.g. sampling rate, resolution and accuracy.

Stefan

Reply to
Stefan Brröring

This is OK as long as you can run the ADC, processor and opto transmitter with less than 4 mA. With suitable loop power supply, you might have about 5-15 V voltage drop available, the circuit would have

20-60 mW available.

Paul

Reply to
Paul Keinanen

I may be missing the point but it seems much simpler than all that. If you can input 0-5v then connect the 4-20 mA output to ground through a 250 ohm resistor and the voltage at the output will be 1 to 5 volts for 4-20 mA. If you want some room a 200 ohm resistor gives a maximum of 4 volts. A two wire sensor is loop powered. I would connect the positive side of the sensor to a voltage source like 10 or 12 volts. The only problem with this is that the accuracy of the load resistor will determine the accuracy of your measurement. This may not be a big issue - many sensors are accurate to only 1% anyway. An 8-bit ADC has about 0.4% resolution.

>
Reply to
stephenvb

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.