Two-wire system HART instrument device based on software decoding and software decoding method

By adopting a software-based decoding design in the two-wire HART instrument and using a microprocessor for signal processing and decoding, the problems of hardware complexity and cost in the prior art are solved, and lower cost and efficient communication are achieved.

CN119728364APending Publication Date: 2025-03-28SHANGHAI AUTOMATION INSTRAION CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411941394.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing two-wire HART instruments are complex in design, high hardware costs, and most of them use foreign chips, resulting in cost and complexity problems.

Method used

A two-wire HART instrument device based on software decoding is adopted, and a microprocessor is used to perform signal processing, decoding and modulation, reducing dependence on hardware codec chips.

Benefits of technology

It reduces hardware costs, simplifies design, has extremely low communication bit error rate, and can integrate more functions into the microprocessor, further saving costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728364A_ABST
    Figure CN119728364A_ABST
Patent Text Reader

Abstract

The invention relates to the field of two-wire system instruments, in particular to a two-wire system HART instrument device based on software decoding, which comprises a signal processing unit, a signal receiving unit, a signal transmitting unit and a power taking unit. The signal processing unit is powered by the electricity taking unit after taking electricity from the instrument control loop. The signal receiving unit separates HART current signals from loop current on the instrument control loop and sends the HART current signals to the signal processing unit. And the signal processing unit processes to obtain HART response data and loop control information. And the signal sending unit firstly generates a new HART current signal according to the HART response data, also generates a direct-current loop current according to the loop control information, then modulates the HART current signal to the direct-current loop current to form a new loop current, and sends the new loop current on the instrument control loop. The invention further comprises a software decoding method. According to the invention, a microprocessor is used for soft decoding, a hardware coding and decoding chip is not needed, and further communication and analog-to-digital conversion of hardware can be realized, so that the cost is remarkably reduced, and the communication error rate is extremely low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of two-wire instruments, in particular to a two-wire HART instrument device based on software decoding and a software decoding method. Background Art

[0002] The Hart signal follows the Bell 202 frequency shift keying (FSK) standard and consists of two sine waves of different frequencies, 1200 Hz and 2200 Hz. 1200 Hz represents 1 and 2200 Hz represents 0. The phase is kept continuous during the transition from 1 to 0 or from 0 to 1.

[0004] The current two-wire Hart meter is basically composed of MCU chip, Hart Modem chip and DAC chip. The MCU chip completes the control and measurement and other related functions of the entire meter, the Hart Modem chip completes the encoding and decoding functions of the Hart signal, and the DAC chip completes the loop power supply and loop current output functions. The entire design requires three chips to complete the functions of the entire meter. The hardware is complex and expensive, and most of them use foreign chips. Summary of the invention

[0005] The purpose of the present invention is to provide a two-wire HART instrument device based on software decoding and a software decoding method, mainly to solve the problems existing in the above-mentioned prior art.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is to provide a two-wire HART instrument device based on software decoding, characterized in that it includes a signal processing unit, a signal receiving unit, a signal sending unit and a power taking unit;

[0007] The signal processing unit is a microprocessor, powered by the power taking unit, and connected to the signal receiving unit and the signal sending unit; the signal receiving unit separates the HART current signal in the form of a sinusoidal current from the loop current on the instrument control loop, converts it into a digital signal in the form of a square wave, and sends it to the signal processing unit; the signal processing unit parses and obtains the HART response data according to the HART protocol, and generates loop control information according to the needs of instrument control; the signal sending unit first generates a new HART current signal according to the HART response data, and also generates a DC loop current according to the loop control information, and then modulates the HART current signal onto the DC loop current to form a new loop current, which is sent on the instrument control loop.

[0008] Furthermore, the signal receiving unit includes a signal separation module and a signal demodulation module;

[0009] The signal separation module is a DC blocking capacitor, which is used to separate the AC current signal containing the HART current signal from the loop current and send it to the signal demodulation module; the signal demodulation module first further separates the HART current signal from the AC current signal, and then demodulates the carrier signal and the data signal, and sends them to the signal processing unit.

[0010] Further, the signal demodulation module includes a first filter, a first voltage comparator and a second voltage comparator;

[0011] The first filter separates the HART current signal from the AC current signal according to the frequency difference; the first voltage comparator and the second voltage comparator receive the HART current signal simultaneously; the first voltage comparator detects the carrier signal in the HART current signal according to the set threshold voltage, and notifies the microprocessor after detecting the carrier signal; the second voltage comparator processes the HART current signal in a zero-crossing detection manner, converts the sine wave into a square wave, thereby forming the data signal, and sends it to the microprocessor.

[0012] Further, the signal sending unit includes a signal modulation module, a loop control module, a signal synthesis module and a loop current generation module;

[0013] The signal modulation module generates a HART control signal in the form of a sinusoidal voltage based on the HART response data; the loop control module generates a DC voltage control signal based on the loop control information; the signal synthesis module is an adding circuit composed of an operational amplifier; the HART control signal and the DC voltage control signal serve as two inputs of the operational amplifier, and a loop current control signal is formed at the output of the operational amplifier as the input of the loop current generation module; the loop current generation module, under the excitation of the loop current control signal, generates the loop current formed by the superposition of the HART current signal and the DC loop current.

[0014] Further, the signal modulation module is a first square wave generator, a second square wave generator and a second filter;

[0015] The first square wave generator is controlled by the signal processing unit to generate a low-voltage square wave, and the second square wave generator is controlled by the signal processing unit to generate a high-voltage square wave; the low-voltage square wave and the high-voltage square wave are synthesized into a sine wave by the second filter to form the HART control signal.

[0016] Further, the loop control module includes a pulse width modulation DC voltage follower and a third filter;

[0017] The loop control information from the signal processing unit is a pulse width modulation signal; the pulse width modulation DC voltage output device outputs different voltage signals under the control of the loop control information. After the voltage signal is filtered out of the AC component by the third filter, the DC voltage control signal is generated.

[0018] Further, the loop current generating module includes a voltage-to-current converter and a current amplifier;

[0019] The voltage-to-current converter converts the loop current control signal into a current signal, which is then amplified by the current amplifier to form the loop current; the current amplifier is a Darlington tube.

[0020] Furthermore, the power supply unit includes a DC voltage converter; the DC voltage converter is connected to the instrument control loop, draws power from the instrument control loop and converts it into a voltage matching the signal processing unit, and then serves as the power supply of the signal processing unit.

[0021] The present invention also provides a software decoding method using the above-mentioned two-wire HART instrument device based on software decoding, characterized in that it comprises the steps of:

[0022] Step S10, the signal processing unit, the signal receiving unit, the signal sending unit and the power taking unit complete initialization;

[0023] Step S20, the signal receiving unit separates the HART current signal from the instrument control loop;

[0024] Step S30, the signal receiving unit detects the carrier signal and converts it into a data signal; the signal receiving unit sends the data signal to the input capture module of the signal processing unit; if the carrier signal exists, the interrupt processing module of the signal processing unit is notified, and the process goes to step S40; otherwise, the process goes to step S20;

[0025] Step S40, the signal processing unit responds to the interrupt input of the interrupt processing module, uses the input capture module to read the data signal, and obtains the HART command data in the HART current signal;

[0026] Step S50, the signal processing unit processes the HART command data according to the HART protocol and generates the HART response data;

[0027] Step S60, the signal processing unit uses the signal sending unit to modulate the HART response data onto the DC loop current in the form of a HART current signal to form a new loop current and send it to the instrument control loop;

[0028] Step S70, complete the processing, jump to step S20, and process the next HART current signal.

[0029] Further, in step S60, the step of the signal sending unit modulating the HART current signal comprises the following sub-steps:

[0030] Step S61, the signal processing unit controls the first square wave generator in the signal sending unit to generate an advanced low-voltage square wave; the width of the advanced low-voltage square wave is determined by the HART response data;

[0031] Step S62, the signal processing unit controls the second square wave generator in the signal sending unit to generate a lagging high-voltage square wave; the width of the lagging high-voltage square wave is determined by the HART response data;

[0032] Step S63, the leading low-voltage square wave and the lagging high-voltage square wave pass through a second filter in the signal sending unit to form the HART control signal in a sinusoidal wave form;

[0033] Step S64, the signal processing unit sends the loop control information, which is converted by the pulse width modulation DC voltage outputter in the signal sending unit and passes through a third filter to generate the DC voltage control signal;

[0034] Step S65, the signal synthesis module in the signal sending unit superimposes the HART control signal and the DC voltage control signal to form a loop current control signal;

[0035] Step S66, the loop current control signal is converted into a current signal by the voltage-to-current converter in the signal sending unit, and then amplified by the current amplifier in the signal sending unit, and the HART current signal is modulated onto the DC loop current to obtain a new loop current.

[0036] In view of the above technical features, the two-wire HART instrument device and software decoding method based on software decoding of the present invention have the following significant advantages compared with the prior art:

[0037] 1. The present invention utilizes a microprocessor to perform soft decoding on the Hart signal without using a hardware codec chip, thereby reducing costs and achieving an extremely low communication bit error rate.

[0038] 2. The present invention can also integrate the functions originally implemented by Hart Modem and DAC into a microprocessor, thereby saving Hart Modem and DAC and further simplifying hardware design and cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a system block diagram of a preferred embodiment of a two-wire HART instrument device based on software decoding of the present invention;

[0040] Figure 2 It is an electrical connection diagram of a preferred embodiment of a two-wire HART instrument device based on software decoding of the present invention;

[0041] Figure 3 It is a schematic diagram of electrical connections of a signal demodulation module in a preferred embodiment of a two-wire HART instrument device based on software decoding of the present invention;

[0042] Figure 4 It is a signal processing schematic diagram of a signal modulation module in a preferred embodiment of a two-wire HART instrument device based on software decoding of the present invention;

[0043] Figure 5 It is a schematic diagram of electrical connection of a signal modulation module in a preferred embodiment of a two-wire HART instrument device based on software decoding of the present invention;

[0044] Figure 6 The present invention is a method flow chart of a preferred embodiment of a decoding method of a two-wire HART instrument device based on software decoding.

[0045] In the figure: 100-signal processing unit, 200-signal receiving unit, 300-signal sending unit, 400-power taking unit;

[0046] 210- signal separation module;

[0047] 220-signal demodulation module; 221-first filter, 222-first voltage comparator, 223-second voltage comparator;

[0048] 310-signal modulation module; 311-first square wave generator, 312-second square wave generator, 313-second filter;

[0049] 320-loop control module; 321-pulse width modulation DC voltage output device, 322-third filter;

[0050] 330-signal synthesis module;

[0051] 340 - loop current generating module; 341 - voltage-to-current converter, 342 - current amplifier. DETAILED DESCRIPTION

[0052] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0053] In the instrument control loop, the HART current signal is a low-voltage AC current signal, while the loop current is a high-voltage DC signal. The HART current signal is superimposed on the loop current and connected to each instrument through the instrument control loop. Various control information is encoded in the HART current signal, and the size of the loop current itself constitutes the control signal for the instrument.

[0054] See also Figure 1 and Figure 2 The present invention discloses a two-wire HART instrument device based on software decoding and a software decoding method. As shown in the figure, a preferred embodiment thereof includes a signal processing unit 100, a signal receiving unit 200, a signal sending unit 300 and a power taking unit 400.

[0055] The signal processing unit 100 is the core component of the present invention, which is a microprocessor, and the specific model is GD32F103. It uses the power taking unit 400 to take power from the instrument control loop to provide power support, completes the software decoding of the HART current signal according to the HART protocol stack analysis, and obtains the HART response data. The power taking unit 400 is a DC voltage converter, specifically, a low-noise low-voltage difference linear regulator that meets the input of 10 to 30V and the output of 3.3V. It is connected to the 12V or 24V voltage of the instrument control loop, and performs voltage conversion after taking power from the instrument control loop to obtain a voltage (3.3V) adapted to the signal processing unit 100 as the power supply of the signal processing unit 100. The signal processing unit 100 is also connected to the signal receiving unit 200 and the signal sending unit 300. The signal receiving unit 200 is connected to the instrument control loop to separate the AC part and the DC part in the loop current, thereby obtaining a HART current signal in the form of a sinusoidal current. However, the signal processing unit 100 is a digital circuit and cannot directly process a sinusoidal AC signal, so the signal receiving unit 200 needs to further process the HART current signal and demodulate it to form a digital signal in the form of a square wave before delivering it to the signal processing unit 100. Similarly, the HART response data obtained by the signal processing unit 100 according to the protocol is also a digital signal, so the signal sending unit 300 needs to be used to reconvert the HART response data from a digital form into a HART current signal in the form of a sinusoidal current and modulate it into the loop current so that the two-wire instrument connected to the instrument control loop can receive the HART response data.

[0056] See also Figure 1 and Figure 3 The signal receiving unit 200 is composed of a signal separation module 210 and a signal demodulation module 220. The signal separation module 210 is a DC isolation capacitor that allows AC circuit signals to pass through but blocks DC loop current from passing through, so that the AC current signal can be separated from the loop current on the instrument control loop. The separated AC current signal is sent to the signal demodulation module 220 for further demodulation processing. The signal demodulation module 220 is composed of a first filter 221, a first voltage comparator 222, and a second voltage comparator 223. The first filter 221 is a Salley-Key filter, which is a low-pass filter with a cut-off frequency of 4000 Hz. The signal demodulation module 220 uses the first filter 221 to filter the AC current signal, allowing only the AC current signal related to the HART current signal frequency to pass through, thereby filtering out the clutter in the AC current signal and leaving only the HART current signal. The HART current signal is simultaneously sent to the first voltage comparator 222 and the second voltage comparator 223. The first voltage comparator 222 is a simple voltage comparator that detects whether there is a carrier signal in the HART current signal. It works according to the set threshold voltage (140mV): when the input voltage is less than the threshold voltage, the output is a low level; otherwise, the output is a high level. The output of the first voltage comparator 222 is connected to the interrupt processing module of the signal processing unit 100 (microprocessor) to notify the signal processing unit 100 that the carrier signal has been detected and the data signal should be captured. The second voltage comparator 223 is a zero-crossing detection voltage comparator. Whenever the input voltage crosses the zero value, its output flips: either from a low level to a high level, or from a high level to a low level. In this way, the second voltage comparator 223 converts the sine wave signal into a data signal in the form of a square wave and sends it to the input capture module of the signal processing unit 100. In order to save power consumption and simplify the logic, in this embodiment, the input capture module of the signal processing unit 100 is triggered by the interrupt processing module, that is, it only starts to work after receiving a valid carrier signal. The signal processing unit 100 uses the input interrupt module and the input capture module to capture the interval time between edges, which corresponds to 1200 Hz or 2200 Hz in the HART signal, thereby demodulating the HART signal.

[0057] The signal sending unit 300 is composed of a signal modulation module 310 , a loop control module 320 , a signal synthesis module 330 and a loop current generation module 340 .

[0058] See also Figure 1 and Figure 4 and Figure 5The signal modulation module 310 is responsible for converting the HART response data in digital form given by the signal processing unit 100 into a HART control signal in the form of a sinusoidal voltage. It is composed of a first square wave generator 311, a second square wave generator 312 and a second filter 313. The first square wave generator 311 generates a low-voltage square wave, and the second square wave generator 312 generates a high-voltage square wave. The first square wave generator 311 and the second square wave generator 312 are both controlled by the signal processing unit 100. Every time a new HART control signal is generated, the signal processing unit 100 allows the first square wave generator 311 to act earlier than the second square wave generator 312, thereby producing an advanced low-voltage square wave and a lagging high-voltage square wave. The second filter 313 is an RC charge-discharge circuit. It can be seen from the characteristics of charge and discharge that charging or discharging is very fast at the beginning and then gradually slows down. In order to modulate a sine wave, multiple voltages need to be combined at a fixed time to form an irregular step wave, and then the step wave can be perfectly transformed into a sine wave after charging and discharging. The combination of the leading low-voltage square wave and the lagging high-voltage square wave is used to form such an irregular step wave. After the leading low-voltage square wave and the lagging high-voltage square wave are charged and discharged by the RC charging and discharging circuit of the second filter 313, the frequency inconsistent with the HART current signal is filtered out to form a 3.3V sine wave with an amplitude corresponding to the voltage domain of the microprocessor IO. Then, the 3.3V sine wave is reduced by 33 times to a sine wave with an amplitude of 0.1 after passing through the voltage divider resistor, which is used as the HART control signal.

[0059] The loop control module 320 is composed of a pulse width modulated DC voltage output device 321 and a third filter 322, which generates a DC voltage control signal for controlling the generation of the DC loop current. The loop control information output by the signal processing unit 100 is a pulse width modulated signal, which serves as the control input of the pulse width modulated DC voltage output device 321. When the pulse width modulated signal changes, the pulse width modulated DC voltage output device 321 charges and discharges the RC circuits of several orders to keep them at a stable DC voltage. According to the different duty cycles of the pulse width modulated signal, the amplitude of the output voltage signal also changes, ranging from 0 to 2.5V. Voltage signals of different amplitudes will eventually correspond to DC loop currents of different sizes in the loop current generation module 340. In order to ensure the stability of the control, the pulse width modulated DC voltage output device 321 is connected to the third filter 322, and the third filter 322 filters out the AC component, thereby forming a DC voltage control signal whose amplitude is controlled by the signal processing unit 100.

[0060] The signal synthesis module 330 is an operational amplifier, whose bias voltage is below 1mV and bias current is below 1nA. The operational amplifier forms an additive current, whose input terminals are respectively connected to the signal modulation module 310 and the loop control module 320, and combines the HART control signal output by the signal modulation module 310 and the DC voltage control signal output by the loop control module 320 to form a loop current control signal in which a slightly fluctuating HART control signal (sine wave with an amplitude of 0.1V) is superimposed on the DC current signal (DC voltage of 0-2.5V).

[0061] The loop current generating module 340 is composed of a voltage-current converter 341 and a current amplifier 342. The input of the voltage-current converter 341 is the loop current control signal from the signal synthesis module 330. The voltage-current converter 341 converts the loop current control signal in the form of voltage into a current signal, and then sends it to the current amplifier 342 for amplification, and obtains a loop current modulated with an AC HART current signal on the DC loop current, which is transmitted to the two-wire instrument through the instrument control loop. In this embodiment, the voltage-current converter 341 is a voltage-dividing resistor, and the current amplifier 342 is a Darlington tube working in the amplification area. When the loop current control signal flows through the voltage-dividing resistor, a current matching the loop current control signal is obtained, and its intensity is at the microampere level, about 0 to 250uA±5uA. Then, after the current is amplified 100 times by the Darlington tube, a milliampere-level loop current is obtained. Considering the power consumption of the instrument itself, the final loop current is about 4 to 25mA±0.5mA. The design of reducing the consumption of each level of circuits inside the two-wire instrument to the microampere level can effectively reduce power consumption. The amplitude of the DC voltage control signal determines the magnitude of the DC loop current. The voltage amplitude of the HART control signal determines the magnitude of the HART current signal. The DC loop current and the HART current signal are superimposed to form the loop current.

[0062] See also Figure 6 The present invention also discloses a software decoding method using the above-mentioned two-wire HART instrument device based on software decoding, and a preferred embodiment thereof comprises the steps of:

[0063] Step S100: system initialization.

[0064] The power taking unit completes initialization first, and then the signal processing unit, the signal receiving unit and the signal sending unit are powered on and then complete initialization respectively.

[0065] Step S200, separating the HART current signal.

[0066] The signal receiving unit first separates the AC current signal from the instrument control loop using a DC blocking capacitor, and then separates the HART current signal through a first filter.

[0067] Step S300, demodulating the HART current signal.

[0068] The signal receiving unit uses the second voltage comparator to convert the data signal in the form of a square wave from the HART current signal and transmits it to the input capture module of the signal processing unit. The signal receiving unit uses the first voltage comparator to detect the carrier signal. If the carrier signal exists, the interrupt processing module of the signal processing unit is notified and the process proceeds to step S400. On the contrary, if the carrier signal is not detected, the process jumps to step S200.

[0069] Step S400, reading a data signal.

[0070] The signal processing unit responds to the interrupt of the interrupt processing module, reads the data signal from the input capture module, and then obtains the HART command data in the HART current signal.

[0071] Step S500, processing HART command data.

[0072] The signal processing unit processes the HART command data according to the HART protocol stack to obtain corresponding HART response data.

[0073] Step S601, generating a low voltage square wave according to the processing result.

[0074] The signal processing unit controls the first square wave generator in the signal sending unit to generate a low-voltage square wave, the width of which is determined by the HART response data.

[0075] Step S602, generating a high voltage square wave according to the processing result.

[0076] The signal processing unit controls the second square wave generator in the signal sending unit to generate a high-voltage square wave; the width of the high-voltage square wave is determined by the HART response data.

[0077] Because the high-voltage square wave is generated after the low-voltage square wave is generated, the high-voltage square wave will lag behind the low-voltage square wave.

[0078] Step S603: generating a HART control signal.

[0079] The second filter in the signal sending unit filters out high-frequency clutter in the leading low-voltage square wave and the lagging high-voltage square wave to form a HART control signal in the form of a sine wave.

[0080] Step S604: generating a DC voltage control signal.

[0081] The signal processing unit sends the loop control information in the form of pulse width modulation, and controls the pulse width modulation DC voltage output device in the signal sending unit to output a voltage signal of a specified amplitude. After the AC part of the voltage signal is filtered out by the third filter, a DC voltage control signal is formed.

[0082] Step S605: generating a loop current control signal.

[0083] The signal sending unit uses a signal synthesis module to superimpose the HART control signal and the DC voltage control signal to form a loop current control signal.

[0084] Step S606, generating a loop current.

[0085] The voltage-to-current converter in the signal transmission unit converts the loop current control signal in voltage form into a current signal, which is further amplified by the current amplifier in the signal transmission unit to obtain a new loop current, which is sent to the two-wire instrument through the instrument control loop. In the loop current, the HART current signal is modulated onto the DC loop current.

[0086] Step S700, the current HART circuit signal processing is completed, and the process jumps to step S20 to process the next HART current signal.

[0087] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A two-wire HART instrument device based on software decoding, characterized in that: It includes a signal processing unit, a signal receiving unit, a signal sending unit and a power taking unit; The signal processing unit is a microprocessor, powered by the power taking unit, and connected to the signal receiving unit and the signal sending unit; the signal receiving unit separates the HART current signal in the form of a sinusoidal current from the loop current on the instrument control loop, converts it into a digital signal in the form of a square wave, and sends it to the signal processing unit; the signal processing unit parses and obtains the HART response data according to the HART protocol, and generates loop control information according to the needs of instrument control; the signal sending unit first generates a new HART current signal according to the HART response data, and also generates a DC loop current according to the loop control information, and then modulates the HART current signal onto the DC loop current to form a new loop current, which is sent on the instrument control loop.

2. The two-wire HART instrument device based on software decoding as claimed in claim 1, characterized in that: The signal receiving unit comprises a signal separation module and a signal demodulation module; The signal separation module is a DC blocking capacitor, which is used to separate the AC current signal containing the HART current signal from the loop current and send it to the signal demodulation module; the signal demodulation module first further separates the HART current signal from the AC current signal, and then demodulates the carrier signal and the data signal, and sends them to the signal processing unit.

3. The two-wire HART instrument device based on software decoding as claimed in claim 2, characterized in that: The signal demodulation module includes a first filter, a first voltage comparator and a second voltage comparator; The first filter separates the HART current signal from the AC current signal according to the frequency difference; the first voltage comparator and the second voltage comparator receive the HART current signal simultaneously; the first voltage comparator detects the carrier signal in the HART current signal according to the set threshold voltage, and notifies the microprocessor after detecting the carrier signal; the second voltage comparator processes the HART current signal in a zero-crossing detection manner, converts the sine wave into a square wave, thereby forming the data signal, and sends it to the microprocessor.

4. The two-wire HART instrument device based on software decoding as claimed in claim 1, characterized in that: The signal sending unit comprises a signal modulation module, a loop control module, a signal synthesis module and a loop current generation module; The signal modulation module generates a HART control signal in the form of a sinusoidal voltage based on the HART response data; the loop control module generates a DC voltage control signal based on the loop control information; the signal synthesis module is an adding circuit composed of an operational amplifier; the HART control signal and the DC voltage control signal serve as two inputs of the operational amplifier, and a loop current control signal is formed at the output of the operational amplifier as the input of the loop current generation module; the loop current generation module, under the excitation of the loop current control signal, generates the loop current formed by the superposition of the HART current signal and the DC loop current.

5. The two-wire HART instrument device based on software decoding as claimed in claim 4, characterized in that: The signal modulation module is a first square wave generator, a second square wave generator and a second filter; The first square wave generator is controlled by the signal processing unit to generate a low-voltage square wave, and the second square wave generator is controlled by the signal processing unit to generate a high-voltage square wave; the low-voltage square wave and the high-voltage square wave are synthesized into a sine wave by the second filter to form the HART control signal.

6. The two-wire HART instrument device based on software decoding as claimed in claim 4, characterized in that: The loop control module includes a pulse width modulation DC voltage output device and a third filter; The loop control information from the signal processing unit is a pulse width modulation signal; the pulse width modulation DC voltage output device outputs different voltage signals under the control of the loop control information. After the voltage signal is filtered out of the AC component by the third filter, the DC voltage control signal is generated.

7. The two-wire HART instrument device based on software decoding as claimed in claim 4, characterized in that: The loop current generation module includes a voltage-to-current converter and a current amplifier; The voltage-to-current converter converts the loop current control signal into a current signal, which is then amplified by the current amplifier to form the loop current; the current amplifier is a Darlington tube.

8. The two-wire HART instrument device based on software decoding as claimed in claim 1, characterized in that: The power taking unit includes a DC voltage converter; the DC voltage converter is connected to the instrument control loop, takes power from the instrument control loop and converts it into a voltage matching the signal processing unit, and then serves as the power supply of the signal processing unit.

9. A software decoding method using the two-wire HART instrument device based on software decoding as claimed in claim 1, characterized in that: Contains steps: Step S10, the signal processing unit, the signal receiving unit, the signal sending unit and the power taking unit complete initialization; Step S20, the signal receiving unit separates the HART current signal from the instrument control loop; Step S30, the signal receiving unit detects the carrier signal and converts it into a data signal; the signal receiving unit sends the data signal to the input capture module of the signal processing unit; If the carrier signal exists, the interrupt processing module of the signal processing unit is notified, and the process proceeds to step S40; Otherwise, jump to step S20; Step S40, the signal processing unit responds to the interrupt input of the interrupt processing module, uses the input capture module to read the data signal, and obtains the HART command data in the HART current signal; Step S50, the signal processing unit processes the HART command data according to the HART protocol and generates the HART response data; Step S60, the signal processing unit uses the signal sending unit to modulate the HART response data onto the DC loop current in the form of a HART current signal to form a new loop current and send it to the instrument control loop; Step S70, complete the processing, jump to step S20, and process the next HART current signal.

10. The software decoding method of the two-wire HART instrument device based on software decoding as claimed in claim 9, characterized in that: In step S60, the step of the signal sending unit modulating the HART current signal includes the following sub-steps: Step S61, the signal processing unit controls the first square wave generator in the signal sending unit to generate an advanced low-voltage square wave; the width of the advanced low-voltage square wave is determined by the HART response data; Step S62, the signal processing unit controls the second square wave generator in the signal sending unit to generate a lagging high-voltage square wave; the width of the lagging high-voltage square wave is determined by the HART response data; Step S63, the leading low-voltage square wave and the lagging high-voltage square wave pass through a second filter in the signal sending unit to form the HART control signal in a sinusoidal wave form; Step S64, the signal processing unit sends the loop control information, which is converted by the pulse width modulation DC voltage outputter in the signal sending unit and passes through a third filter to generate the DC voltage control signal; Step S65, the signal synthesis module in the signal sending unit superimposes the HART control signal and the DC voltage control signal to form a loop current control signal; Step S66, the loop current control signal is converted into a current signal by the voltage-to-current converter in the signal sending unit, and then amplified by the current amplifier in the signal sending unit, and the HART current signal is modulated onto the DC loop current to obtain a new loop current.

Citation Information

Cited By

  • Multi-channel HART dynamic communication system

    CN120567633A