Uploaded by kirillplusa

HART protocol description

advertisement
International Journal of Electronics and Computer Science Engineering
Available Online at www.ijecse.org
1092
ISSN- 2277-1956
Design of HART modem on AVR microcontroller for
Smart Transmitter
Tripti Gupta 1 , Sharmelee Thangjam 2
1
Department of Microelectronics
2
Department of Electronics and Communication Engineering
1,2
UIET, Panjab University, Chandigarh
E-mail-1triptigupta86@gmail.com, 2Sharmeleeth@yahoo.com,
Abstract-The majority of smart field devices installed worldwide today are HART-enabled. The HART (Highway
Addressable Remote Transducer) Protocol is the global standard for sending and receiving digital information across
analog wires between smart devices and control or monitoring system. It is a bi-directional communication protocol that
provides data access between intelligent field instruments and host systems. HART technology offers a reliable, long-term
solution for plant operators who seek the benefits of intelligent devices with digital communication. Most automation
networks in operation today are based on traditional 4-20mA analog wiring, HART technology serves a critical role
because the digital information is simultaneously communicated with the 4-20mA signal. The HART protocol directly
contributes to cost savings in: Commissioning and installation, Plant operations, Maintenance. Transmitter that supports
HART protocol is known as Smart Transmitter. Today’s smart transmitters go beyond reporting a single variable. They
use microprocessors to archive a variety of information, including calibration settings, operating conditions, and other
diagnostic data. This paper discusses the design of HART modem on AVR microcontroller without using a dedicated
HART modem chip.
Keywords – AVR, HART protocol
I. INTRODUCTION
HART protocol is a widely recognized industry standard and all the major equipment vendors offer products based
on HART protocol. Its characteristic is that it can realize the communication of digital signal in the transmission
lines of analog signals. Established in 1993, the HART Communication Foundation (HCF) is the technology owner
and standards setting body for the HART Communication Protocol. The protocol refers to the ISO/OSI open system
interconnection model, using its simplification three model structure, that is of physical layer, data link layer,
application layer. It provides the non-risky solution which improves the communication between the instruments [1]
[2]. HART technology is easy to use and very reliable when used for commissioning and calibration of smart
devices as well as for continuous online diagnostics. There are two kinds of HART protocols that transmit digital
signal and analog signal in the same wire, HART FSK and HART C8PSK.HART FSK underlies Bell-202 Telecom
standard and uses frequency shift keying technology. HART C8PSK is similar to the signaling specified in the
CCITT V.27 Telecom standard, employing eight phases of a 3200 Hz carrier to transmit digital signals [3]. The
HART FSK Protocol communicates at 1200 bps without interrupting the 4-20mA signal. The protocol uses
frequency shift keying technique to transmit the digital data over analog signal where “0” is transmitted with a
frequency of 2200 Hz and a “1” is transmitted as 1200 Hz frequency [4]. The main variables and control
information is provided by 4-20mA analog signal transmission and other measurement, process parameters, device
configuration,caliberation and diagnostic information are accessed through HART protocol in the same line, at the
same time [2]. HART is a master/slave protocol, which means that the slave devices transmit messages only as a
response to commands received from a master. The HART communication signal is shown in figure 1.
ISSN 2277-1956/V1N3-1092-1096
1093
Design of HART modem on AVR microcontroller for Smart Transmitter
Figure1. Simultaneous analog and digital communication
II. HART MODEM
HART modem chip is used to implement a complete HART signal modulation and demodulation. HART standard
defines 1200 Hz and 2200 Hz as two frequencies which represent logic 1 and 0 respectively. For communication
purpose these frequencies need to be converted from frequency signal to digital logic signal and vice versa. HART
modem functionality is implemented on software and replaces hardware modem chip with minimal hardware,
comprising of filters and comparators only.
A.
HART modulatorHART Modulator uses PWM generation feature of microcontroller timer and generates PWM corresponding to
1200Hz and 2200Hz sine waves of HART signal. These signals are filtered by passive hardware filters and converted
to sine waves. Figure 2 shows the blocks of HART modulator.
UART data@1200bps
HART signal frequency
selector logic
PWM duty cycle
selector
2nd order passive LPF
HART FSK output
Figure2. HART Modulator
B. HART demodulator –
HART demodulator shown in figure 3 is based on conversion of digital signal from a zero crossing detector circuit.
Zero crossing Detector converts sine waves of HART signal to digital pulses, these pulses are delayed and XORed
with its parent signal.LPF recovers the DC average output of the XOR circuit. Again a zero crossing detector is used
and the digital output is stable and noise free.
ISSN 2277-1956/V1N3-1092-1096
IJECSE,Volume1,Number 3
Tripti Gupta and Sharmelee Thangjam
HART FSK input
Butterworth 2nd
order HPF & 1st
order LPF to
accommodate HART
signal band only
Zero crossing Detector
UART data @1200bps
Delay algorithm
Zero crossing
Detector
XOR with
parent signal
Hardware based
low pass filtering
Figure3. HART Demodulator
III.
IMPLEMENTATION ON AVR MICROCONTROLLER
HART modem can be implemented on AVR microcontroller as shown in figure 4.
For demodulator, hardware filters consists of 2nd order active HPF and a 1st order passive LPF. HPF is designed for a
cutoff frequency of 1000Hz (approx.) and LPF for a cutoff frequency of 2400Hz (approx). Filtered signal is passed
through a zero crossing detector (ZCD) section which converts sine wave signal to digital pulses.
Filters and ZCD can be implemented in different ways as listed below:
Using active 2nd order HPF and passive 1st order LPF and ZCD can be implemented using analog comparator
peripheral of microcontroller.
Using Op-amp for 2nd order HPF, a passive 1st order LPF and ZCD can be implemented using comparator stage.
Output of ZCD is fed to microcontroller GPIO pin, capable of issuing interrupts on rising and falling edges of signal.
The functions delayed and XORed with parent signal are performed by microcontroller.
For modulator, microcontroller software needs to generate PWM corresponding to sine frequencies of HART signal.
Modulator is implemented inside AVR microcontroller, baud rate of 1200bps and its frame format can be generated
using timer interrupt and software will know (programmed timer interrupts) when to transmit frequencies
corresponding to 1 or 0.HART sine wave signal is to be generated by varying PWM duty cycle. Table of those duty
cycles is stored in program memory. Based on which frequency is to be generated, software selects duty cycle
samples and loads to PWM duty cycle registers. External to microcontroller a 2nd order passive LPF is used to
remove out high frequency switching noise and give 1200Hz and 2200Hz sine waves. This approach is easy to
implement, uses less hardware and software resources.
ISSN 2277-1956/V1N3-1092-1096
1095
Design of HART modem on AVR microcontroller for Smart Transmitter
HART FSK input
Butterworth 2nd order
HPF & 1st order LPF to
accommodate HART
signal band only
Zero crossing
Detector
Low pass filter
GPIO
AVR
MICROCONTROLLER
Zero crossing
Detector
HART FSK output
2nd order passive
LPF
UART RX
GPIO
Figure4. Implementation on AVR microcontroller
IV.
AVR MICROCONTROLLER
AVR (Advanced Virtual RISC) has RISC (Reduced Instruction set computer) Harvard architecture. It is a general
purpose and cheap microcontroller. Instructions are executed in single clock cycle so it is a fast microcontroller. It
has high performance, consumes less power and can be operated in different power saving mode. AVR has in built
A/D converter and on chip analog comparator which is not present in any other microcontroller. It has a real time
counter, Programmable Serial USART, Master/Slave SPI Serial Interface, Programmable Watchdog Timer with
Separate On-Chip Oscillator, Two 8-bit Timer/Counters with Separate Prescaler and Compare Modes. These
features of AVR microcontroller are used to perform the modulation and demodulation in HART modem.
V.
SMART TRANSMITTER
Smart transmitters use the same two-wire connection and analog signaling (4 mA to 20 mA). However, in this kind
of transmitters, the signal from the sensor is digitized, and then digital processing is performed by a microcontroller.
This approach has two important advantages: 1) it enables good compensation of sensor nonlinearity; 2) it enables
the use of additional sensors in order to compensate the influence of parasitic parameters. Smart transmitters belong
to the third technology generation.
VI.
APPLICATION AREAS
HART modem is used in industries to transmit large number of signals from field point to control panel to collect
data like temperature, humidity, pressure, flow rate of a gas, level measurement for further study, Open architecture
ISSN 2277-1956/V1N3-1092-1096
IJECSE,Volume1,Number 3
Tripti Gupta and Sharmelee Thangjam
applications-oil refinery applications, Remote- operation applications, Cost saving applications-water treatment
facility upgrade, Inventory-management applications-underground petroleum storage with HART communication
for accuracy, waste water treatment plant upgrade[5].
The HART modem can also be installed as an external peripheral. It could be useful because many instrumentation
software used to setup and to calibrate a measurement sensor or to establish a diagnostic, often need a serial port to
dialog with the transducer. HART modem is a smart tool for an automation engineer to configure a sensor or another
device, or to maintain it by linking either locally (directly) or remotely.
VII. CONCLUSION
In today's competitive environment, everyone wants to find ways that can help in reducing operational costs, deliver
products rapidly, and improve quality. The HART Protocol directly contributes to these business goals by providing
cost savings in: Commissioning and installation, Improve plant operations, Provides improved plant quality, Reduce
maintenance costs. Most smart devices are configured using the HART Protocol. The HART Protocol provides two
simultaneous communication channels – the 4-20mA analog channel and the HART-digital channel that is
superimposed on the analog channel. HART modulator modulates the data received from the communication port
and adds this signal to the analog signal to build the 4-20 mA composite signal. The HART demodulator extracts the
modulated signal from the 4-20 mA composite signals and demodulates it into digital signal.
Earlier HART modem functionality has been implemented using off-the-shelf HART Modems such as A5191HRT
modem by AMIS or the HT2015 by Smart Research etc. This comes at the cost of the modem chip and additional
board space required to mount it. By using various features of AVR microcontroller, HART is implemented on AVR
which performs modulation and demodulation functions. This uses minimal hardware and minimal CPU resources
thus the total cost and space can be reduced. Design elements like filters and algorithms are used which improve the
quality of HART modem.
VIII. REFERENCES
[1] Zeng Mingru, You Wentang, Qian Xin. “The Development of Intelligent Pressure Transmitter based on HART Protocol”
Intelligent Conference on E-Health Networking, Digital Ecosystems and Technologies, 2010.
[2] A Guochen, Meng Zhiyong, Ma Hongtao, Sui Bingdong. “Design of Intelligent Transmitter based on HART Protocol”
International Conference on Intelligent Computation Technology and Automation, 2010.
[3] Jin Zhenghua, Wang Hong, Yang Zhijia. “Joint Design of signal Detection, Demodulation Classification, Channel Estimation
and Automatic Gain Control for Multi Speed HART” International Conference on Computer Design and Applications, 2010
[4] J.M.Dias Pereira, O.Postolache, P.Silva Girao. “HART protocol Analyser based in LabVIEW” IEEE International
Workshop on Intelligent Data Acquisition and advanced computing systems: Technology and Applications, 2003.
[5] Jim Mitchem. “Automated calibration aids smooth turnover of new plants” IEEE Instrumentation & Measurement Magazine,
2004.
ISSN 2277-1956/V1N3-1092-1096
Download