Design of wireless temperature and humidity system based on Zigbee2007/PRO protocol of CC2530

Publisher:开国古泉Latest update time:2012-07-02 Source: 现代电子技术 作者:Keywords:CC2530 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The progress and development of computer technology and modern communication technology have made Zigbee technology mature. This system has established a mesh network based on the Zigbee2007/PRO protocol, using new low-power sensor equipment to collect temperature and humidity information. The terminal nodes are designed so that the terminal nodes can autonomously discover and join the network and bind, and then send the real-time detected temperature and humidity data to the terminal nodes. Wireless sensor networks, an emerging cross-disciplinary that integrates sensor technology, information processing technology and wireless communication technology, have been widely used in automatic control, environmental monitoring and other fields. Combining the characteristics of the Zigbee2007/PRO protocol and the current market requirements for environmental monitoring, a wireless temperature and humidity monitoring system based on the Zigbee2007/PRO protocol of CC2530 is designed, and the feasibility of the key parts of the system is analyzed through practice.
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.

f.JPG


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.

a.JPG [page]

b.JPG


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.

e.JPG

[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.

g.JPG

i.JPG


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:
h.JPG

[page]

k.jpg
j.JPG

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.

c.JPG

d.JPG



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.

Keywords:CC2530 Reference address:Design of wireless temperature and humidity system based on Zigbee2007/PRO protocol of CC2530

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

Research and Experiment on ZigBee Wireless Sensor Network
introduction Some people translate ZigBee into "Purple Bee", which is one of the standards for Wireless Personal Area Networks (WPAN) and was announced on June 27, 2005. In addition to the logical link control (LLC) layer, media access control layer (MAC), and physical layer using the IEEE 802.15.4 standard
[Industrial Control]
CC2530 Basics 1. Introduction to CC2530
Register quick operation In fact, you can assign values ​​directly, which is relatively easy to understand, but after you become proficient, this method is faster. 1. Only set certain bits in the register to 1 without affecting other bits Use or operate "|". Any value ORed with 0 retains its original value. Any
[Microcontroller]
CC2530 Basics 1. Introduction to CC2530
Low-power ZigBee solution based on ATmega128RFA1
The ATmega128RFA1 from Atmel is a low-power CMOS 8-bit MCU that uses the AVR enhanced RISC architecture and a 2.4GHz ISM band high data rate transceiver with a throughput of 1 MIPS per MHz. The wireless transceiver has a data rate from 250 kb/s to up to 2 Mb/s and also provides frame processing. It has excellent rec
[Analog Electronics]
Low-power ZigBee solution based on ATmega128RFA1
CC2530 serial port command to control LED light switch
Experimental requirements Code #include "ioCC2530.h"   #define D4 P1_1 #define D6 P1_4   unsigned char temp=0; //Receive command variable   //System clock switching function from 16M to 32M void Set_Clock_32M() {   CLKCONCMD &=~0x40;   while(CLKCONSTA &0X40)   {        }   CLKCONCMD &=~0x47; }   //Port initializatio
[Microcontroller]
CC2530 serial port command to control LED light switch
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号