Design of CO2 gas detection circuit based on infrared sensor
2026-04-06 04:48:14··#1
With the progress of human society and the development of science and technology, people's living standards have improved rapidly, and the scale of industrial production has expanded rapidly. However, this has also led to a dramatic increase in carbon dioxide emissions, such as the greenhouse effect and accelerated desertification, seriously affecting and damaging the human living environment. Furthermore, carbon dioxide is a major raw material for crop photosynthesis, and its content directly affects crop growth. In recent years, with the increasing awareness of environmental protection and the advancement of science and technology, how to quickly detect carbon dioxide levels and reduce emissions has become a major concern for governments at all levels and insightful individuals. Therefore, researching and designing carbon dioxide detection circuits is of great significance. Currently, methods for detecting carbon dioxide mainly include chemical methods, electrochemical methods, gas chromatography, and volumetric titration. These methods generally suffer from high costs, poor universality, and relatively low measurement accuracy. Sensor methods, on the other hand, offer advantages such as safety, reliability, rapid direct reading, and continuous monitoring. Currently, various carbon dioxide sensors used for detection include solid electrolyte type, barium titanate composite oxide capacitive type, and conductivity-changing thick-film type. These sensors have drawbacks such as poor gas selectivity, susceptibility to false alarms, the need for frequent calibration, and short lifespan. Infrared absorption carbon dioxide sensors have the characteristics of wide measurement range, high sensitivity, fast response time, good selectivity, and strong anti-interference ability. Therefore, this design adopts an infrared absorption carbon dioxide sensor. The entire circuit design strives to be simple and easy to use, fast and direct reading, and inexpensive. 1 Working principle of the detection circuit 1.1 Working principle of infrared absorption carbon dioxide gas sensor [1] The infrared absorption CO2 gas sensor is based on the principle that the absorption spectrum of a gas varies with different substances. Different gas molecules have different chemical structures, and therefore absorb infrared radiation of different wavelengths to different degrees. Therefore, when infrared radiation of different wavelengths irradiates the sample material in sequence, some wavelengths of radiation energy are selectively absorbed by the sample material and become weaker, producing an infrared absorption spectrum. Therefore, when the infrared absorption spectrum of a certain substance is known, the absorption peak of the substance in the infrared region can be obtained from it. At different concentrations of the same substance, there are different absorption intensities at the same absorption peak position. The absorption intensity is directly proportional to the concentration. Therefore, by detecting the effect of the gas on the wavelength and intensity of light, the concentration of the gas can be determined. According to Beer-Lambert's law, the relationship between output light intensity, input light intensity, and gas concentration is: where is the molar absorption coefficient; C is the concentration of the gas to be measured; and L is the interaction length between light and gas (sensing length). Transforming the above equation, we get: The gas concentration can be determined by detecting relevant data. [align=center] Figure 1 Carbon Dioxide Sensor Probe Structure[/align] The structure of the infrared carbon dioxide sensor probe is shown in Figure 1. It consists of an infrared light source, a measuring gas chamber, an adjustable interference filter, a photodetector, a light modulation circuit, and an amplification system. The infrared light source uses a nickel-chromium wire, which emits infrared rays of 3–10 μm after being heated, including a strong absorption peak of CO2 gas at 4.26 μm. In the gas chamber, carbon dioxide absorbs light emitted by the light source at a specific wavelength, which is then detected by the detector to show the absorption of infrared rays by carbon dioxide. The interference filter is adjustable; adjusting it changes the wavelength band of the light it passes through, thereby changing the strength of the signal detected by the detector. The infrared detector is a thin-film capacitor. After absorbing infrared energy, the gas temperature rises, leading to an increase in indoor pressure. This changes the distance between the capacitor's electrodes, thus altering the capacitance value. The higher the CO2 gas concentration, the greater the change in capacitance. 1.2 Design Principle of the Detection Circuit [align=center] Figure 2 Block Diagram of the Detection Circuit [/align] The block diagram of the detection circuit design is shown in Figure 2. The detection circuit consists of an infrared carbon dioxide sensor, a digital filter circuit, an amplifier circuit, a current stabilizing circuit, a microcontroller system, and temperature compensation. The basic design principle is that the infrared carbon dioxide sensor converts the detected carbon dioxide gas concentration into a corresponding electrical signal. The output electrical signal is filtered and amplified before being input to the microcontroller system. After temperature and pressure compensation, the microcontroller system outputs the measured value to the display device. 1.3 Design of the Detection Circuit [align=center] Figure 3 Carbon Dioxide Detection Circuit Diagram [/align] Based on the above design principle, the designed carbon dioxide detection circuit is shown in Figure 3. The working principle is as follows: First, the infrared sensor detects the concentration of carbon dioxide gas and converts it into an electrical signal. The filter circuit extracts the electrical signal and outputs it to the amplifier circuit. After processing by the microcontroller system, the signal is output and then sent to the display circuit by the 74AC138 to realize the detection of carbon dioxide gas concentration. The filter circuit consists of R1, R2, R3, R4, C1, C2 and operational amplifier [2]. Both negative and positive feedback are introduced into the circuit. When the signal frequency approaches zero, the reactance of C1 approaches infinity, so the positive feedback is very weak; when the signal frequency approaches infinity, the reactance of C2 approaches zero. This ensures that the filter circuit can extract the corresponding electrical signal normally when the signal frequency is between zero and infinity. The amplifier circuit after the filter circuit amplifies the signal output by the filter circuit to a certain extent so as to drive the load. R6 and C4 are connected in series to form a correction network to perform phase compensation of the circuit. The microcontroller system is mainly composed of MC14433 and 8031. MC14433 is a dual-slope A/D converter chip, which is connected to 8031 microcontroller as shown in the figure. The conversion result QQ of MC14433 is connected to P1.0-P1.3 of 8031, and the strobe output pulses DS1-DS4 are connected to P1.4-P1.7 of 8031. The conversion result flag EOC is connected to the update conversion control signal input line DU on one hand and to the interrupt input line INT1 of 8031 on the other hand, indicating that the microcontroller can read the A/D conversion result in interrupt mode or in polling mode. The final result is sent to 74AC138 and drives the digital tube to display the specific value [3][4]. 2 Detection processing program flowchart The flowchart of the detection processing program is shown in Figure 4. It is programmed using MCS series assembly language [5]. Due to the hardware design guarantee, the whole system can work in both loop polling mode and interrupt management mode. 3. Conclusion This design has been successfully applied in the flower demonstration garden of the Yan'an Municipal Agricultural Research Institute, with excellent operational results. Practice has proven that this detection circuit is simple to operate, displays numerical values, is small and portable, highly intuitive, and provides continuous and rapid detection, enabling the monitoring of carbon dioxide levels in various indoor and outdoor environments at any time. [align=center]Figure 4 Detection and Processing Procedure Flowchart[/align] This circuit design is simple, inexpensive, and highly versatile, overcoming the shortcomings of circuits requiring frequent calibration, having a short lifespan, and being expensive. References : [1] Ju Xuemei et al. Design of infrared absorption CO2 gas sensor [J]. Sensor Technology, 2005, 8: 62-64. [2] Tong Shibai, Hua Chengying. Fundamentals of Analog Electronics [M]. Beijing: Higher Education Press, 2001. [3] Niu Qiangjun, Gao Feng. Communication system controller based on microcontroller [J]. Microcomputer Information, 2004, 8: 21-22. [4] Nie Yi, Nie Hui. Microcontroller control system for plant greenhouse [J]. Microcomputer Information, 2002, 8: 36-37. [5] Xue Junyi, Zhang Yanbin. MC551/96 series single-chip microcomputer and its applications [M]. Xi'an Jiaotong University Press, 1990.