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.
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.
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.
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.
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.
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.
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
- 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
- I would like to know the functions of these two components, about switching power supply.
- Molex's compact Type-C connector saves valuable space in your design! Download and get a gift! Event starts now
- Playing with Zynq Part 7 - Ubuntu and Windos file transfer tool WinSCP
- RT-Thread operating system μC/OS-III compatibility layer
- LSM6DSL power consumption problem
- [Rawpixel RVB2601 development board trial experience] TCP_SEVER communication
- A naked scheme, is this true?
- The legendary RTOS ThreadX is now fully open source! Live pre-registration | Microsoft's new IoT solution is now officially released
- MSP430G2553 timer output PWM programming example
- Amazing! The most amazing essay with a score of "zero" in this year's college entrance examination!