Design of wireless sensor network system based on CC2430

Publisher:TranquilSoulLatest update time:2011-04-19 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Today, the world's communication technology is developing rapidly. With the rapid development of micro-electromechanical systems, system-on-chip, wireless communication and low-power embedded technology, wireless sensor networks (WSN) have been born, and their low power consumption, low cost, distributed and self-organized characteristics have brought about a revolution in the information perception industry. Based on this, a wireless sensor network with CC24 30 as the core is designed and implemented. Among them, the sensor module includes a temperature and humidity sensor SHTll, an infrared sensor BS520, and an illuminance sensor PGM5506.

1 Overall structure of wireless sensor network system
Wireless sensor network is a technology for monitoring and managing information such as temperature, humidity, light, acceleration, etc. in the surrounding environment. This wireless sensor node has built-in sensors, sensor control circuits, CPUs, wireless communication modules, antennas, power supply devices, etc. Through Ad-Hoc communication technology, it can transmit data to the aggregation node together with the surrounding sensor nodes. The wireless sensor network introduced in this article consists of a aggregation node and multiple sensor nodes, which are uploaded to the remote host through the aggregation node. The overall structure of the system is shown in Figure 1.



2 Hardware Circuit Design CC2430 is a system-on-chip launched by Chipcon for implementing embedded ZigBee applications. CC2430 requires only a few external components to operate, and a large number of necessary circuits have been integrated inside, so the signal receiving and sending functions can be realized with fewer peripheral circuits. Figure 2 shows the basic circuit design of CC2430.


In Figure 2, C1 and C2 are 22pF capacitors connected to a 32 MHz crystal oscillator circuit. This quartz crystal oscillator is used for normal operation. C3 and C4 are 15pF capacitors connected to a 32.768 kHz crystal oscillator circuit. This quartz crystal oscillator is used to work during sleep, thereby reducing power consumption. C5 = 0.1μF, used to remove some clutter interference and prevent the microcontroller from resetting incorrectly. C6 ~ C8 are 100nF, 220nF, 220nF respectively, used for filtering, removing clutter interference and making the voltage more stable. C9 = 5.6pF, the non-balanced transformer in the circuit is composed of capacitor C9 and inductors L1, L2, L3 and a PCB microwave transmission line. The entire structure meets the requirements of RF input/output matching resistance (50Ω), L1, L2, L3 are 8.2nH, 22nH, 1.8nH respectively. C10, C11, C12, C13, C14 are decoupling capacitors used for power supply filtering to improve the stability of the chip. Bias resistors R1 and R2 are 43 kΩ and 56 kΩ respectively. R1 is used to set the precise bias current for the 32 MHz crystal oscillator.
Due to the low power consumption of the CC2430 chip, two 2 800 mAh dry batteries are selected to power the node machine. The antenna uses an external antenna. The
connection schematic diagram of CC2430 with the temperature and humidity sensor SHTll, the light sensor PGM5506, and the infrared sensor BS520 is shown in Figure 3, where P0.0, P0.1, P0.6, P1.2 and P1.3 are the I/O ports of CC2430.

8c.jpg


SHTll uses a two-wire serial line to communicate with the processor for data. The SCK data line is responsible for the communication synchronization between the processor and SHTll; the DATA tri-state gate is used to read data. To avoid signal conflicts, the microprocessor should drive DATA at a low level. An external pull-up resistor is required to pull the signal to a high level. Figure 3 shows that pin P1.2 of CC2430 is used for SCK and P1.3 is used for DATA.
The light sensor PGM5506 is actually a photoresistor. The resistance value changes with the amount of light in the surrounding environment, so the input 3 V voltage is affected by the photoresistor that changes with the amount of light, and the output voltage value changes. In the LIGHTOUT that measures the output voltage value, the light amount can be sensed according to the changing voltage amount. Figure 3 shows that pin P0.0 of CC2430 is connected to LIGHT OUT. The infrared sensor BS520, the output A/D also changes with the strength of the infrared light, so the CC2430 processor can measure the infrared value according to the input current change. Figure 3 shows that pin PO.1 of CC2430 is connected to INFRARED ADC.

3 Design of network node software
The software of the network node includes sensor data acquisition and wireless communication. Data acquisition includes temperature and humidity sensors, light intensity sensors, and infrared sensors. Since the data acquisition of light intensity sensors and infrared sensors is to directly convert the input analog quantity into digital quantity, the software design is relatively simple. The following only takes the temperature and humidity sensor SHTll as an example to introduce the data acquisition software. Wireless communication uses ZigBee technology to send the collected data to the coordinator and the coordinator receives the data.
3.1 Temperature and humidity data acquisition module
The temperature and humidity sensor SHTll uses a serial interface, but it has been optimized in terms of sensor signal reading and power consumption. SCK is used for communication synchronization between CC2430 and SHTll, and the DATA bidirectional serial communication line can write commands and read data. The control flow chart is shown in Figure 4. First, initialize the data transmission, and then send a set of measurement commands. SHTll receives the command measurement data and the post-processor reads the data.

8d.jpg


3.2 Wireless Communication Module
ZigBee network supports three topologies, namely star, tree and mesh topologies. The protocol stack used in this system is the TI protocol stack. The protocol stack is appropriately modified and added to adapt to the actual application of the hardware circuit to form a tree sensor network.

8e.jpg


The network coordinator program flow chart is shown in Figure 5. First, CC2430 is initialized , then the protocol stack is initialized, and then a new network is created, and PANID and channel selection are determined. After the global interrupt is turned on, the program starts to enter the application program, monitoring whether there is a ZigBee signal in the air. If a node applies to join the network, the network coordinator assigns a network address to the node. Similarly, if the terminal device sends the sensor test data value, it will be sent to the remote host from the serial port.

8f.jpg


The sensor node program flow chart is shown in Figure 6. The program also initializes CC2430 first, then initializes the protocol stack, and turns on the global interrupt. Start sending a signal to join the network and wait for the coordinator to respond. If the network is successfully joined, the sensor enters a dormant state. If it fails, it continues to apply to join the network. After joining the network successfully, the temperature and humidity acquisition node collects data regularly and sends it to the coordinator. If the transmission is successful, the system enters a dormant state. If the transmission fails, it continues to send the current temperature value.

4 Experimental results
The hardware of each node of the system adopts a modular design. The CC2430 baseboard module is shown in Figure 7, and the sensor module is shown in Figure 8. In a clear and open place, the transmission distance between ZigBee nodes can reach 50 to 70 m, and the effective transmission distance can reach about 30 m under indoor conditions. The real-time temperature information collected can be monitored by the serial port transceiver software on the host, which can well realize the reading of temperature information. The monitored temperature is shown in Figure 9.

8g.jpg



5 Conclusion
Through the design of wireless sensor network system and the understanding of CC2430, the future application prospect of ZigBee technology is promising. In the next few years, it will be applied in many fields such as industrial control, automotive automation, building automation, consumer electronics, etc.

Reference address:Design of wireless sensor network system based on CC2430

Previous article:Wireless sensor network body temperature and pulse monitoring system based on JN5139
Next article:DSP Implementation of Electro-hydraulic Position Control System Using NNC-PID Controller

Latest Industrial Control Articles
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号