laying and maintenance are very difficult, and the existence of invisible factors such as line failure and aging has also become a safety hazard. Secondly, different fields have different requirements for the type of gas to be detected. There are many types of gas detection devices on the market. Although they can also meet user requirements, this undoubtedly increases the cost, reduces the applicability of the device, and causes a waste of resources. In response to these problems, a reliable distributed wireless gas detection device that allows users to choose the type of gas to be detected is designed to cope with complex and high-risk working environments, solve the shortcomings of wiring difficulties and fault inspection difficulties caused by wired transmission, meet the needs of different users to the greatest extent, and improve the adaptability and monitoring capabilities of the system.
1 System Design
The designed gas monitoring device aims to be multifunctional, easy to operate, stable and reliable, and realizes the function of wireless monitoring of multiple gases. The system structure block diagram is shown in Figure 1. First, the user determines the type of gas to be monitored according to specific needs, selects a specific sensor module, and connects it to the interface specified by the extension. The system is designed to connect up to 8 different gas detection modules. When the system is working normally, the extension monitors each gas sensor module. Once it finds that the concentration of a gas exceeds the standard, the microcontroller receives the signal from the corresponding gas sensor, starts the wireless transmission unit, and sends information to the host. The data received by the host is processed and analyzed, sent to the LCD display, and the alarm circuit is activated.
2 MQ series gas sensor module
When selecting a sensor, stability, sensitivity, selectivity and corrosion resistance must be considered. The system uses MQ series gas sensors to monitor gas concentration information. MQ series gas sensors are gas sensors with high sensitivity, good selectivity, long service life and reliable stability. The MQ type gas sensor is composed of a micro-ceramic tube and a sensitive layer. The sensitive element consisting of a measuring electrode and a heater is fixed in a plastic or stainless steel cavity. The heater provides the necessary working conditions for the gas sensor. This series of gas sensors is comprehensive, including MQ-2 smoke sensor, MQ-3 alcohol sensor, MQ-4 methane sensor, MQ-5 liquefied gas sensor, MQ-8 hydrogen sensor and other gas sensors. At the same time, the circuits between the sensors are highly universal and can meet the gas detection requirements in different places. [page]
The MQ series gas sensor module is equipped with dual signal outputs. Since a large number of gases can be monitored in the design, the use of TTL level output can reduce the amount of data in the microcontroller and improve system stability. Its interface circuit is shown in Figure 2.
3 NRF905 wireless transceiver module
The system uses the NRF905 wireless data transceiver module designed with the wireless data transmission chip NRP905 produced by Nordic Company of Norway as the core. The module has the following features: (1) The working power supply voltage range is 1.9~3.6 V. (2) The output power can be adjusted to 10 dBm. (3) Detect the received data packet and output the address matching signal when the address is correct. (4) Automatic data packet retransmission function. (5) Automatically generate CRC check code and preamble. (6) Low working current, the typical value is 11 mA when the output power is -10 dBm in TX working state, and the typical value is 12.5 nA in RX working state. (7) Data packet transmission: Manchester encoding, strong anti-zero level ability. (8) Transmission rate: 100 kbit·s-1; working frequency: 433/868/915 MHz.
The nRF905 module has four working modes: ShockBurst receiving, ShockBurst transmitting, power-down and SPI programming, and standby and SPI programming. The selection of these four modes is determined by the settings of PWR_UP, TRX_CE and TX_EN. The nRF905 module in ShockBurst working mode is characterized by automatically generating preamble and CRC check code, and using SPI interface to communicate with microcontroller. The following are the command settings for the SPI serial interface of the nRF905 module:
#define WC0x00//Write configuration register command
#define RC0x10//Read configuration register command
#defme WTP0x20//Write valid data to TX_Payload register
#define RTP0x21//Read valid data from TX_Payload register
#define WTA 0x22//Write send address to TX_Address register
#define RTA 0x23//Read send address from TX_Address register
#define RRP 0x24//Read valid data received from RX_Payload register
In summary, NRF905 has the advantages of fast communication rate, small workload of microcontroller programming, low power consumption, strong anti-interference ability, etc., which meets the requirements of communication reliability. At the same time, the 433 MHz ISM band has strong penetration ability and long transmission distance, which can achieve long-distance transmission indoors. Figure 3 is the application schematic diagram of the NRF905 chip.
[page]
4 Software Design
The program flow of the system is shown in Figure 4. The MCU can restart the system device through power-on reset and initialize the corresponding modules. When the extension gas sensor detects that the gas concentration exceeds the standard, it sends a signal to the MCU. After the MCU determines that the processing is correct, it starts wireless transmission; after the host receives the data, it returns a response signal, the extension is reset, and the wireless module resumes standby mode. The host starts to analyze and process the data, and then sends the results to the LCD display and starts the alarm circuit. When the host is manually reset, it resumes normal working mode and continues to detect new data.
5 Test Results
In the experiment, once the system detects that the gas concentration in the current area is greater than the set threshold, it automatically sends out an alarm signal and displays the current excessive gas type and related monitoring point address information through the LCD. After the gas concentration value in the monitoring range returns to normal or is manually reset, the alarm stops. It was found through testing that the actual receiving and sending distance of the device is about 50m indoors, and the communication distance in the open area outdoors can reach up to 200m. Short-distance data transmission is stable and reliable, but in actual applications, due to the complex environment, longer-distance data communication is sometimes required. In order to solve this problem, some improvements have been made to the system design. By adding a repeater as a data transmission hub, the data transmission range of the system can be greatly increased, and the adaptability of the system can be improved.
6 Conclusion
The innovation of the system lies in: using distributed wireless communication for data transmission and the coordinated use of multiple gas sensor modules in the same series, the system can complete the monitoring of various gases according to specific needs. By setting up a repeater, the communication distance can also be increased, which effectively solves the problem of complex environment at each work site and has good application prospects.
Previous article:Interface Design between MCS_51 Single Chip Microcomputer and 8255A
Next article:51 MCU assembly language: What are the control transfer instructions?
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- 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
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- There is a section of LCD code in the atomic stm32f1 tutorial that is not clear, please help me take a look
- Please recommend a 3.3V output chip
- Signal Integrity Analysis (Bergding)
- What is the function of SCR1 thyristor in this circuit?
- A multifunctional data acquisition system based on USB and FPGA
- COCOFLY Tutorial - Crazy Shell Drone Series Quick Start [4] Flight Control Firmware Burning
- GD32E231 DIY Competition (1)——KEIL platform built
- Can GaN technology create superior RF crystals?
- Today at 10:00 AM R&S Live Broadcast with Prizes [USB 3.2 Compliance Test]
- How to measure code execution time on ARM Cortex-M MCUs?