1 Introduction
Carbon monoxide (CO) is a highly toxic gas. When inhaled by humans, it causes hypoxia in human tissues and cells, leading to poisoning and suffocation. In coal mines, CO is also one of the main gases that cause gas explosions. CO causes huge damage to both industrial production and humans. Therefore, CO detection is particularly important, especially in coal mines. The Coal Mine Safety Regulations stipulate that the CO concentration in underground workplaces should be controlled below 0.002 4%. Therefore, real-time and accurate measurement of underground CO gas concentration is of great significance to ensuring safe production in the coal mine industry.
At present, the main methods for detecting CO include chemical method, electrochemical method, gas chromatography, etc. These methods generally have problems such as high price, poor universality, and low measurement accuracy. Here, a new detection system is designed, which uses infrared CO sensor and MSP430 single-chip microcomputer as the core signal processing circuit, combined with digital filtering and temperature compensation operation. It has the advantages of wide detection concentration range and long service life. The CAN bus has the characteristics of long communication distance and high reliability. By expanding the CAN bus interface, the detector has remote communication capability, which can be easily connected with the monitoring center, effectively reducing the accident rate, and has promotion and application value.
2 System composition and hardware design
The system consists of an infrared CO gas sensor, an MSP430 single-chip microcomputer, a CAN bus interface, and a remote monitoring system. The system processes the detected data, controls the LCD display, and the sound and light alarms through the single-chip microcomputer at the detection site. It is also equipped with a CAN bus controller, which can easily obtain relevant information such as concentration, temperature, and alarm records, realizing intelligent industrial site and remote simultaneous monitoring functions. The system block diagram is shown in Figure 1.
2.1 Principle and selection of sensors
Each substance has a specific absorption spectrum (for example, CO gas has a very strong absorption peak at a wavelength of 4.5 μm), and this characteristic can be used for measurement. The concentration of the gas can be determined based on the changes in the absorption peaks at certain specific wavelengths on the spectrum curves of various gases. When infrared light passes through the gas to be measured, these gas molecules absorb infrared light of a specific wavelength, and the absorption law follows the Lambert-Beer law.
Where, I is the energy of the transmitted light, L/mol·cm; Io is the energy of infrared radiation absorbed by the gas, L/mol·cm; K is a constant related to the gas and the wavelength of radiation, L/mol·cm; C is the concentration of the measured gas, mol/L; L is the thickness of the gas layer through which the radiation passes, cm.
From formula (1), we can know that by detecting the radiation intensity of infrared radiation after being absorbed by the gas, the concentration of the measured gas can be calculated. Using SM-C0 H/M sensor, this series of analog output CO adopts double-beam non-dispersive infrared (NDIR) detection technology. It has the advantages of anti-interference from other gases, simple maintenance, good stability, built-in temperature compensation, Modbus ASCII protocol digital output and analog output. It is suitable for leak alarm, on-site construction protection, simple gas analysis, online monitoring, industrial process analysis and other occasions. [page]
2.2 Working principle and data processing of MSP430 microcontroller
The MSP430 microcontroller is an ultra-low power Flash 16-bit microcontroller produced by Texas Instruments (TI). According to the system functions and peripheral circuit interface requirements, the MSP430F449 microcontroller is selected. The microcontroller has rich internal hardware resources; the built-in temperature sensor is used to detect the ambient temperature and compensate the data detected by the infrared sensor; its built-in A/D converter is used to convert the analog quantity output by the sensor into a digital quantity; through the hardware multiplier, high-speed digital filtering and temperature compensation operations are performed on the measured A/D sampling data. The digital filtering method adopts the extreme value average filtering method. In situations where pulse interference is more serious, if the general average method is used, the interference will be averaged into the result, and it is not easy to eliminate the error caused by the interference. First, the IV sampling values are arranged in order of size, and the "bubble sort method" is used to remove the maximum and minimum values of the N data, and then the average value of (N-2) data is calculated, which is the extreme value average filtering method. The processing method of temperature compensation; when the static characteristics of the sensor are linear, the characteristics before temperature compensation can be expressed as:
Where x is the input of the sensor, y is the output, Y is the intercept of the characteristic curve on the y-axis (i.e., the output gain caused by ambient temperature), and k is the proportional coefficient.
The steps of the temperature compensation formula method are as follows:
(1) Given (m+1) temperature values: T0, T1, T2, ..., Tn, ..., Tm, measure the intercepts Y0, Y1, Y2, ..., Yn, ...Ym of the static characteristic curve of the sensor on the y-axis at each temperature;
(2) Express Y as an nth-order algebraic polynomial (n
Determine a0, a1, a2, …an using the least squares curve fitting method.
(3) When measuring each y value and the corresponding T value, first calculate the Y value, and then find the x value
The use of digital filtering and temperature compensation algorithms can make the measurement more accurate and minimize the impact of ambient temperature.
2.3 Buttons, LCD display and alarm system
The buttons are used to set parameters such as system time, sound and light alarm values, and corresponding CAN bus communication addresses. If there are fewer buttons, one port corresponds to one button, and a capture interrupt is used. If there are more buttons, a row-column keyboard can be used to save port resources. The LCD display uses the LSD12864CT display module, which consists of a set of row drive signals IC3 and two sets of column drive signals IC2 (controlling the left half screen) and IC1 (controlling the right half screen). Its display dot matrix is 128x64 and can display graphics or Chinese characters. It integrates the interface of row and column drivers and display buffer RAM. At the same time, the hardware can set the structure of the display screen, data transmission mode, length and width of the display window, etc. The MSP430F449 has a built-in 60 KB Flash to record the time when the infrared measurement data exceeds the limit and the corresponding setting value, and save the relevant parameters of the CAN interface. When the CO concentration exceeds the set range, the sound and light alarm device reminds the underground staff.
2.4 CAN bus interface design
The CAN interface of this system consists of an independent CAN bus controller SJA1000 and a CAN data transceiver TJA1050. SJA1000 is an independent CAN controller, mainly used for mobile targets and regional network control in general industrial environments. AD0-AD7 of SJA1000 is connected to the P2 port of MSP430, and P3.4 and P3.5 control the read and write operations of SJA1000 respectively. MSP430 initializes SJA1000 and realizes data transmission and reception by controlling SJA1000. TJA1050 is the interface between the controller area network (CAN) protocol controller and the physical bus, and is a standard high-speed CAN transceiver. TJA1050 can provide differential transmission function for the bus and differential reception function for the CAN controller SJA1000. TJA1050 provides a CAN node interface to realize the transmission of CAN bus data. CANH and CANL are connected to the external CAN bus network. The connection circuit of MSP430, SJA1000 and TJA1050 is shown in Figure 2.
[page]
3 System Software Design
After the system is powered on and reset, it is first initialized, mainly including system hardware initialization and reading CAN related parameters from MSP430 Flash and setting them; then the system performs key scanning: if a key is pressed, the corresponding operation is performed, such as setting the time and CO alarm concentration value, modifying CAN parameters, and checking alarm records; if no key is pressed, the CO concentration is collected and software processing is performed. The software processing includes digital filtering and temperature compensation to calibrate the concentration data. If the CO concentration exceeds the limit, the sound and light alarm will notify the underground staff and record the alarm time and alarm value in the memory. If the concentration is normal, the detection is cyclically detected and displayed. The system software flow is shown in Figure 3. The remote transmission of gas concentration data is completed by the CAN bus interface. When the host computer sends a message to the station, that is, when the station is required to transmit data, the system will transmit data to the host computer, which can reduce the burden on the microcontroller and reduce power consumption. Therefore, the CAN communication program flow is roughly as follows: when the detector receives a valid message, a receiving interrupt is generated. In the interrupt service subroutine, the C0 concentration data is sent in the form of a CAN message, and the message is sent in a non-interrupt manner. The specific workflow is shown in Figure 4.
The host computer uses a visual operation interface written in Delphi under Windows. Delphi is an event-driven, object-oriented visual high-level programming language. The communication software design of the system uses Delphi7.0. Among the many serial communication controls available in Delphi, the SPComm control is the simplest and most powerful one. This control has a wealth of properties and events closely related to serial port communication, and provides various operations on the serial port. Through the design of Delphi, the current time and gas concentration can be intuitively displayed in the host computer. Remote operations can also be performed through serial port communication. The sampling timer can be used to refresh the displayed data at regular intervals, so as to detect data changes in a timely manner.
4 Conclusion
Infrared optical sensors are used to replace traditional sensors. Safety is greatly improved; combined with CAN bus technology, it replaces traditional RS232 and RS485, greatly reducing the difficulty of system development and shortening the development cycle. Compared with other field buses, CAN bus has the characteristics of high communication rate, easy implementation, and high cost performance. TI's MSP430 microcontroller is used, which has more integrated peripherals, reduces the difficulty of development, and has ultra-low power consumption. It is conducive to energy saving.
The designed infrared CO detection system has a wide range of gas concentration detection and good equipment maintainability. The measurement precision is greatly improved by utilizing the low power consumption characteristics of MSP430F449 and its internally integrated A/D converter, multiplier, temperature sensor and other hardware resources. Through the CAN bus interface, the system can not only display real-time data on site, but also realize the long-distance, high-reliability communication function and remote monitoring of the instrument. Therefore, the system has a good application prospect.
Previous article:Analysis of the complete solution of relay protection based on Blackfin processor
Next article:Design and implementation of full attitude stabilization control system for micro UAV
Recommended ReadingLatest update time:2024-11-16 22:52
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Please recommend a PAL video signal equalization chip or amplifier chip
- [RVB2601 creative application development] SVM40 UART communication implementation
- EEWORLD University ----TI Precision Laboratory - Isolation
- Fighting back against India? It is said that Huawei will lay off 70% of its employees in India...
- New courses are online at the beginning of the school year! Learn the latest TI training courses and win gifts
- After reviewing ten wireless sports Bluetooth headsets, I will teach you how to buy headsets under 300 yuan
- This week's highlights
- When encountering refurbished chips again, how to identify new and old chips?
- Brushless motor MOS
- [Routine experience of Flathead RVB2601 development board] Part 1: Download the example program successfully, sharing experience!