A remote calibration device for a toxic and harmful gas detection alarm
By using an optocoupler and a hardware interlocking circuit, combined with a digital-to-analog converter software fast-break logic and a thermal drift compensation algorithm, the communication instability and safety issues of toxic and harmful gas detectors in industrial sites are solved, enabling stable and safe remote calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN PROVINCE INST OF METROLOGY
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-09
AI Technical Summary
Existing toxic and harmful gas detectors suffer from problems such as unstable communication links, lack of fault-tolerant safety mechanisms, and sensor damage due to gas path control impacts during remote calibration in industrial settings.
A hardware interlocking circuit using an optocoupler to drive a power relay, combined with software fast-break logic for a digital-to-analog converter, achieves stability and security of the communication link through thermal drift compensation based on chip junction temperature and a linear weighted moving average filtering algorithm. A slope-limited gas path soft-start logic is used to protect the sensor, and a low-dropout linear voltage regulator circuit is used to reduce heat loss.
It achieves stability and security of communication links in complex industrial environments, prevents leakage of toxic and harmful gases, protects sensors from damage, and improves the continuity and safety of calibration operations.
Smart Images

Figure CN122176884A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas detection instruments and meters, specifically to a remote calibration device for a toxic and harmful gas detection alarm. Background Technology
[0002] In industrial production processes such as petrochemicals, coal chemicals, and pharmaceuticals, numerous gas detection alarms are typically installed at work sites to prevent safety accidents caused by leaks of toxic and harmful gases such as hydrogen sulfide and carbon monoxide. According to metrological verification regulations and safety production requirements, the electrochemical sensors in these instruments need to undergo regular zero-point calibration and range calibration to ensure the accuracy of the measurement data. Because gas detection alarms are often installed at heights, in confined spaces, or in explosive hazardous areas, traditional calibration methods usually require workers to carry gas cylinders and climb to the installation point for close-range operation, posing a risk of falls from heights and resulting in low work efficiency.
[0003] With the development of wireless communication technology, remote calibration devices based on wireless transmission are gradually replacing traditional manual climbing operations. These devices typically consist of a handheld control terminal and an execution terminal connected to a detector. Operators can control the execution terminal at a higher location via wireless signals from the ground to open the air path for calibration. However, in actual industrial applications, existing wireless calibration technologies still have certain limitations.
[0004] First, industrial sites contain numerous metal pipes, tower equipment, and high-power electromechanical equipment, creating a complex electromagnetic environment. Existing wireless calibration devices often directly utilize Received Signal Strength Indication (RSSI) to determine communication distance and link quality. However, the RSSI value of RF chips is susceptible to nonlinear drift due to ambient temperature changes, and exhibits severe fluctuations in densely packed metal areas with significant multipath effects. The lack of effective temperature compensation and filtering algorithms leads to frequent communication interruptions within the effective operating range, or misjudgments of a normal connection in unsafe areas with weak signals, impacting the continuity and safety of calibration operations.
[0005] Secondly, regarding safety design, existing equipment's gas circuit control largely relies on direct drive from the microcontroller's software logic levels. In the event of extreme faults such as program crashes, system freezes, or power failures, relying solely on a software watchdog reset may result in the gas circuit solenoid valve failing to close in time during the reset process. This control architecture, lacking physical hardware interlocks, does not conform to the fail-safe design principle. Once control failure occurs, continuous leakage of toxic standard gas could trigger secondary safety accidents.
[0006] Furthermore, existing gas distribution controls typically employ direct relay switching. The instantaneous introduction of high-pressure standard gas into the gas path can cause pressure surges on the thermal sensors inside the mass flow controller, potentially leading to zero-point drift or damage over time. Simultaneously, to meet explosion-proof requirements, the receiving terminal is usually installed within a sealed metal housing. Traditional linear regulated power supplies are inefficient, and the generated heat is difficult to dissipate, easily causing excessive temperature rise inside the housing, affecting the reliability of electronic components and the explosion-proof safety performance. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a remote calibration device for toxic and harmful gas detectors and alarms, which solves the problems of unstable communication links, lack of effective fault-tolerant safety mechanisms, and sensor damage caused by gas path control impacts during the calibration process of existing toxic and harmful gas detectors and alarms due to the complex industrial environment.
[0008] To achieve the above objectives, the present invention provides the following technical solution: a remote calibration device for a toxic and harmful gas detector alarm, comprising a transmitting terminal and a receiving terminal. The transmitting terminal generates calibration parameters containing gas concentration and flow information in response to user input, encapsulates these parameters into data frames, and transmits them wirelessly. The receiving terminal establishes a bidirectional wireless communication link with the transmitting terminal and connects to an external gas distribution device. The receiving terminal includes a second radio frequency module, a second main control module, and an interface module. The second radio frequency module receives data frames and provides feedback on the instantaneous received signal strength value. The second main control module determines the current communication safety status based on the instantaneous received signal strength value. When the communication safety status meets preset conditions, the second main control module parses the calibration parameters and sends control commands through the interface module to drive the gas distribution device to output standard gas; when the communication safety status does not meet preset conditions, the second main control module triggers a safety cutoff mechanism, causing the interface module to physically block the electrical drive circuit of the gas distribution device.
[0009] The interface module integrates a hardware safety interlock control circuit, which includes an optocoupler, a driver transistor, and a power relay connected in sequence. The safety enable control terminal of the second main control module is connected to the input terminal of the optocoupler, and the normally open contact of the power relay is connected in series to the electrical drive circuit of the gas distribution device. When the communication security status is determined to be unsatisfactory, the second main control module controls the safety enable control terminal to output a low level, causing the optocoupler to turn off and disconnecting the normally open contact of the power relay, thus physically cutting off the electrical drive circuit. The second main control module is also used to execute the digital-to-analog converter software quick-break logic. While the physical cut-off action is being executed, the analog output signal controlling the flow rate of the gas distribution device is forced to zero via software instructions.
[0010] The second main control module employs a multi-level filtering algorithm to process the instantaneous received signal strength value. First, it performs thermal drift compensation based on the chip junction temperature to obtain the real-time internal temperature of the receiving terminal. Based on a preset temperature compensation coefficient and a reference calibration temperature, it linearly corrects the instantaneous received signal strength value. Second, it establishes and maintains historical filtering state values. The corrected current frame signal strength value is compared with these historical state values; if the difference exceeds a sudden change threshold, the current data is discarded; otherwise, it is stored in a data buffer. Subsequently, a linear weighted moving average operation is performed on the data in the buffer, using a linearly increasing sequence as the weighting coefficients to calculate the filtered signal strength output value.
[0011] The second main control module is also used to calculate the communication link quality score, which is generated by weighted fusion based on the following parameters: the packet loss rate based on weighted sliding window statistics; the normalized value obtained after performing piecewise linear mapping processing on the hardware link quality indicator value output by the second radio frequency module; and the ratio of the standard deviation of the instantaneous received signal strength value in the most recent preset number of frames to the absolute value of the reference signal strength.
[0012] The second main control module employs a dual-threshold hysteresis decision mechanism when determining the communication security status. An access threshold and a disconnection threshold are set, with the access threshold being greater than the disconnection threshold. During the connection establishment phase, the decision logic requires the communication link quality score to continuously exceed the access threshold for a preset time before determining that the link quality meets the requirements. During normal operation, if the communication link quality score is detected to be lower than the disconnection threshold, the link is immediately determined to be faulty.
[0013] The preset conditions employ multi-condition and logic control. The communication security status is determined to meet the preset conditions only when the following three logic conditions are met simultaneously: First, the spatial location flag bit determined based on the electromagnetic wave attenuation characteristics is valid, that is, the output value of the filtered signal strength is greater than the preset spatial security threshold; second, the timeliness flag bit determined based on the watchdog mechanism is valid, that is, the data frame reception time interval has not exceeded the preset time limit; and third, the link status result calculated based on the dual threshold hysteresis decision logic is a valid connection status.
[0014] The second main control module executes a slope-limited soft-start logic for the gas path when sending control commands: the flow control command value is increased stepwise according to a preset incremental slope until the user-set target flow value is reached. In addition, the receiving terminal performs closed-loop leak detection after physically blocking the electrical drive circuit, continuously collecting real-time flow values fed back by the gas distribution device. If the absolute value of the flow exceeds a preset drift threshold and the duration reaches the confirmation time window, a mechanical leak fault is determined and an alarm is triggered.
[0015] The first power module of the transmitting terminal employs a low-dropout linear regulator circuit. The second power module of the receiving terminal is connected to an external DC power supply and uses a cascaded architecture of a buck switching regulator circuit and a low-dropout linear regulator circuit. The application payload of the data frame includes a command identifier, target concentration, target flow rate, and a safety heartbeat counter. The transmitting terminal generates a monotonically increasing heartbeat count value, and the receiving terminal verifies the data validity by comparing the current value with historical values.
[0016] This invention provides a remote calibration device for a toxic and harmful gas detection alarm. It has the following beneficial effects:
[0017] 1. This invention uses a hardware interlocking circuit of an optocoupler-driven power relay, combined with a software fast-break logic of a digital-to-analog converter, to construct a dual blocking mechanism at the physical and logical layers. When the communication link fails or the control system malfunctions, the device can forcibly cut off the electrical drive circuit of the gas distribution device and return the flow control signal to zero, thus achieving fault-oriented safety and preventing the continuous leakage of toxic and harmful gases under abnormal conditions.
[0018] 2. This invention implements a thermal drift compensation and linear weighted moving average filtering algorithm based on chip junction temperature, and combines multi-parameter fusion communication link quality scoring and dual-threshold hysteresis decision logic. With this technical means, the parameter drift of radio frequency devices in industrial high-temperature environments is corrected, signal fluctuations caused by electromagnetic interference are suppressed, the frequency of communication misjudgment and gas path mis-cutting caused by environmental noise is effectively reduced, and the continuity of calibration operations is ensured.
[0019] 3. This invention applies a slope-limited gas path soft-start logic and a two-stage cascaded power supply architecture. The soft-start logic avoids damage to the thermal sensor inside the mass flow controller by high-pressure gas impact through step-by-step incremental flow commands. The two-stage cascaded power supply architecture reduces heat loss during voltage conversion, meets the temperature rise limit requirements of explosive gas environments on equipment surface, and improves the safety and lifespan of the device in hazardous locations. Attached Figure Description
[0020] Figure 1 This is a system architecture diagram of the present invention;
[0021] Figure 2 This is a flowchart of the remote calibration control method of the present invention;
[0022] Figure 3 This is a comparison chart of communication signal quality processing according to the present invention;
[0023] Figure 4 This is a comparison diagram of the gas path soft-start control effect of the present invention.
[0024] Among them, 100 is the transmitting terminal; 110 is the input module; 120 is the display module; 130 is the first main control module; 140 is the first radio frequency module; 150 is the first power supply module; 200 is the receiving terminal; 210 is the second main control module; 220 is the second radio frequency module; 230 is the interface module; 240 is the second power supply module; and 300 is the gas distribution device. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Please see the appendix Figure 1 This invention provides a remote calibration device for a toxic and harmful gas detector alarm, including a transmitting terminal 100 and a receiving terminal 200. The transmitting terminal 100 and the receiving terminal 200 establish a bidirectional communication link through a wireless communication protocol based on the IEEE 802.15.4 standard, forming a point-to-point wireless control system.
[0027] The transmitting terminal 100 includes an input module 110, a display module 120, a first main control module 130, a first radio frequency module 140, and a first power supply module 150. The input module 110 is connected to the first main control module 130 and is used to collect gas concentration, flow rate, and on / off control parameters. The display module 120 is connected to the first main control module 130 and is used to display set parameters and operating status. The first radio frequency module 140 is connected to the first main control module 130 via an SPI bus and is used to send encapsulated data frames. The first power supply module 150 is connected to various power-consuming modules within the transmitting terminal 100.
[0028] The receiving terminal 200 includes a second main control module 210, a second radio frequency module 220, an interface module 230, and a second power supply module 240. The second radio frequency module 220 is connected to the second main control module 210 via an SPI bus and is used to receive radio frequency signals and output physical layer signal strength indicators. The second main control module 210 runs a communication protocol stack and a security interlocking algorithm, and is connected to the second radio frequency module 220 and the interface module 230. The interface module 230 is connected to an external gas distribution device 300 via a serial communication line. The second power supply module 240 is connected to various power-consuming modules within the receiving terminal 200.
[0029] Please see the appendix Figure 2 The specific operating principle of the above components is as follows:
[0030] S10, the transmitting terminal 100 generates calibration parameters in response to user input, the first main control module 130 encapsulates the calibration parameters and heartbeat identifier into a data frame, and transmits it through the first radio frequency module 140 at a preset period.
[0031] S20, the second radio frequency module 220 of the receiving terminal 200 receives the data frame and feeds back the instantaneous received signal strength value to the second main control module 210.
[0032] S30, the second main control module 210 performs time-domain sliding filtering on the received signal strength value, calculates the communication link quality margin, and determines the current communication security status in conjunction with the data frame reception time interval.
[0033] S40, when the communication security status meets the preset conditions, the second main control module 210 parses the calibration parameters and sends control commands to the gas distribution device 300 through the interface module 230, driving the gas distribution device 300 to output standard gas.
[0034] S45, slope-limited gas path soft-start control:
[0035] When the communication security condition is met and the relay is engaged, the second main control module 210 does not directly send the full-range flow setpoint to the gas distribution device 300. To prevent the instantaneous impact of high-pressure gas from damaging the thermal sensor inside the mass flow controller, the second main control module 210 executes soft-start logic: the DAC output voltage or flow control command is increased in steps according to a preset slope (e.g., 100 SCCM / s) until the user-set target flow value (FLOW_SET) is reached. This process not only protects the precision gas circuit components but also avoids overshoot oscillations in the initial stage of gas circuit setup, ensuring the output stability of the calibration gas.
[0036] S50, when the communication security status does not meet the preset conditions, the second main control module 210 triggers the hardware interrupt logic and forcibly blocks the gas path control signal of the gas distribution device 300 through the interface module 230.
[0037] The microcontroller's Safe_EN pin is connected to the anode of an optocoupler (e.g., PC817), and the collector of the optocoupler is connected to the base of an NPN-type driver transistor (e.g., 8050). The coil of the power relay is connected in series between the 24V power supply and the transistor collector, with a freewheeling diode (e.g., 1N4007) connected in reverse parallel across the coil. The normally open contact (NO) of the relay is connected in series in the solenoid valve power supply circuit of the gas distribution unit 300. This circuit diagram visually illustrates the physical implementation of strong and weak current separation and fault-oriented safety.
[0038] In this embodiment, both the first main control module 130 and the second main control module 210 employ STM32F103ZBT6 microcontrollers. The "logic control center" of the terminal (transmitter terminal 100 or receiver terminal 200) controls the state machine transitions of the RF transceiver chip through preset timing logic, achieving switching from sleep / idle to receive or transmit states. The first RF module 140 and the second RF module 220 employ CC2420 or similar RF transceiver chips, which are responsible for physical layer analog-to-digital / digital-to-analog conversion, channel encoding / decoding, and spread spectrum / despreading processing.
[0039] The microcontroller and the RF transceiver chip establish a communication link via a high-speed synchronous serial bus (SPI). The specific connections are as follows: the microcontroller's SPI clock output pin is connected to the RF transceiver chip's SCLK pin; the microcontroller's SPI master data output pin is connected to the RF transceiver chip's SI pin; the microcontroller's SPI master data input pin is connected to the RF transceiver chip's SO pin; and a general-purpose I / O pin of the microcontroller is connected to the RF transceiver chip's chip select pin CSn. During physical layer communication, the microcontroller acts as the SPI master, selecting the RF chip through a low-level active signal on the CSn pin, and, according to the clock polarity and phase requirements specified in the datasheet, synchronously with the SCLK clock signal, writes configuration commands and reads the status register.
[0040] To support the hardware implementation of real-time communication quality monitoring and safety interlocking functions in this remote calibration device, a hardware interrupt-triggered architecture is adopted in the circuit design. The FIFO (Receive Buffer Not Empty), FIFOP (Receive Buffer Threshold Reached), and SFD (Start of Frame Delimiter) status pins of the RF transceiver chip are connected to the external interrupt input pins of the microcontroller. The hardware operation principle is as follows: when the RF front-end detects the carrier signal and successfully synchronizes the preamble, the SFD pin generates a level transition; when the demodulated data fills the internal buffer, the FIFO and FIFOP pins are set sequentially. This hardware connection method enables the microcontroller to respond to physical layer communication events in real time through interrupt service routines, thereby initiating subsequent signal quality analysis processes within a microsecond timescale.
[0041] Considering that the receiving terminal 200 is typically installed inside an explosion-proof enclosure made of metal, to avoid the shielding effect of the metal enclosure on the radio frequency signal, the second radio frequency module 220 in this embodiment is connected to an external rod-shaped adhesive antenna via an IPEX radio frequency coaxial cable. This antenna is led out through a sealed connector on the explosion-proof enclosure and is equipped with an intrinsically safe impedance matching circuit, ensuring effective signal radiation while complying with the radio frequency energy limitation requirements of the GB3836 explosion-proof electrical standard.
[0042] Regarding the principle of Received Signal Strength Indicator (RSSI) acquisition, the RF transceiver chip integrates a digital RSSI indicator. In receive mode, the chip's intermediate frequency amplifier and demodulation circuit continuously monitor the RF energy within the channel. By averaging the received power over eight consecutive symbol cycles, an 8-bit linear logarithmic power value is generated and stored in the internal RSSI register. The microcontroller reads this register value via the SPI interface as a physical basis for assessing the current electromagnetic environment and communication distance.
[0043] The carrier frequency configuration of the wireless communication link conforms to the IEEE 802.15.4 standard, and the operating frequency is... With physical channel number The correspondence is determined by the following formula:
[0044] ;
[0045] in:
[0046] This indicates the center frequency of the carrier wave, measured in megahertz (MHz).
[0047] This represents the logical channel number, and its value range is limited to the integer interval [11, 26].
[0048] In the formula, the constant 2405 is the starting frequency reference value, and the constant 5 is the channel spacing bandwidth. To ensure that the deviation between the actual transmission frequency and the calculated frequency meets the communication standard requirements, the frequency tolerance range of the external crystal oscillator of the RF transceiver chip is limited to within ±40ppm.
[0049] In terms of electromagnetic compatibility design, a decoupling network consisting of a small-capacity high-frequency capacitor and a large-capacity energy storage capacitor is connected in parallel immediately adjacent to the power input pin of the RF transceiver chip to filter out high-frequency switching noise. For the selection of external resistors, capacitors, and inductors for the microcontroller and RF transceiver chip, those skilled in the art can implement the selection based on the reference circuits provided in the chip's technical datasheet.
[0050] The power-on initialization process of the core control and radio frequency unit includes the following steps:
[0051] S210, microcontroller power-on reset, configures the microcontroller clock tree to provide the clock source required by the SPI peripheral, and configures the I / O port connected to the RF chip as multiplexed push-pull output or floating input mode;
[0052] S220: The microcontroller controls the voltage regulator enable pin VREG_EN of the RF transceiver chip to be high and keeps the reset pin RESETn low for a preset time until the external crystal oscillator starts oscillating and stabilizes.
[0053] The S230 microcontroller writes a configuration word via the SPI bus to enable the automatic gain control (AGC) and correlator functions of the receive link, and sets the RSSI sampling mode to automatic update to ensure that the data read each time is the real-time channel quality at the moment of receiving the current data frame.
[0054] In this embodiment, the input module 110 and the display module 120 constitute the human-machine interface of the transmitter terminal 100. Their physical connection is intended to realize the localized configuration of calibration parameters and the visual monitoring of the operating status of the transmitter terminal 100.
[0055] Input module 110 includes a matrix keyboard circuit, which is electrically connected to the first main control module 130 through a general-purpose input / output port. This matrix keyboard circuit adopts a row-column scanning architecture, consisting of four rows of scan lines and four columns of detection lines orthogonally arranged, with mechanical keys positioned at the intersections, forming a total of 16 independent input nodes. The row scan lines are connected to the output ports of the first main control module 130, configured in push-pull output mode; the column detection lines are connected to the input ports of the first main control module 130, configured in pull-up input mode (i.e., internally connected to pull-up resistors to a logic high level).
[0056] In terms of the functional definition of the physical buttons, the button logic partitions in the matrix keypad include a function selection area, a value adjustment area, and a command confirmation area. The function selection area has corresponding physical buttons to trigger the switching of the "concentration setting," "flow rate setting," and "time setting" states; the value adjustment area has "value increment" and "value decrement" buttons for step-by-step adjustment of the parameter values in the current register; the command confirmation area has "confirm / send" and "emergency stop" buttons, wherein the "emergency stop" button is connected to the external interrupt pin of the first main control module 130 and is configured with the highest interrupt priority, used to directly trigger the shutdown logic in emergency situations, bypassing the software loop.
[0057] The first main control module 130 runs a key scanning algorithm, periodically outputting low-level signals to the row scan lines and simultaneously reading the level status of the column detection lines. When a column is detected to be low, it indicates that a key is closed between that column and the row currently outputting a low level. To eliminate the jitter interference generated during the moment of mechanical contact closure, the first main control module 130 executes software debouncing logic: after detecting a level change, a delay counter with a duration of 10 to 20 milliseconds is started, and the port level is sampled again after the delay. If the level status remains unchanged, it is determined to be a valid key action, and the physical coordinates are mapped to a predefined key value code.
[0058] Display module 120 employs a thin-film transistor liquid crystal display (TFT-LCD) module with a serial peripheral interface. The signal lines of display module 120 include a clock line SCLK, a data transmission line MOSI, a chip select line CS, a data / command select line DC, and a reset line RST. These signal lines are respectively connected to the corresponding GPIO ports of the first main control module 130. The backlight anode of display module 120 is connected to the timer output channel of the first main control module 130 via a driving transistor. The first main control module 130 adjusts the effective voltage average value by changing the duty cycle of the output pulse signal, thereby linearly adjusting the backlight brightness within the range of 0% to 100% to adapt to different ambient lighting environments and optimize battery life.
[0059] The screen display area of the display module 120 is logically divided into a parameter setting area, a real-time status area, and a communication quality indicator area. The parameter setting area is used to display the target gas concentration value (unit: ppm) and flow rate value (unit: SCCM) set by the user; the communication quality indicator area is directly associated with the register value read by the first radio frequency module 140, and dynamically displays the signal strength level of the current link in a graphical manner.
[0060] The first main control module 130 has a parameter register structure allocated in its internal volatile memory for temporarily storing calibration task data to be sent. Based on the above display partition layout and internal data storage structure, the specific execution logic of human-computer interaction includes the following steps:
[0061] S310, the first main control module 130 is in standby scanning state. When a valid key action of the input module 110 is detected, the display module 120 will switch from low power sleep mode to working mode and enter the parameter configuration subroutine.
[0062] S320, in response to the user's numerical adjustment operation, the first main control module 130 performs addition and subtraction operations on the corresponding value in the parameter register structure, and immediately writes the updated character pattern data to the display module 120's display memory (GRAM) through the SPI interface, so as to realize the synchronous refresh of internal data and display interface;
[0063] S325, Parameter Compliance Self-Check: Before encapsulating data, the first main control module 130 automatically compares the values in the parameter register with preset safety thresholds (e.g., concentration range 0-100ppm, flow rate range 0-1000SCCM). If the input value exceeds the range, the first main control module 130 will refuse to execute the sending command and display an error message "Parameter Out of Limit" through the display module 120, forcing the user to re-enter the value, thus preventing gas mixing abnormalities caused by human error from the source.
[0064] S330 When the "Confirm / Send" key is detected to be pressed, the first main control module 130 locks the current parameter register value and calls the protocol stack function to encapsulate it into the payload of the data frame, and then notifies the first radio frequency module 140 to start the transmission process.
[0065] In this embodiment, the interface module 230 serves as the physical connection unit between the second main control module 210 and the external gas distribution device 300, integrating a serial data transmission circuit and a hardware safety interlock control circuit. This circuit design aims to resolve the compatibility issue between the logic level of the low-voltage microcontroller and the interface level of industrial field equipment, and provides a physical-level emergency cutoff mechanism independent of the communication protocol layer.
[0066] The serial data transmission circuit mainly consists of a level conversion chip and its peripheral charge pump circuit. Given that the Universal Asynchronous Receiver / Transmitter (USART) port of the second main control module 210 operates at a 3.3 VTL logic level, while the data communication port of the gas distribution device 300 conforms to the RS-232 standard (logic "0" corresponds to +3V to +15V level, and logic "1" corresponds to -3V to -15V level), a MAX3232 level conversion chip with a wide voltage range is used in the circuit to achieve bidirectional signal conditioning.
[0067] The connections are as follows: The data transmission pin TXD of the second main control module 210 is connected to the TTL input of the level conversion chip, and the data reception pin RXD is connected to the TTL output of the level conversion chip. The RS-232 side output and input pins of the level conversion chip are connected to pins 2 and 3 of the standard DB9 physical interface, respectively. The level conversion chip integrates a dual charge pump power supply circuit, and 0.1 microfarad CBB capacitors are connected to its external power supply pins and charge pump pins.
[0068] The hardware safety interlock control circuit is a key hardware entity supporting the "intrinsically safe" technical feature in this embodiment. Electrically independent of the serial data transmission path, this circuit consists of an optocoupler, a driver transistor (or MOSFET), and a power relay. The second main control module 210 designates a general-purpose I / O pin as the "safety enable control pin (Safe_EN)," which is connected to the input of the optocoupler. To prevent false triggering during power-on reset or initialization due to the pin being in a high-impedance floating state, a 10kΩ pull-down resistor is connected in parallel between the Safe_EN pin and ground (GND). This pull-down resistor physically ensures that the input of the optocoupler is always clamped to a low level (off state) before the logic circuit establishes a defined state.
[0069] To prevent strong electromagnetic interference or ground potential fluctuations from the gas distribution unit 300 in the industrial field from coupling to the microcontroller via signal lines, an optocoupler isolator provides electrical isolation between the control side (MCU) and the drive side (relay). Its working principle involves cutting off the common ground loop on both sides based on the optical signal transmission control state, thereby effectively suppressing common-mode interference. The output side of the optocoupler is connected to the base of the drive transistor (or the gate of the MOSFET), and the drive transistor is connected to the coil circuit of the power relay. The normally open contact of the power relay is connected in series to the 24V power supply bus circuit of the solenoid valve group in the gas distribution unit 300.
[0070] The control logic of this hardware architecture follows the "fail-safe" principle, as follows:
[0071] In S410, during the power-on reset phase of the receiving terminal 200, when the microcontroller malfunctions (IO port high impedance), or when the Safe_EN output is low, the optocoupler is in the off state, the driving transistor is turned off, and no current flows through the power relay coil. Due to the restoring force of the internal mechanical spring of the relay, its normally open contact remains physically open. At this time, the power supply circuit of the solenoid valve in the gas distribution device 300 is forcibly cut off, and the valve resets to the closed state under the spring force, physically preventing continuous leakage of toxic gas due to the failure of the logic control function of the receiving terminal 200.
[0072] S420: The Safe_EN pin outputs a high level, the optocoupler is turned on, the driving transistor is saturated and turned on, the power relay is energized, the normally open contact is closed, and the solenoid valve power supply circuit is connected, all only when the algorithm of the second main control module 210 determines that the communication link is in the safe zone. At this time, the gas distribution device 300 can respond to the flow control command received through the serial port.
[0073] To prevent the reverse electromotive force generated when the relay coil is de-energized from damaging the drive transistor, a freewheeling diode is connected in reverse parallel across the coil. Furthermore, a transient voltage suppressor (TVS) diode is installed at the physical connector of the communication interface to protect sensitive downstream circuitry.
[0074] In this embodiment, the transmitting terminal 100 adopts a portable independent power supply architecture. The power input stage consists of three standard AA alkaline dry batteries connected in series, providing a nominal DC input voltage of 4.5V. Considering the discharge characteristics of dry cell batteries, their terminal voltage exhibits a non-linear decreasing trend as the electrochemical reaction proceeds. Therefore, the power supply regulation circuit is configured to maintain the stability of the output voltage over a wide input voltage range.
[0075] A Schottky diode is connected in series in the power input circuit. This diode, due to its unidirectional conductivity, prevents damage to subsequent circuits from reverse battery polarity, and the Schottky junction has a low forward voltage drop. The typical value is approximately 0.3V. The core voltage regulator of the power management module is the TPS76833 low-dropout linear regulator (LDO). The input terminal (IN) of this device is connected to the cathode of a Schottky diode, and the output terminal (OUT) provides a constant 3.3V DC operating voltage to the internal circuitry of the transmitter terminal 100. In terms of specific circuit implementation parameters, the input terminal of the TPS76833 is connected in parallel with ground to a 10 microfarad (µF) circuit. Tantalum capacitors are used to provide transient current and reduce input source impedance.
[0076] The output capacitor configuration adopts a parallel composite structure of "tantalum capacitor + multilayer ceramic capacitor":
[0077] A 10 microfarad tantalum capacitor and a 0.1 microfarad multilayer ceramic capacitor (MLCC).
[0078] This configuration has specific frequency response characteristics:
[0079] The ESR characteristics of tantalum capacitors ensure the stability of the LDO feedback loop, while ceramic capacitors filter out high-frequency switching noise from the RF module.
[0080] The critical input voltage condition for normal operation of the transmitting terminal 100 is defined by the following physical formula:
[0081] ;
[0082] in:
[0083] This is the minimum cutoff voltage that allows the battery pack to maintain a regulated output.
[0084] The operating voltage set for the transmitting terminal 100 is fixed at 3.3V in this embodiment;
[0085] For the linear regulator at the current load current The input-output voltage difference is less than 0.5V under maximum load for the TPS76833.
[0086] To prevent the forward voltage drop of the Schottky diode in reverse connection, the first power module 150 can maintain a stable output of 3.3V even if the total battery voltage drops below approximately 4.1V, according to the formula above. Compared to traditional voltage regulators, this circuit design widens the effective operating voltage range of the battery.
[0087] In this embodiment, the receiving terminal 200 is configured as a fixed online monitoring device, and the second power module 240 adopts a two-level cascaded architecture of "step-down switching regulator + low dropout linear regulator".
[0088] The primary input port of the second power module 240 is connected to an external 24V DC bus via industrial terminal blocks. This 24V power supply is divided into two independent branches at the board level: the first branch is directly wired to the common terminal of the power relay in the communication interface circuit, which is used to provide drive power for the high-power solenoid valve and mass flow controller in the gas distribution device 300; the second branch is connected to the internal power management circuit of the receiving terminal 200.
[0089] In the first-stage voltage conversion stage, the circuit uses a DC-DC5S20 or equivalent buck switching regulator module. The input pins of the buck switching regulator module ( Connect to the 24V DC bus, output pin ( It outputs a 5V intermediate DC voltage. The step-down switching regulator module operates based on high-frequency switching action (typical switching frequency). The high-voltage DC is chopped at approximately 300 kHz, and energy is reconfigured based on the energy storage inductor and capacitor.
[0090] To verify the optimization effect of the architecture in this embodiment on the thermal power consumption of the receiving terminal 200, the maximum load current of the receiving terminal 200 is set to... If the traditional linear voltage regulator method is used to directly convert 24V to 3.3V, according to the power dissipation principle of linear regulators, the heat loss power on its linear regulating tube will be significant. The calculation is as follows:
[0091] ;
[0092] The above calculations show that in linear mode, the voltage difference across the linear regulator tube reaches as high as 20.7V, causing over 85% of the input energy to be converted into heat and dissipated, which is unacceptable within an explosion-proof enclosure. In contrast, this invention utilizes the high conversion efficiency characteristics (efficiency) of switching regulators. This significantly reduces heat loss during the first-stage pressure drop process.
[0093] The second-stage voltage conversion stage uses a TPS76833 low-dropout linear regulator. An inductor is connected in series between the first-stage output and the second-stage input. and two capacitors , Composition A type LC filter network. This filter network has bidirectional filtering characteristics: on the one hand, it attenuates the high-frequency ripple voltage generated by the switching regulator, and on the other hand, it prevents the load transient noise of the subsequent RF circuit from being reverse-coupled to the previous stage.
[0094] Cutoff frequency of the type filter network The design must meet the following engineering constraints to ensure effective attenuation of switching noise:
[0095] ;
[0096] in:
[0097] The value of the filter inductance ranges from 10 microhenries to 47 microhenries.
[0098] , This is the value of the filter capacitor;
[0099] This refers to the operating switching frequency of the pre-stage switching regulator.
[0100] The power-on voltage regulation timing logic of the second power module 240 is as follows:
[0101] When the 24V bus is powered on, the switching regulator of S610 starts up and the output voltage rises slowly to 5V under the action of the LC filter network.
[0102] S620: Once the 5V voltage is established and exceeds the undervoltage lockout threshold of the linear regulator, the TPS76833 starts outputting a 3.3V voltage.
[0103] When the 3.3V output voltage reaches 95% or more of its nominal value, the internal comparator of the TPS76833 flips, the PG pin is released from its low-level lockout, the microprocessor's RESET pin is pulled high by the pull-up resistor, and the second main control module 210 is released from its reset state and begins executing initialization code. This hardware timing logic ensures that the microprocessor only operates when the power supply voltage is stable.
[0104] In this embodiment, wireless communication follows the IEEE 802.15.4 physical layer standard, and a proprietary protocol stack customized for industrial safety calibration scenarios is used in the data link layer and application layer.
[0105] The transmission unit of a communication data frame on the physical channel is the Physical Layer Protocol Data Unit (PPDU), whose total length is limited to 127 bytes. Structurally, this data frame consists of three parts in sequence: the Synchronization Header (SHR), the Physical Layer Header (PHR), and the Physical Layer Service Data Unit (PSDU). The Synchronization Header contains a preamble sequence and a Start-of-Frame Delimiter (SFD).
[0106] The Physical Layer Service Data Unit (PSDU) carries Media Access Control (MAC) and application layer data. Its internal fields are defined sequentially as: Frame Control Field (FCF), Data Sequence Number (DSN), Destination Personal Area Network Identifier (DestPANID), Destination Address (DestAddr), Application Payload, and Frame Check Sequence (FCS). The Data Sequence Number occupies 1 byte and is maintained by the transmitting terminal 100 using an 8-bit cyclic counter (0-255). The receiving terminal 200 uses the continuity of this sequence number to calculate the packet loss rate (PER).
[0107] The application payload field is the carrier for implementing remote control functions. Its length is fixed at 6 bytes in this embodiment, and its specific definition is as follows:
[0108] Command Identifier (CMD_ID): Occupies 1 byte. Define 0xA1 as "Start Calibration / Normal Operation", 0xF0 as "Emergency Stop", and 0x00 as "Idle / Heartbeat Hold".
[0109] Target concentration value (CONC_SET): Occupies 2 bytes, stored in big-endian mode, representing the set concentration value of the standard gas, and the unit of quantification is ppm.
[0110] Target flow rate (FLOW_SET): Occupies 2 bytes and represents the set flow rate of the mass flow controller, quantified in standard milliliters per minute (SCCM).
[0111] Security Heartbeat Counter (HB_CNT): Occupies 1 byte. This field is generated by the transmitting terminal 100 using an internal timer to create a monotonically increasing random number sequence each time a packet is assembled. The receiving terminal 200, during parsing, will use the currently received HB... CNT If the new value is compared with the historical value and is less than or equal to the old value (considering overflow and wraparound), it is determined to be a replay attack or expired data and is discarded.
[0112] The Frame Check Sequence (FCS) occupies 2 bytes and is located at the end of the PSDU. This sequence uses a 16-bit Cyclic Redundancy Check (CRC-16-CCITT) algorithm, with a check generator polynomial. Defined as:
[0113] ;
[0114] in, Let be the variable (undetermined element) of the polynomial, whose power corresponds to the bit position of the binary data stream in the shift register. The binary coefficient sequence corresponding to this polynomial is 10001000000100001.
[0115] The communication protocol processing and physical layer interaction process includes the following steps:
[0116] S710, data encapsulation and verification calculation: the first main control module 130 of the transmitting terminal 100 collects sensor parameters and heartbeat counts, constructs the application payload, and calculates and fills in the 16-bit FCS check code.
[0117] The S720, Direct Sequence Spread Spectrum Transmitter, has a first radio frequency module 140 that receives digital bit streams. It employs Direct Sequence Spread Spectrum (DSSS) technology to map each data bit into a set of 32-chip pseudo-random noise sequences (PN codes), extending the signal spectrum to a 2MHz bandwidth and enhancing anti-interference capabilities.
[0118] S730, receiving processing and quality metadata extraction: The second RF module 220 of the receiving terminal 200 locks the signal according to the preamble and despreads and demodulates it. When the RF chip successfully receives a frame of data, it automatically appends two bytes of physical layer metadata after the PSDU data: the first byte is the Received Signal Strength Indicator (RSSI), and the second byte contains the Link Quality Indicator (LQI) and the CRC check pass flag.
[0119] In this embodiment, the second main control module 210 of the receiving terminal 200 runs the filtering algorithm to eliminate instantaneous jitter in signal strength and extract low-frequency signal components that reflect changes in the actual physical distance between the transmitting and receiving ends.
[0120] The specific execution logic of the algorithm includes the following steps:
[0121] S810, physical quantity conversion: After the second RF module 220 generates a receive interrupt and confirms the validity of the data packet via CRC check, it reads the RSSI register value from the physical layer metadata. The transformation follows the following linear relationship:
[0122] ;
[0123] in:
[0124] This indicates the actual received power of the current frame, in dBm.
[0125] This indicates the raw value (typically an 8-bit integer) of the received signal strength indicator read from the chip's internal register during the reception of a data frame by the second radio frequency module 220.
[0126] This is the inherent bias constant of the receiving loop, with a value of -45 (this value is determined by the gain and loss characteristics of the RF front-end circuit).
[0127] The S815, based on chip junction temperature, provides RSSI thermal drift compensation. This addresses the issue that changes in industrial ambient temperature can cause non-linear gain drift in the RF front-end circuitry, affecting the accuracy of distance determination. The second main control module 210 obtains the current internal ambient temperature of the receiving terminal 200 via an on-chip integrated temperature sensor or by reading the internal temperature register of the RF chip. Based on the preset temperature compensation coefficient (e.g., 0.15 dB / ℃), for Make corrections:
[0128] ;
[0129] in, This represents the received power after temperature compensation. This is the reference temperature (e.g., 25°C) used during the equipment's factory calibration. Subsequent filtering and distance calculations are based on this corrected temperature. This process eliminates spatial ranging errors introduced by environmental temperature differences.
[0130] S820, a motion-constrained amplitude limiting filter, sets a sudden change threshold. The currently calculated result Compare with the filtered output value from the previous time step: if the difference is... If the current data is a transient disturbance, it is determined to be discarded and the value from the previous moment is reused; otherwise, it is determined to be a transient disturbance. Store it at the tail of the buffer queue.
[0131] S830, Linear Weighted Moving Average (LWMA), for the buffer... The data points are weighted and calculated. The formula is as follows:
[0132] ;
[0133] in:
[0134] For a moment The filtered signal strength output value;
[0135] The length of the sliding window is taken in this embodiment. ;
[0136] This is the index number of the data point in the buffer, and its value ranges from 1 to... Integers;
[0137] For the first in the buffer Data stored in each location;
[0138] The weighting coefficients are linearly increasing sequences. .
[0139] The correlation model between link quality score and communication distance adopts a weighted fusion mechanism to generate a normalized link quality score (LQS).
[0140] S910, based on weighted sliding window packet loss rate (PER) statistics, the second main control module 210 maintains a length of [value missing] in memory. The historical state shift register. Whenever a data frame is received or a communication timeout occurs, the current frame state is determined. A weighted moving average algorithm is used to calculate the current packet loss rate. :
[0141] ;
[0142] in:
[0143] This represents the length of the historical state shift register (i.e., the size of the statistical window), which is 20 in this embodiment;
[0144] This is the index number of the data bit in the register, with a value ranging from 1 to... ;
[0145] For the first The frame error status bit is set to 1 for packet loss or checksum error, and 0 for normal reception.
[0146] For weighting coefficients, when hour, ;when hour, .
[0147] S920, linearization of Hardware Link Quality Indicator (LQI), converts the original value... Perform piecewise linear mapping to obtain normalized values. :
[0148] ;
[0149] in:
[0150] The normalized link quality score (range 0.0 to 1.0).
[0151] The raw link quality indication value (input variable) output by the second radio frequency module 220;
[0152] The saturation threshold is set to 105 in this embodiment (meaning that the signal is considered to be excellent when the LQI is higher than this value).
[0153] The cutoff threshold is set to 50 in this embodiment (meaning that the signal is considered unusable when the LQI is below this value).
[0154] S930, the comprehensive link quality score is calculated using the following formula:
[0155] ;
[0156] in:
[0157] The calculated overall link quality score;
[0158] The normalized link quality indicator value calculated in step S920;
[0159] The current packet loss rate calculated in step S910;
[0160] As the weighting coefficient, this embodiment takes... ;
[0161] This is the fluctuation penalty coefficient, with a value of 0.2;
[0162] The standard deviation of the received signal strength values in the most recent 10 frames;
[0163] The absolute value of the reference signal strength is set to 90 in this embodiment.
[0164] S940, dual-threshold hysteresis decision logic, calculated as follows Used to drive the safety interlock state machine. Sets the access threshold. With disconnect threshold .
[0165] If currently in "safe disconnection" state: only if continuously calculated A connection is allowed to be established if the duration exceeds 500 milliseconds.
[0166] If currently in "normal working" state: Detected If the link fails, the relay release action is triggered immediately without delay.
[0167] S1010, Spatial location discrimination based on electromagnetic wave attenuation characteristics, spatial safety threshold. The calculation formula is as follows:
[0168] ;
[0169] in:
[0170] This represents the preset spatial safety threshold (i.e., the lower limit of the received signal strength), in dBm.
[0171] The transmission power is set to 0 dBm in this embodiment;
[0172] This represents the total gain of the transmit and receive antennas, with a value of -2dBi.
[0173] For reference distance The path loss at 1 meter is approximately 40 dB;
[0174] The path loss index is taken as an empirical value of 3.0;
[0175] The maximum safe operating distance is set at 3 meters in this embodiment;
[0176] The shadow fading margin is set to 10 dB in this embodiment.
[0177] Based on this estimate, this embodiment sets It is -65dBm.
[0178] like Then the space allow flag bit ;otherwise .
[0179] S1020, based on the timeliness determination of the watchdog mechanism, the second main control module 210 starts the overflow cycle. This is a 200ms software watchdog timer. It is reset whenever a valid heartbeat is received. If the timer overflows, the expiration enable flag will be reset. Set to 0.
[0180] S1030, multi-condition and logic control, final hardware driver enable signal The logic is as follows:
[0181] ;
[0182] in:
[0183] This is the logic control signal that is ultimately output to the power drive circuit (active high, inactive low).
[0184] This refers to the space allowance flag bit calculated in step S1010;
[0185] This refers to the timeliness permission flag generated based on the watchdog mechanism in step S1020;
[0186] The comprehensive link quality score calculated in step S930;
[0187] The disconnection threshold set in step S940 (in this embodiment, the value is 0.40).
[0188] It represents the logical AND operation.
[0189] S1040, based on fail-safe physical disconnection, The signal is connected to the power drive circuit. When When the voltage is high, the relay coil is energized and engages, supplying power to the solenoid valve. If any safety condition is not met, it will cause... When the level is low, the relay coil is de-energized, the physical contacts open, and the actuator resets to the normally closed state.
[0190] S1110, interrupt priority handling for abnormal events, Level 1 (shutdown fault): includes communication watchdog overflow, spatial location out-of-bounds, and hardware emergency stop signals. Triggers a non-maskable interrupt (NMI), and the receiving terminal 200 enters the reset procedure.
[0191] S1120, based on DAC software instantaneous interruption using response time difference, ensures that at the instant a shutdown fault is triggered, the second main control module 210, with a microsecond-level instruction execution speed, first resets the control output of the digital-to-analog converter (DAC) to zero. Specifically, the microcontroller, upon capturing the abnormal interrupt,... Immediately write 0 to the value of the DAC data register, causing the DAC output voltage to... During the mechanical delay period before the relay contacts actually open, it is forced to clamp to 0V (i.e., "off" level), thereby driving the mass flow controller to shut down in advance.
[0192] S1130, based on the physical power-off reset characteristic of normally closed valves, ensures that in the power-off state, the normally closed solenoid valve in the gas distribution device 300 is controlled by the preload pressure of an internal mechanical spring. This preload pressure is designed to be greater than the sum of the reverse thrust and frictional force generated by the maximum operating gas pressure of the gas distribution device 300. Therefore, as long as the power supply is cut off, regardless of the internal pressure of the gas circuit, the valve core will automatically reset to a tightly closed state under the action of mechanical force, achieving physical fail-safe operation.
[0193] S1140, closed-loop leak detection and audible / visual alarm: after the reset action is executed, the second main control module 210 detects the feedback signal from the flow sensor. .
[0194] like And duration If the flow rate drift threshold is not met, it is considered a "serious leak". In this embodiment, the flow rate drift threshold is... The setting is 10 SCCM (standard milliliters / minute), and the confirmation time Tconfirm is set to 5 seconds. This parameter setting can sensitively detect minute leaks and filter out false alarms caused by initial transient fluctuations in airflow based on the time window. Once a leak is confirmed, the receiver 200 will trigger an audible and visual alarm to prompt the operator to manually close the main gas supply valve.
[0195] Specific application examples:
[0196] This embodiment is applied to the quarterly calibration scenario of hydrogen sulfide detectors in the desulfurization workshop of a large oil refinery (which belongs to Zone II of explosive gas atmosphere as specified by national standards). The on-site configuration includes: a handheld transmitter terminal 100, a receiver terminal 200 adsorbed and installed on the shell of a portable dynamic gas mixing device 300, and a gas mixing device 300 connected to a high-concentration hydrogen sulfide standard gas.
[0197] Power-on initialization and communication establishment:
[0198] At the start of the calibration operation, the operator activates the transmitting terminal 100 at a distance of 2 meters from the detector. After the receiving terminal 200 is powered on, its second power supply module 240 strictly follows the timing logic of "first switching down to 5V, then linearly regulating to 3.3V", ensuring no startup sparks while improving power efficiency to over 75%, effectively solving the heat dissipation problem inside the explosion-proof enclosure.
[0199] The system then automatically completed the handshake connection. At this time, the ambient temperature was as high as 30°C, causing RF device parameters to drift. The second main control module 210 corrected the received signal strength using a temperature compensation algorithm, confirming that the link was within a safe range. (See attached document) Figure 4 The advantages of this solution can be seen intuitively:
[0200] The horizontal axis (communication time) of the graph represents the duration of device operation, in seconds; the vertical axis (signal strength value) represents the strength of the wireless signal received by the receiving terminal 200, in dBm. The closer the value is to 0, the stronger the signal.
[0201] The diagram shows a red dashed line (safe connection threshold), corresponding to a value of -65dBm. This is the system's disconnection decision threshold; once the signal falls below this line, the system determines that communication is unreliable and cuts off the gas supply.
[0202] In high-temperature and interference environments, if existing technology (gray curve in the figure) is used, the signal will fluctuate violently due to electromagnetic interference in the industrial environment, and over time, the sensitivity will drift due to chip heating, causing the overall signal to tilt downwards. As a result, on the right side of the graph, the gray curve falls below the red dotted line, causing the equipment to "accidentally stop" when it should not.
[0203] This embodiment employs the algorithm of the present invention (blue curve in the figure), namely, after "thermal drift compensation" and "linear weighted moving average filtering" in the embodiment, the curve becomes very smooth after removing glitches and remains horizontal, without decreasing due to temperature rise. The effect is that the signal always remains above the red dashed line, ensuring connection stability within a safe distance.
[0204] Parameter configuration and gas circuit soft start:
[0205] During the parameter configuration phase, the operator sets the target concentration to 25 ppm and the flow rate to 500 mL / min. If, during this process, the operator mistakenly enters an out-of-range value of 2500 due to wearing protective gloves, the parameter compliance self-check logic of the first main control module 130 will immediately intercept the instruction and display an error message until the value is corrected to a valid value.
[0206] After the command was sent, the system did not immediately open the gas path at full speed, but instead executed a soft-start control of the gas path based on slope limitations. (See attached document) Figure 4 The specific process is as follows:
[0207] The horizontal axis (control time) of this graph starts timing from the moment the user presses the "Start Calibration" button, in seconds; the vertical axis (gas flow rate) represents the gas flow rate through the gas distribution device 300, in mL / min. The black dashed line in the graph indicates the user-set target value (500 mL / min).
[0208] If existing technology (red dotted line in the diagram) is used, i.e., the relay is directly activated, the flow rate will surge from 0 to over 600 mL / min in 0.5 seconds (causing overshoot). This instantaneous high-pressure surge can easily damage the thermal sensor inside the mass flow controller.
[0209] This embodiment employs the control logic of the present invention (solid green line in the figure), with the flow rate increasing linearly in a stepped manner at a slope of 100 mL / min / s. Finally, after 5 seconds, the flow rate smoothly reaches the target value. This method eliminates shocks, protects precision components, and also avoids oscillations in the gas path caused by pressure fluctuations, making the output of the calibration gas more stable and reliable.
[0210] Operational monitoring and fault-oriented safety:
[0211] During continuous ventilation calibration, if an emergency occurs, such as the wireless signal path being blocked and strong electromagnetic interference being introduced, the algorithm inside the receiving terminal 200 will detect in real time that the comprehensive link quality score has fallen below the safety threshold of 0.40.
[0212] At this moment, the system immediately triggers the fail-safe mechanism: the microcontroller first resets the digital-to-analog converter output to zero within 10μs via software, achieving a soft cutoff of the gas path; then, within 10ms, it pulls down the safety enable pin, physically disconnecting the relay contacts. This dual cutoff strategy, combining software and hardware, ensures that toxic and harmful gases are immediately blocked in the event of communication failure, preventing any risk of personnel poisoning or environmental pollution, and verifying the high reliability and safety of the device in complex industrial environments.
[0213] Experimental verification and effect comparison:
[0214] To further verify the superiority of this solution over existing technologies, a test platform was built in the laboratory and the following two sets of core experiments were conducted:
[0215] Communication stability testing under complex electromagnetic environments:
[0216] Industrial interference was simulated in a temperature chamber environment (-10℃ to 50℃), and the "ordinary signal strength judgment (existing technology)" and the "compensation filtering algorithm of this solution" were compared. The results show that the existing technology causes frequent false alarms and disconnections within a safe distance due to the temperature drift of the chip sensitivity at high temperatures (about 4dB). However, after temperature compensation and linear weighted moving average filtering, the standard deviation of the signal in this solution was reduced from ±6dBm to ±1.5dBm, the ranging error was less than 0.3m across the entire temperature range, and the connection remained stable without any false disconnections.
[0217] Fail-oriented safety response speed test:
[0218] This simulates extreme conditions of complete communication interruption (such as system crash or battery failure). Existing technologies typically rely on heartbeat timeout mechanisms, which take more than 1 second to detect, during which approximately 8.5 mL of gas may leak. In contrast, this solution utilizes hardware interruption and digital-to-analog converter instantaneous disconnection technology to complete the gas path cutoff within 20 ms after signal loss, with a leakage of less than 0.2 mL. The response speed is improved by 50 times, significantly reducing the risk of toxic gas leakage.
Claims
1. A remote calibration device for a toxic and harmful gas detection alarm, characterized in that, include: A transmitting terminal (100) is used to generate calibration parameters in response to user input and encapsulate the calibration parameters into a data frame for transmission via wireless signal; The receiving terminal (200) establishes a wireless communication link with the transmitting terminal (100) and connects to an external gas distribution device (300). The receiving terminal (200) includes a second radio frequency module (220), a second main control module (210), and an interface module (230). The second radio frequency module (220) is used to receive the data frame and feed back the instantaneous received signal strength value; The second main control module (210) is used to determine the communication security status based on the instantaneous received signal strength value; when the communication security status meets the preset conditions, it parses the calibration parameters and sends control commands through the interface module (230) to drive the gas distribution device (300) to output gas; when the communication security status does not meet the preset conditions, it triggers the safety cut-off mechanism, causing the interface module (230) to physically block the electrical drive circuit of the gas distribution device (300).
2. The remote calibration device for a toxic and harmful gas detection alarm according to claim 1, characterized in that, The transmitting terminal (100) includes a first main control module (130) and an input module (110), a display module (120), a first radio frequency module (140) and a first power module (150) connected thereto. The first power module (150) uses a low-dropout linear regulator circuit to regulate the voltage input to the battery; The input module (110) adopts a matrix keyboard circuit to receive gas concentration and flow parameters input by the user; the first main control module (130) is connected to the first radio frequency module (140) through a serial peripheral interface; the first radio frequency module (140) is used to transmit the data frame after performing direct sequence spread spectrum processing.
3. The remote calibration device for a toxic and harmful gas detection alarm according to claim 1, characterized in that, The receiving terminal (200) also includes a second power module (240); the second power module (240) is connected to an external DC power supply and uses a cascaded architecture of a buck switching regulator circuit and a low dropout linear regulator circuit to power the receiving terminal (200); The interface module (230) integrates a hardware safety interlock control circuit; The hardware safety interlock control circuit includes an optocoupler, a driving transistor, and a power relay connected in sequence; the second main control module (210) is provided with a safety enable control terminal, the input terminal of the optocoupler is connected to the safety enable control terminal, and the normally open contact of the power relay is connected in series to the electrical drive circuit of the gas distribution device (300); When the second main control module (210) determines that the communication security status does not meet the preset conditions, it controls the security enable control terminal to output a low level, so that the normally open contact of the power relay is opened, and the electrical drive circuit is physically cut off. Meanwhile, the second main control module (210) executes the digital-to-analog converter software quick-break logic, specifically including the following steps: while controlling the output of the safety enable control terminal to be low, the analog output signal controlling the flow of the gas distribution device (300) is forced to zero through software instructions.
4. The remote calibration device for a toxic and harmful gas detector alarm according to claim 1, characterized in that, The second main control module (210) is also used to filter the instantaneous received signal strength value, specifically including the following steps: First, thermal drift compensation based on chip junction temperature is performed to obtain the real-time temperature value inside the receiving terminal (200). Then, the instantaneous received signal strength value is linearly corrected according to the preset temperature compensation coefficient and the reference calibration temperature. Establish and maintain historical filtering state values, compare the corrected current frame signal strength value with the historical filtering state value, and if the difference exceeds the mutation threshold, discard the current data; otherwise, store the current data in a preset data buffer. Subsequently, a linear weighted moving average operation is performed on the data points in the data buffer, using a linearly increasing sequence as the weighting coefficient, to calculate the filtered signal strength output value.
5. The remote calibration device for a toxic and harmful gas detector alarm according to claim 4, characterized in that, The second main control module (210) is also used to calculate a communication link quality score, which is generated based on a weighted fusion of the following parameters: Packet loss rate based on weighted sliding window statistics; The normalized value is obtained by performing piecewise linear mapping processing on the hardware link quality indicator value output by the second radio frequency module (220); The ratio of the standard deviation of the instantaneous received signal strength value in the most recent preset number of frames to the absolute value of the reference signal strength.
6. The remote calibration device for a toxic and harmful gas detector alarm according to claim 5, characterized in that, The second main control module (210) uses a dual-threshold hysteresis decision logic when determining the communication security status: Set an access threshold and a disconnection threshold, wherein the access threshold is greater than the disconnection threshold; When the communication security status does not meet the preset conditions, the link quality is determined to meet the requirements only if the calculated communication link quality score continuously exceeds the access threshold for a preset time. When the communication security status meets the preset conditions, the link failure is immediately determined once the communication link quality score is detected to be lower than the disconnection threshold.
7. The remote calibration device for a toxic and harmful gas detector alarm according to claim 6, characterized in that, The preset conditions employ multiple conditions and logic control. The communication security status is determined to meet the preset conditions only when the following three logic conditions are simultaneously satisfied: The spatial position flag based on the electromagnetic wave attenuation characteristics is valid, that is, the output value of the filtered signal strength is greater than the preset spatial safety threshold. The timeliness flag determined by the watchdog mechanism is valid, that is, the second main control module (210) determines that the time interval of the data frame has not exceeded the preset time limit; The link status result calculated based on the dual-threshold hysteresis decision logic is a valid connection status.
8. The remote calibration device for a toxic and harmful gas detector alarm according to claim 1, characterized in that, When the second main control module (210) sends control commands to drive the gas distribution device (300), it executes gas path soft-start logic based on slope limitation: The flow control command value sent to the gas distribution device (300) is increased stepwise according to a preset increment slope until the target flow value set by the user is reached.
9. The remote calibration device for a toxic and harmful gas detector alarm according to claim 1, characterized in that, The receiving terminal (200) is also used to perform closed-loop leakage detection after the electrical drive circuit is physically blocked: The real-time flow rate value fed back by the gas distribution device (300) is continuously collected; if the absolute value of the real-time flow rate value is detected to exceed the preset flow drift threshold and the duration reaches the preset confirmation time window, a mechanical leakage fault is determined to have occurred and an alarm is triggered.
10. The remote calibration device for a toxic and harmful gas detector alarm according to claim 1, characterized in that, The application payload field of the data frame includes an instruction identifier, a target concentration value, a target flow rate value, and a safety heartbeat counter; The transmitting terminal (100) generates a monotonically increasing heartbeat count value as the security heartbeat counter each time the data frame is encapsulated; the receiving terminal (200) compares the currently received security heartbeat counter with the historical record value. If the new value is less than or equal to the old value and no count overflow or wrap-around occurs, the data is determined to be invalid.