High-precision NDIR gas sensor
By using instrumentation amplifiers, bandpass filters and STM32F103 series chips for signal processing and data processing in NDIR gas sensors, the technical bottlenecks of traditional NDIR gas sensors in low concentration detection, power consumption control and system miniaturization are solved, and the gas concentration detection effect with high precision, low power consumption and miniaturization is achieved.
Patent Information
- Application Number
- CN202411696713.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional NDIR gas sensors have technical bottlenecks in low concentration detection, power consumption control and system miniaturization, which makes it difficult for signal processing accuracy and data processing speed to meet high-precision requirements.
A high-precision NDIR gas sensor is designed, using an instrumentation amplifier and a bandpass filter for signal processing, and FFT conversion and data fitting are used for STM32F103 series chips, combined with the analog-to-digital conversion and real-time display of the microprocessor to achieve high-precision detection and real-time display of gas concentration.
High-precision and low-noise signal amplification and filtering processing are realized, which improves the stability and accuracy of detection results, and improves interactivity and real-time performance through real-time display and data transmission, achieving miniaturization of sensors and low power consumption.
Smart Images

Figure CN119643492A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of environmental gas concentration measurement, in particular to a circuit device for a high-precision NDIR gas sensor. Background Art
[0002] NDIR (non-dispersive infrared) gas sensors are widely used in the field of gas concentration detection due to their advantages such as anti-poisoning, anti-cross interference, high stability and long life, especially suitable for detecting CO 2 , CH 4 , SF 6 However, traditional NDIR sensors still have technical bottlenecks in circuit devices and data processing, which limits their low-concentration detection, power consumption control, and system miniaturization.
[0003] In the front-end signal processing part, the signal obtained by the detector needs to be amplified, filtered and noise suppressed with high precision to ensure the output of high signal-to-noise ratio. Usually, a zero-drift op amp is used to amplify the detected signal, and a bandpass filter is used to eliminate the interference signal in the invalid frequency band. At the same time, the detection sensitivity is limited by thermal noise. In terms of data processing, NDIR sensors mostly use microprocessors (MCUs) to perform data acquisition and fast Fourier transform (FFT) algorithms, and calculate the gas concentration by calculating the ratio of REF and SIG signals. This method places high demands on the speed and accuracy of the data processing circuit.
[0004] Therefore, how to optimize the circuit device and data processing algorithm of NDIR gas sensors, reduce power consumption, improve signal processing accuracy, and achieve miniaturization of sensors has become an urgent problem to be solved in this field. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a high-precision NDIR gas sensor.
[0006] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a low-power NDIR gas sensor, mainly including: a gas detector (including an optical cavity, an infrared light source, and a pyroelectric detector), a signal processing circuit, a microprocessor with an analog-to-digital converter (ADC), a light source driving circuit, a power conversion circuit, a communication module and circuit, and a screen driving circuit and display. The high-precision NDIR gas sensor of the present invention is mainly composed of a gas detector, a signal processing circuit, a microprocessor with an analog-to-digital converter (ADC), a light source driving circuit, a power conversion circuit, a communication module and circuit, and a screen driving circuit and display, so as to realize high-precision detection and real-time display of gas concentration.
[0007] The gas detector consists of three parts: an optical cavity, an infrared light source, and a pyroelectric detector. The infrared light source and the pyroelectric detector are distributed on both sides of the optical cavity. The infrared light radiated by the infrared light source propagates along a limited path in the optical cavity, and generates an electrical signal through the pyroelectric detector. The electrical signal is amplified, filtered, and biased by the signal processing circuit, and then processed by the analog-to-digital conversion and FFT transformation filtering of the microprocessor. The microprocessor calculates the concentration value of the detected gas based on the amplitude ratio of the detection signal and the reference signal at the modulation frequency, combined with the preset gas concentration calibration model. Subsequently, the concentration is displayed in real time through the screen drive circuit and display.
[0008] As a specific implementation, the gas detector is fixed on the circuit board by physical binding, and the fixed position is separated from the rest of the circuit. The circuit board does not affect the ventilation characteristics of the gas detector, and the gas detector does not affect the electrical performance of the circuit.
[0009] As a specific implementation, the principle of the pyroelectric detector is to utilize the pyroelectric effect to convert the absorbed infrared radiation energy into an electrical signal output. The pyroelectric detector receives the infrared light source radiation and converts it into an electrical signal output.
[0010] As a specific implementation manner, the connection lines of the infrared light source and the pyroelectric detector in the gas detector are integrated into the same port and connected to the circuit board through the lead-out port.
[0011] As a specific implementation, the light source driving circuit, the light source power supply provides a driving power supply of a specific frequency for the infrared light source through the light source driving circuit under the control of the microprocessor. The microprocessor outputs a square wave with a certain frequency and a duty cycle of 50% as an output through an I / O port, and drives the infrared light source to flash and radiate infrared light after passing through the light source driving circuit.
[0012] As a specific implementation, the signal processing circuit uses an instrumentation amplifier AD8222 to amplify the signal and performs filtering in conjunction with a bandpass filter.
[0013] The voltage gain and bias voltage of the instrumentation amplifier must be designed to meet the voltage range that the microprocessor I / O port can withstand. The peak-to-peak value of the signal can be adjusted by adjusting the gain, and the voltage can be raised to a readable range by adjusting the reference voltage. The signal is isolated by a voltage follower before entering the microprocessor to reduce signal noise and background interference.
[0014] As a specific implementation, in this sensor, the microprocessor with ADC uses the STM32F103 series chip as the main control core to control the light source driving circuit, communication module and circuit, screen driving circuit and display and receive the output signal of the signal processing circuit, and perform digital filtering.
[0015] The digital filtering process in the microprocessor is as follows:
[0016] 1) Configure two I / O ports to read the SIG and REF signals processed by the signal processing circuit for ADC acquisition and analog-to-digital conversion;
[0017] 2) The filtered SIG and REF signals are read to obtain the corresponding waveform arrays;
[0018] 3) FFT transform to read out the SIG and REF values at the corresponding modulation frequency;
[0019] 4) Ratio U = SIG / REF Test a set of ratios u at different concentrations;
[0020] 5) e exponential fitting to obtain the relationship between ratio, concentration and temperature;
[0021] 6) According to the above formula and analysis and calculation, the measured U value is inverted into a concentration value;
[0022] 7) Send data to the serial port to output the concentration value;
[0023] 8) Send data to the OLED screen for real-time display.
[0024] As a specific implementation method, the communication module and circuit adopt RS-232 communication mode, and realize the conversion of serial port signal into USB signal through CH340, so that the read concentration value can be transmitted to the back-end PC for display and storage.
[0025] As a specific implementation, the screen driving circuit and display adopt a 0.96-inch, 4-pin OLED screen, and the screen adopts the IIC protocol to realize the driving and display of data.
[0026] As a specific implementation, the power conversion circuit uses a high-precision LDO chip, which can convert the external 12V input voltage into 7.2V, 5V, 3.3V, -5V, and 1.2V to ensure the level value of each module in the sensor.
[0027] Due to the testing and application analysis and comparison of the above technical solutions, the present invention has the following advantages compared with the prior art:
[0028] 1) The high-precision NDIR gas sensor of the present invention can maintain a high-precision, low-noise amplified signal through an instrument amplifier in the front-end signal processing module. The high-pass circuit and the low-pass circuit are combined to form a bandpass circuit that can effectively filter out clutter. Before the signal enters the microprocessor, a voltage follower is used to isolate the signal, which can ensure that the signal to be measured can be correctly and accurately transmitted to the microprocessor.
[0029] 2) In the microprocessor, FFT transformation is used to filter the data, converting the time domain signal into the frequency domain signal, retaining only the amplitude of the specific signal frequency. Data fitting is also performed to filter out clutter and noise signals, ensuring the stability and accuracy of the detection results.
[0030] 3) The test results can be displayed in real time on the screen or transmitted and saved through the serial port. The interaction is convenient and the real-time performance is good.
[0031] 4) Integrated, miniaturized and portable. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Attached Figure 1 This is a schematic diagram of the power conversion circuit framework of a high-precision NDIR gas sensor;
[0033] Attached Figure 2 This is a schematic diagram of the overall signal processing flow of a high-precision NDIR gas sensor;
[0034] Attached Figure 3 It is the schematic diagram of the signal processing circuit principle;
[0035] Attached Figure 4 It is a schematic diagram of the power conversion structure of the power conversion circuit;
[0036] Attached Figure 5 It is a schematic diagram of the microprocessor software program structure; DETAILED DESCRIPTION
[0037] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0038] Embodiment 1:
[0039] This example provides a high-precision NDIR gas sensor, an FFT-based NDIR gas sensor, which mainly includes a gas detector, a signal processing circuit, a microprocessor with an analog-to-digital converter (ADC), a light source driving circuit, a power conversion circuit, a communication module and circuit, and a screen driving circuit and display. The signal processing circuit, the microprocessor with an analog-to-digital converter (ADC), the light source driving circuit, the power conversion circuit, the communication module and circuit, and the screen driving circuit and display are arranged on the same circuit board.
[0040] The gas detector consists of an optical cavity, an infrared light source and a pyroelectric detector. The optical cavity is made of metal and communicates with the outside world through a gas flow hole in the middle. The infrared light source is installed at one end of the cavity and is controlled by a microprocessor to set the infrared light to emit a frequency of 5Hz. The photosensitive device is located at the other end of the cavity, receiving the infrared light absorbed by the gas to be measured and converting the optical signal into an electrical signal and outputting it to the signal processing circuit. The optical cavity, infrared light source and pyroelectric detector are packaged as a whole and connected to the circuit board through a 6-pin cable. This structure ensures the stability of the signal and reduces the impact of external interference on the measurement results.
[0041] The signal processing circuit is composed of a high-precision instrument amplifier and a bandpass filter. The instrument amplifier is used to amplify the weak electrical signal output by the gas detector to maintain high-precision and low-noise signal amplification; the bandpass filter is used to filter out interference signals in non-target frequency bands to ensure that the signal entering the microprocessor is stable and noise-free. The amplified signal is filtered so that the effective components of the signal can be extracted more clearly and the interference of low-frequency noise is reduced.
[0042] In the present invention, the STM32F103 series chip is used as a microprocessor, with a built-in high-precision ADC module and FFT filtering processing. The electrical signal processed by the signal processing circuit is first converted into a digital signal by the ADC module. The microprocessor performs FFT transformation, converts the time domain signal into a frequency domain signal, and extracts the amplitude data under the modulation frequency. According to the amplitude ratio of the detection signal to the reference signal at this frequency, the actual gas concentration is calculated in combination with the gas concentration calibration model. This process not only improves the calculation speed, but also further enhances the anti-interference of the detection signal, avoiding the error caused by signal attenuation.
[0043] To facilitate on-site and remote monitoring, the gas concentration measurement results are displayed in real time on an OLED display. 2 C protocol is connected to the microprocessor, with fast display speed, low power consumption, and suitable for long-term stable operation. In addition, the microprocessor transmits the measured concentration data to external devices such as computers through RS-232 communication modules and circuits for data storage and recording. The communication module and circuit use CH340 chips to convert RS-232 signals into USB signals to ensure the compatibility of the device in different application scenarios.
[0044] The present invention designs a set of multi-output high-precision power conversion circuits to ensure stable operation of various components. In the power conversion circuit, multiple LDO chips are used to achieve multiple voltage outputs, which provide the required voltages for modules such as microprocessors, light source driving circuits, gas detectors, and signal processing circuits. The power design adopts a solution of isolating analog ground and digital ground to prevent crosstalk between analog signals and digital signals, ensuring stable and accurate signal transmission and processing. On the basis of ensuring low power consumption of the circuit, reliable power supply support is provided, further improving the practicality and stability of the sensor.
[0045] The microprocessor generates a square wave with a frequency of 5 Hz and a duty cycle of 50% and inputs it into the light source driving circuit.
[0046] The specific model of the microprocessor is STM32F103RCT6, ARM Cortex-M3, 32-bit, with a built-in 12-bit analog-to-digital converter (ADC), supporting 16 channels, suitable for sensor data acquisition.
[0047] The signal processing circuit uses a high-pass filter before the instrument amplifier and a low-pass filter after it to form a band-pass filter. The upper and lower limits of the frequency of the band-pass filter of the SIG channel are: 1 / 2πR 44 C 39 and 1 / 2πR 40 C 37 , the upper and lower limits of the frequency of the bandpass filter of the REF channel are: 1 / 2πR 60 C 40 and 1 / 2πR 54 C 41 .
[0048] The selection of the gain and bias voltage of the instrument amplifier of the signal processing circuit must satisfy the requirement that the voltage input to the microprocessor is between 0 and 3.3V.
[0049] To start the detection, the infrared detector needs to be warmed up for a period of time. The display screen will display the current gas concentration value after waiting for a certain period of time (10 seconds).
[0050] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0051] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A high-precision NDIR gas sensor, characterized in that: It includes a gas detector, a signal processing circuit, a microprocessor with an analog-to-digital converter (ADC), a light source driving circuit, a power conversion circuit, a communication module and circuit, a screen driving circuit and display; The input end of the gas detector is connected to the output end of the light source driving circuit, the output end of the gas detector is connected to the input end of the signal processing circuit, the output end of the signal processing circuit is connected to the microprocessor, the input end of the light source driving circuit is connected to the microprocessor, the screen driving circuit and display are connected to the microprocessor, the communication module and circuit are connected to the microprocessor, and the power conversion circuit provides corresponding working voltages for each part of the sensor.
2. The high-precision NDIR gas sensor according to claim 1, characterized in that: The power conversion circuit can provide an adaptive and stable operating voltage for each part of the sensor, including the microprocessor, light source driving circuit, gas detector, signal processing circuit, communication module and circuit, screen driving circuit and display.
3. The high-precision NDIR gas sensor according to claim 1, characterized in that: The light source driving circuit is well controlled by the microprocessor and outputs a square wave with a specific frequency f. The frequency f is consistent with the frequency of the microprocessor control output and has the ability to drive the infrared light source.
4. The high-precision NDIR gas sensor according to claim 1, characterized in that: The gas detector is composed of an optical cavity, an infrared light source, and a pyroelectric detector, which are packaged into a whole; the optical cavity has multiple small holes communicating with the outside world, the pyroelectric detector can output electrical signals of the SIG channel and the REF channel, and the optical cavity is made of metal material.
5. The high-precision NDIR gas sensor according to claim 1, characterized in that: The signal processing circuit uses an instrumentation amplifier to amplify the electrical signals of the two channels. The instrumentation amplifier contains a reference voltage terminal VREF. The voltage of the reference voltage terminal VREF is adjusted to raise the signal to a voltage range that the microprocessor can withstand.
6. The high-precision NDIR gas sensor according to claim 1, characterized in that: The signal obtained by detection needs to be band-pass filtered and isolated before and after the amplification process in signal processing.
7. The high-precision NDIR gas sensor according to claim 1, characterized in that: The signal input to the microprocessor is converted by the internal ADC from analog to digital. The ADC conversion must satisfy the Nyquist sampling theorem and the sampling rate must be greater than 2f to ensure that the signal is not distorted.
8. The high-precision NDIR gas sensor according to claim 1, characterized in that: The microprocessor needs to be able to meet the requirements of high-speed data acquisition and calculation processing, use the fast Fourier transform algorithm to convert the collected time domain signal into a frequency domain signal, analyze the amplitude of the signal at the light source driving frequency, and calculate the concentration value of the detected gas based on the amplitude ratio of the detection signal and the reference signal at the modulation frequency, combined with a preset gas concentration calibration model.
9. The high-precision NDIR gas sensor according to claim 1, characterized in that: The detected concentration value is displayed in real time on the screen and transmitted through the serial port.
10. The high-precision NDIR gas sensor according to claim 1, characterized in that: The following steps are involved: 1) The microprocessor controls the light source driving circuit to generate a square wave of a specific frequency to drive the light source of the gas detector to flash; 2) The infrared light radiated enters the optical cavity and is absorbed by the pyroelectric detector. The optical signal is converted into a corresponding electrical signal, and then the obtained electrical signal is transmitted to the signal processing circuit; 3) The electrical signal is amplified and filtered by the signal processing circuit and then input into the microprocessor; 4) Subsequently, analog-to-digital conversion is performed using the ADC function in the microprocessor; 5) In the microprocessor, the time domain signal converted by ADC is transformed into a frequency domain signal by using FFT transformation, and the amplitude of the signal with the same frequency as the infrared light source driving circuit is screened out. At the same time, the noise signal is filtered and calibrated to determine the function model, thereby realizing the measurement of gas concentration; 6) The detected and processed gas concentration value can be displayed in real time on the LCD screen and can also be transmitted and saved through the serial port.
Citation Information
Patent Citations
Fast modulation NDIR gas sensor
CN114813609A
Carbon dioxide sensing device based on NDIR principle and control method thereof
CN116046708A
High-precision infrared gas detection module
CN202974860U
High-sensitivity portable gas detection instrument based on NDIR (Non-Dispersive Infra-Red) principle
CN203324179U
Infrared light two waveband gas detector
CN204855361U
Cited By
Detector circuit for ndir
CN120870063A