TI/Chipcon has released and certified the full-featured ZigBee 2006 protocol stack based on the IEEE802.15.4 standard and the ZigBee2006 specification launched by the ZigBee Alliance. The protocol stack is fully written in C language and is backward compatible. Since Zigbee2006 still cannot meet the needs after improvement, the more practical Zigbee2007/PRO was born on the basis of Zigbee2006. However, for current users, they only need to understand the application layer functions and how to call these functions appropriately to build a Zigbee network with stable performance and perfect functions.
1 System Design and Analysis
The CC2530 launched by TI is the second generation of Zigbee RF transceiver, mainly used in the 2.4 GHz ISM band. It integrates a high-performance RF transceiver and an optimized low-power 8051 microcontroller core, with excellent receiver sensitivity and superior anti-interference. At the same time, CC2530 can be equipped with TI's RemoTI, ZStack or SimpliciTI and other proprietary or standard-
compatible network protocol stacks to simplify development. Zigbee2007/PRO protocol stack Zstack-2.3.0 is a protocol stack developed by the new generation Zigbee chip CC2520 based on the Zigbee2007 protocol specification. The ZigBee protocol structure adopts the OSI seven-layer model. The protocol uses the IEEE802.15.4 standard as the communication basis, and defines the standards for the physical layer (PHY) and the media access control layer (MAC); the ZigBee Alliance defines the network layer (NWK), application layer (APL) and security service specifications of the ZigBee protocol, and its structure is shown in Figure 1.
Zigbee wireless network can be divided into two topological structures: star network and mesh network, as shown in Figure 2(a) and Figure 2(b). The star network connection method is relatively simple, and the Zigbee transceiver is limited by its own working range, so it can only be used to build a wireless network with a relatively small number of nodes and a relatively small range; the mesh network structure can greatly expand the range of the wireless network while also greatly increasing the number of nodes in the wireless network, which is very suitable for monitoring objects with dispersed locations and a large demand for monitoring nodes. This system adopts a mesh network structure, which
is mainly divided into: coordinator node (Coordinator), router node (Router) and terminal sensor node. The system structure is shown in Figure 3.
[page]
In the system structure diagram, the monitoring center is a computer, which is mainly used to visualize the temperature and humidity data information detected by each terminal sensor node and store and record the data information; the coordinator node is used to establish a wireless network, allocate network locations, collect information detected by the terminal sensor nodes and transmit data; the router node is mainly used to find, establish and repair data packets, collect and forward data information detected by the lower-level terminal sensor nodes that form a routing path with it; the terminal sensor node is mainly responsible for detecting the real-time temperature and humidity data information at its location and sending it to its upper-level node, so that the detected temperature and humidity data information is finally transmitted to the coordinator node, and it also has the ability of a router node.
2 System Hardware Circuit Design
The temperature and humidity detection part of this system uses the excellent digital temperature and humidity sensor SHT15 and CC22530 ZigBee module to build. SHT15 integrates a capacitive polymer humidity sensor, a temperature measuring element made of energy gap material, a 1 and 14-bit A/D converter and a serial interface circuit. The humidity sensor has an error of less than ±0.5℃ in a normal working environment (10~50℃), and the humidity measurement error is less than ±2%RH in an environment of 10%RH~80%RH. It is a fairly stable temperature and humidity sensor.
The working voltage of the terminal sensor node hardware part is provided by a 5 V dry battery. A 100 nF decoupling filter capacitor C1 is added between the SHT15 power pin VCC and GND; the 2nd and 3rd ports of SHT15 are connected to the P2_1 port and P2_2 port of the CC2530F256ZigBee module respectively, and the data between SHT15 and CC2530 is exchanged through the I2C bus technology. The hardware part of the coordinator node mainly uses the RS232 serial port circuit to communicate with the computer. The circuit diagram of the RS232 serial port part is shown in Figure 4, and the CC2530 peripheral circuit is shown in Figure 5. Protel DXP 2004 drawing software is used to draw the diagram.
[page]
In order to improve the accuracy of measurement, this system performs nonlinear compensation and temperature compensation during signal conversion to obtain accurate data. After receiving the CRC 8 confirmation bit, the communication is terminated by keeping the ACK high level and automatically enters the sleep mode. SHT15 performs nonlinear compensation of relative humidity signals during signal conversion, and the measurement resolution is 12 bits. The formula is as follows:
RH linear=-2+0.5*SORH+(-4)*SORH2(%RH)
Where: RH linear is the relative humidity correction value, SO RH is the relative humidity measurement value of the sensor.
3 System software design
The software design process of the terminal sensor node of this system is shown in Figure 6. After the terminal sensor node is powered on and starts working, it first performs initialization work, initializes the hardware and protocol stack respectively, and immediately searches for nearby wireless Zigbee networks after initialization and sends a request to join. After successfully joining the wireless Zigbee network, it enters the sleep mode and waits for the conditional interrupt to be generated. If an interrupt is generated, it will judge the interrupt and make a corresponding response action.
The software design process of the coordinator node is shown in Figure 7. Similar to the terminal sensor node, the coordinator node must first initialize the hardware and protocol stack after powering on. After initialization, the channel search is performed and the idle channels found are evaluated to select the optimal channel to establish the ZigBee wireless network. After the network is successfully established, it is checked whether the network access request from other nodes or the measurement command from the control center is received, and the corresponding response actions are made for these two situations. In this process, it is necessary to check whether the address space of the network is full. If the address space is full, it will fail to join the network. Once the coordinator node receives the command from the control center to collect temperature and humidity data, it immediately sends the temperature and humidity data information received from the terminal sensor node to the control center. Some programs of this system are as follows:
[page]
4 System Result Analysis
The wireless temperature and humidity measurement system is used to measure the local climate in the working environment. In order to ensure the measurement results and accuracy, we conduct spot checks at different times, measuring once every 5 minutes for one hour, and use MATLAB to analyze the data. The comparison chart of temperature measurement value and standard value is shown in Figure 8, and the comparison chart of humidity measurement value and standard value is shown in Figure 9.
5 Conclusion
Based on CC2530 chip and ZigBee2007/PRO protocol, this paper designs a wireless temperature and humidity monitoring system and verifies the system function. The verification results show that this system is feasible. The system not only realizes the temperature and humidity monitoring of multiple scattered nodes and the accurate transmission of data, but also uses the mesh network structure to build a wireless network, which greatly expands the monitoring range. The monitoring range is much larger than that of the general monitoring system that uses a star network structure to build a network. At the same time, this also makes the node capacity of this system larger than that of the star network structure. In the current situation where wireless detection systems generally use a star network structure to build a network, this system has a great market advantage. In addition, the energy stability and reliability of this system are also very high, which makes the environmental adaptability of this system very strong, especially suitable for industrial and agricultural environment sites and operation sites with more stringent requirements on environmental factors.
Previous article:Red light therapy device control system based on STM32
Next article:Applying asymmetric dual-core MCU to enhance system performance
Recommended ReadingLatest update time:2024-11-16 19:54
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Internet of Things Development Technology Based on C Language (Edited by Gao Song)
- Detailed explanation and engineering practice of unmanned monitoring technology (Xie Jianbin, Li Peiqin, Yan Wei, Liu Tong, Lin Chenglong, Hong Quanyi, Zhou Hongfei, Cui Yibing)
- Introduction to Wireless Sensor Networks (Edited by Ma Sasa et al.)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- [Jihai APM32E103VET6S development board] Evaluation 3, TFT LCD
- OV7670 simple driver for MSP430F5438A
- Looking back at 2018 and looking forward to 2019
- [Sipeed LicheeRV 86 Panel Review] 2. Firmware Burning, Linux System Test
- MATLAB simulation model for online parameter identification of permanent magnet synchronous motor based on RLS least squares method
- Research on constant false alarm rate control technology of laser radar based on FPGA (1)
- [nRF52840 DK Review] Start lighting up
- [MSP430F5529 Review] 3. CCS Development Environment & UART Transmission Waveform Data
- Battery safety test system functions
- EEWORLD University Hall ---- Information Theory and Coding Tongji University Dai Mingyuan