“HART technology is very mature abroad. And with its own outstanding advantages, it has become the most widely used field communication protocol in the field of intelligent control. It can be foreseen that in a long period of time in the future, HART technology will play an important role in the intelligent development and transformation of field instruments in my country. Design practice has proved that using A5191HRT to design the HART protocol communication module of intelligent field instrument has the advantages of simple circuit design, high working reliability, and high reference value and practical value.
Authors: Gu Wei, Zhou Jianming
In the mid-1970s, industrial control instruments developed into a unified two-wire 4 mA “20 mA current loop standard analog signal system. After the 1980s, the development of digital technology enabled a large number of intelligent control instruments to use microcontrollers (MCUs). The amount of information transmitted between the control equipment and the control equipment is increasing, and an all-digital two-way communication specification is urgently needed. The HART protocol developed by Rose-mount Company in the United States is a transitional field bus standard compatible with the current 4 mA-20 mA analog system, and has been very popular. Widely used, it has become the de facto international standard in the field of intelligent industrial control.
The A5191HRT type HART semiconductor modem of AMI company is used to construct the HART protocol communication module of the intelligent field instrument, and has the characteristics of simple peripheral circuit and high reliability.
HART (Highway Addressable Remote Transducer) protocol was introduced by American Rose-mount Company in the mid-1980s and is mainly used for digital communication between field intelligent instruments and control systems. The HART protocol superimposes the audio digital signal on the low-frequency 4 mA, 20 mA analog signal to carry out two-way digital communication. It has the advantages of simultaneous point-to-point 4 mA to 20 mA analog and digital communication, multi-station communication mode, multiple information transmission, and open architecture that can be obtained free of charge.
The HART protocol refers to the ISO/OSI model (open system interconnection model), and adopts a simplified three-layer model structure, namely the first layer of physical layer, the second layer of data link layer and the seventh layer of application layer. The physical layer specifies the signal transmission method, using the FSK frequency shift keying signal based on the Bell202 standard, superimposing the audio digital signal on the low-frequency 4 mA-20 mA analog signal for two-way communication, the digital signal amplitude is 0.5 mA, and the data rate is up to 20 mA. 1200 b/s, 1200 Hz for logic…1′, 2200 Hz for logic…0′. The FSK frequency shift keying signal waveform is shown in Fig. 1(a).
The data link layer specifies the HART protocol frame format. Realize the function of establishing, maintaining and terminating link communication. The application layer is the HART protocol command set, which is used to realize the HART instruction.
Figure 1(b) shows the schematic diagram of the simultaneous transmission of the FSK frequency shift keying signal of the HART protocol and the 4 mA to 20 mA current loop analog signal superimposed. Since the average value of the FSK signal is 0, it does not affect the size of the 4 mA-20 mA current loop analog signal sent to the control system. Compatibility with existing analog systems is guaranteed.
3 The working principle of A5191HRT
3.1 Performance and pin function of ASl91HRT
The A5191HRT is a monolithic CMOS modem used in HAftT field instruments. Its main features are as follows:
(1) A single-chip, half-duplex frequency shift keying (FSK) modem with a rate of 1200 b/s, which can replace SYM20C15;
(2) Bell202 standard FSK frequency shift keying signal, the carrier is 1200Hz and 2200Hz;
(3) The receiving band-pass filter circuit and the sending signal waveform shaping circuit are integrated inside:
(4) External 460.8 kHz crystal or ceramic filter internal clock oscillator or use external input clock;
(5) The working temperature range is -40℃”+85℃;
(6) The power supply voltage is 3. OV～5.0V;
(7) Meet the requirements of the physical layer of the HAftr protocol;
(8) Low power consumption.
In addition, in order to save power consumption, the A5191HRT can turn off the receiving circuit during the sending operation, and the sending circuit can also be turned off during the receiving operation. This working mode is suitable for the half-duplex communication mode of the HART protocol.
The A5191HRT is available in 28-pin PLCC and 32-pin LQFP packages, with the pinout shown in Figure 2.
The functions of the main pins are shown in Table 1.
3.2 Internal structure and working principle of A5191HRT
A5191HRT includes transmit data modulator and waveform shaping circuit, carrier wave detection circuit, receive filter and demodulation circuit, control logic and clock oscillator circuit. The internal structure of A5191HRT is shown in Figure 3.
The modulator receives the non-return-to-zero digital code and modulates it into an FSK signal. Logic “1” is represented by 1200 Hz. The logic “0” is represented by 2200 Hz, and the data rate is 1200 b/s. After that, the FSK signal is shaped into a signal compatible with the HART protocol by the waveform shaping circuit and sent out. The receiving filter completes the band-pass filtering of the input signal, and sends the signal to the carrier detection circuit and the demodulator. The carrier detection circuit compares the output signal of the receiving filter with the external reference voltage, and outputs a high level when it detects that a valid modulation signal is input to the input pin of the receiving signal. The demodulator demodulates the filtered FSK input signal into a digital signal output when the carrier output is valid. The clock oscillator circuit generates a 460.8 kHz clock signal, and the internal oscillator circuit can be used to generate the clock signal. At this time, an external crystal oscillator is required. An external clock signal can also be directly input. The control logic circuit is used to control the work of each circuit module inside the A5191HRT. For example, switching between send and receive operations.
4 Design of HART protocol communication module
4.1 Hardware circuit design of HART protocol communication module
An intelligent field instrument requires the HART protocol communication module to exchange the instrument’s setting parameters, intermediate measurement data, calibration parameters and other information transmission with the host (host computer). And the function of converting the digital code of the measurement result of the instrument into the output of 4mA ~ 20mA standard analog current loop signal. The structural block diagram of the completed HART communication module is shown in Figure 4.
The HART protocol communication module is mainly composed of MCU, A5191HRT and AD421 DAC in the field instrument. in. AD421 receives the digital signal transmitted by MCU and converts it into 4 mA ~ 20 mA current output, and transmits the measurement result: A5191HRT receives the FSK signal superimposed on the 4 mA-20mA loop. After demodulation, it is transmitted to the MCU. Or modulate the response frame information generated by MCU into FSK signal after waveform shaper, superimpose it on 4 mA-20 mA loop by AD421 and send it out.
Because A5191HRT integrates a relatively complete HART modulation and demodulation circuit. So its peripheral circuits only need less passive components. The principle of the peripheral circuit of A5191HRT is shown in Figure 5.
In Figure 5, the interface signals between A5191HRT and MCIJ include carrier detection OCD, HART demodulation output ORXD, HAIl”r modulation input ITXD, request to send INRTS: Loop+ is 4 mA “20 mA loop input: HART modulation and demodulation clock The signal comes from an external 460.8 kHz crystal that oscillates.
AD421 is ADI’s high-performance single-chip DAC. It is compatible with the FSK communication circuit of the HART protocol and is suitable for intelligent industrial control applications with low power consumption, high precision and low cost. AD421 consists of voltage regulator, Σ-Δ structure DAC core and current amplifier. The 16bit digital code can be converted into the corresponding 4 mA ~ 20 mA analog current.
4.2 Software design of HART protocol communication module
The software design of HART protocol communication module includes the software design of HART protocol and the control program design of MCU to AD421. The former includes the communication program design of the data link layer of the HART protocol and the software interface design of the application layer. It is the main part of the whole module software design.
The communication process of the HART protocol communication module starts with the host sending a command frame, and the field instrument, as a slave device, uses the interrupt to call the subroutine to complete the reception and response. After the field instrument is powered on and reset, the communication program first initializes the HART protocol communication module. For example, after setting the UART working mode of MCU, serial communication baud rate, data frame format and interrupt, etc., it enters the waiting state. When the host sends the command, the carrier detection OCD of A5191HRT becomes low level, which triggers the UART interrupt of the MCU. Call the receive subroutine. After the MCU completes the reception and processing of the host command, it generates a response frame and transmits it to the A5191HRT. It is modulated into FSK signal and transmitted to the host, and after completion, the HART protocol communication module is set to the waiting state.
The HART protocol communication module adopts this method of interrupting the calling subroutine to complete the communication between the field instrument and the host, and can realize the functions of the host to set various working parameters of the field instrument, read the measurement results, and detect the working status of the instrument. And it has the advantage of flexible programming.
HART technology is very mature abroad. And with its own outstanding advantages, it has become the most widely used field communication protocol in the field of intelligent control. It can be foreseen that in a long period of time in the future, HART technology will play an important role in the intelligent development and transformation of field instruments in my country. Design practice has proved that using A5191HRT to design the HART protocol communication module of intelligent field instrument has the advantages of simple circuit design, high working reliability, and high reference value and practical value.