interfacing HART in PIC

Discussion in 'The Projects Forum' started by anthony06, Jun 1, 2006.

  1. anthony06

    Thread Starter New Member

    Feb 16, 2006
    8
    0
    Hello ...all

    Need help please.I found a lot of sensor have 4 - 20mA or 4 - 20mA HART as output.
    What does it mean? Why they use a current as output not voltage? In simple word
    what is HART protocol and how to interface it in PIC?
    Thank you

    Anthony
     
  2. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    First of all, 4-20mA analogue sensors are not the same as digital HART sensors, albeit both of them use 4-20mA current loop.

    4-20mA analogue current loop is just that, the minimum sensor value is represented by 4mA and the maximum sensor value is represented by 20mA.

    HART protocol is digital one, much like fieldbus or profibus, and it operates over the same 4-20mA analogue current loop. There are simultaneous operations of analogue and digital and digital only operations also point-to-point or multi drop network within the specifications. HART is quite popular in industry, the reason is because it can operate over widely installed old 4-20mA loops.

    The reason of using current instead of voltage is noise immunity and signal integrity over varying loops and environmental conditions.

    Interfacing analogue 4-20mA loop is pretty straight forward, the principle is to convert the current to voltage using a precision resistor and read the resulting voltage through an ADC.

    Interfacing HART sensor is a different proposition altogether. Not only you have to content with the physical encoding over the current loop, but you also have to implement the layered OSI-like protocols. Quite significant tasks. I suggest you get hold of one of those HART books, or the specs from HART Communication Foundation (HCF) (not free) if you are interested.
     
  3. anthony06

    Thread Starter New Member

    Feb 16, 2006
    8
    0
    Thank you for your reply. I found sensors with 4 - 20mA output have only 2 wires (+) / (-). Power supply and current signal are carried over the same 2 wires. One side for current signal other side it need supply.Is it true? How can it work ?
     
  4. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    The current flows on both wires, that is why it is called current loop. The host puts a predefined voltage (not critical to accuracy) on the loop, and the sensor regulates the amount of current flowing according to the measurement value by using a form of current limiter/source circuit. The excess voltage across the current source is also used by the sensor to power itself. The portion of the current used to power the sensor is added to the current resulting from the measured value and the total is controlled by the sensor to a defined accuracy.

    The voltage across the sensor (also to supply itself), depends on the total voltage on the loop and the total loop resistance (sensor + host). Usually the sensor is designed to work correctly at minimum possible voltage, any loop conditions that would result in higher voltage could be compensated easily at the sensor end.

    Two reasons why the 0% value is represented as 4mA:
    1. To detect if there is a fault in the loop. Any open loop or supply fault would result in 0mA.
    2. To provide power for the sensor, even when the measured value is 0%. As long as the total current requirement of the sensor does not exceed 4mA then it works happily. In practice this would be slightly less than 4mA.
     
  5. anthony06

    Thread Starter New Member

    Feb 16, 2006
    8
    0
    Your explanation is very usefull to me. I'm sorry...it makes me confused.
    For example I have a 12.5v 500mA power supply, sensor and instrument in a loop.
    I connect a 250 ohm resistor across 2 wires of sensor to get 1 - 5v voltage for ADC.
    My question is what happen if I use only power supply and sensor, do the sensor still raises 1 -5v voltage? Where is the excess voltage and current?
     
  6. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    You are not allowed to put a parallel resistor on the loop, that would shunt part of the current and result in inaccuracy. Series resistor is alright, as long as the drop is not too high to cause lack of voltage swing at maximum/minimum values.

    Moving on to your question, each part in the loop (supply, sensor and instrument) has a certain voltage across them. The total must be zero. If you take out the instrument, then the voltage across the sensor would increase to match the supply voltage. Bear in mind, that the current would not change at all, because the current represents the measured value. The sensor _regulate_ the amount of current, whatever the voltage across it.
     
  7. Gorgon

    Senior Member

    Aug 14, 2005
    113
    0
    The 2 wire sensors used in a 4-20mA loop does need a minimum voltage to function properly, normally in the range of 8-10V. This voltage is added to the max. voltage over the sense resistor. (See the datasheet for the sensor)If you use a 250 ohm resistor and get a voltage drop of max. 5V over this at 20mA, you need to supply the sensorloop with at least 15V. The normal industrial supply voltage is arround 24V. If you use only the sensor and power, without the resistor, the current will still flow but you can't see it. If you on the other hand connect only the power and the resistor, without the sensor, the resistor will be destroyed.

    TOK ;)
     
Loading...