1 Overview
There are various wireless communication methods. Compared with Bluetooth, Wi-Fi, and GSM mobile communication methods, the ZigBee method developed by the ZigBee Alliance has the advantages of low power consumption, reliable data transmission, good compatibility, low implementation cost, and convenient networking. It is very suitable for wireless sensor networks with low-rate transmission. The ZigBee Alliance was established in 2001. In 2002, Invensys, Mitsubishi Electric, Motorola, and Philips Semiconductors joined. Now it is growing rapidly. The alliance is researching and developing other high-level protocols suitable for wireless sensor networks based on the PHY layer, MAC layer, and data link layer of IEEE 802.15.4.
The two physical layer standards are 2.4 GHz and 868/915 MHz, both based on direct sequence spread spectrum DSSS (Direct Sequence Spread Spec-trum) technology and using the same physical layer data packet format. The 2.4 GHz band is a globally unified ISM band that does not require an application, which helps promote ZigBee devices and reduce production costs. Its physical layer can provide a transmission rate of 250 kb/s by using 16-phase high-order modulation technology, which helps to achieve higher throughput, smaller communication delays and shorter working cycles, thereby saving more power.
The ZigBee Alliance defines two types of physical devices: Full Function Device (FFD) and Reduced Function Device (RFD). The star topology of a ZigBee network usually consists of one FFD and several RFDs. The FFD acts as a network coordinator, and other devices only communicate with the coordinator, which decides what to do. If a terminal device needs to transmit data to another terminal device, it will send the data to the coordinator, which will then forward the data to the target receiver terminal device. Through FFD relay transmission, the network can be expanded into other topologies, as shown in Figure 1.
With the development of ZigBee research, in 2005, major chip manufacturers launched transceiver modules and communication kits that meet the ZigBee standard. However, currently only four original equipment manufacturers (OEMs), including Norwegian Chip-con (CC2420/CC2430 and CC2500/CC2550, etc.), American Freescale Semiconductor (MC13192 and MC13193), American CompXs (ML7065) and American Ember (EM2420), have ZigBee kits that meet the standards set by the alliance. In 2007, Texas Instruments (TI) announced the release of a free downloadable version of the ZigBee protocol stack (Z-Stack).
2 Design and debugging
2.1 Research objectives
The main function of the network coordinator is to coordinate the establishment of the network. Other functions include: transmitting network beacons, managing network nodes and storing network node information, and providing routing information between associated nodes. In addition, the network coordinator needs to store some basic information, such as node data devices, data transfer tables, and device association tables.
The problem is that the current ZigBee protocol is mainly implemented on low-end 8-bit or 16-bit microcontrollers. For network coordinator nodes, their data processing capabilities are not strong, and they are limited by their own hardware resources, so they rarely achieve a good human-computer interaction interface. For ZigBee coordinators with higher functional requirements, this architecture is difficult to meet the needs of applications. The network coordinator nodes based on PCs are not only large in size, high in price, but also consume a lot of power, which is a waste of resources for sensor networks with low transmission rates. Therefore, it is necessary to develop a network coordinator based on ARM series embedded chips as the core microprocessor. Based on the star structure, the experiment develops an ARM9 embedded network coordinator on the basis of realizing the RFD function, providing a 3.5-inch TFTLCD touch screen as a human-computer interaction, displaying the working conditions and test parameters of other nodes, and providing a platform for future advanced applications.
2.2 Coordinator Hardware Structure
The RF chip used in this design is CC2420 (2.4 GHz, supports 250 kb/s data transmission rate) from Norwegian Chipcon. The microprocessor uses S3C2440 embedded industrial-grade chip. The hardware block diagram is shown in Figure 2, ARM (left) + RFD (right) = ARM embedded network coordinator.
2.3 Coordinator Software Structure
Embedded Linux operating system is used. Based on TI's ZigBee protocol stack, the file system is modified on the original Bootloader and Kernel, a GUI application is added, and the system startup script is modified to make the application run automatically when the system starts. Multi-threading technology is used in the implementation of the network coordinator. Three threads of serial port data transmission and reception, GUI display and button response, and ZigBee node offline detection are concurrent to improve the system response speed. The software structure is shown in Figure 3.
[page]
2.4 System data flow
The MAC frame format consists of the following basic parts:
①MAC header frame (MHR), including frame control field, sequence number and address information;
②MAC payload (variable length), containing information that specifies the type of frame;
③MAC layer frame tail (MAC footer, MFR), which contains a frame check sequence.
Among them, MHR has a fixed order, and not all frames contain the address field. The general MAC frame format is shown in Figure 4.
2.5 Definition and Analysis of System ZigBee Frame Format
In the design of RFD, ZigBee devices use 16-bit short addresses, the load comes from the sampled voltage value of the photoresistor, which is 2 bytes, and the FCS is automatically checked by CC2420. Therefore, the frame length used in this design is 15 bytes. The data format of the ZigBee frame is defined as follows:
Connect the RFD node and PC through the serial port. Through the serial port debugging assistant, you can observe frames similar to the following format:
41 88 0A 01 OO 01 OO 00 OO 00 00 E2 03 F9 EB
The first two bytes (88 41) are the frame control field, the third byte (OA) is the frame sequence number, bytes 4 to 5 (00 01) are the PAN ID of the destination address, bytes 6 to 7 are the destination address (00 01), bytes 8 to 9 (00 00) are the PAN ID of the source address, bytes 10 to 11 (00 00) are the source address, bytes 12 to 13 (03E2) are the payload, and bytes 14 to 15 (F9 EB) are the check bits.
2.6 Data flow and software flow of the coordinator
The data frame transmitted by RFD is received through the antenna and automatically checked by CC2420. If it is correct, it is decoded and sent to ATmega128L through the SPI interface, and then sent to S3C2440 through the serial port UART1. After data processing, it is displayed on the corresponding LCD touch screen. The coordinator software flow is shown in Figure 5.
3 Experimental Results
When two RFDs enter the monitoring range of the network coordinator, two green balls will be displayed on the LCD, along with the corresponding address, data, etc. Similarly, when the RFD is removed or stopped, the two green balls will disappear from the LCD at the same time.
4 Conclusion
This design refers to TI's ZigBee protocol stack. After completing the RFD function, an ARM9 chip and peripheral circuits are added to expand it into a wireless sensor network coordinator. This coordinator has rich functions: LED can indicate the working status, the processor can increase the computing speed, LCD can interact with human and machine, and the network port can connect to the Internet. Therefore, it can not only improve the overall performance of the network, but also provide a foundation for future applications. The application prospects of sensor networks are very broad. They can be widely used in military, environmental monitoring and forecasting, health care, smart homes, building status monitoring, complex machinery monitoring, urban transportation, space exploration, large workshops and warehouse management, as well as airports, large industrial parks and other fields of security monitoring. With the in-depth research and wide application of sensor networks, sensor networks will gradually penetrate into all areas of human life.
Previous article:Design of video monitoring system based on ARM embedded system
Next article:Design of Embedded Network Interface Based on ARM9 AT91RM9200T
Recommended ReadingLatest update time:2024-11-16 19:46
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- osk5912 evaluation board example source code
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
- Introduction to the transmission distance and wall penetration capability of Zigbee communication technology
- Run-time and load-time initialization
- Smart Flow Meter with MSP430 Ultrasonic Sensing Microcontroller
- How to use J-Flash Lite and J-Link BASE to burn the internal Flash of the STM32F107VC board?
- Tailing Micro B91 Development Kit---freertos
- Build building automation systems that can run on batteries for decades
- Project establishment of the JIHAI APM32E103VET6 evaluation (Keil)
- Analysis of key technologies of small base stations in the 5G era
- Allwinner V5 - Building FTP environment --- Lindeni V5 development board
- Chip manual calculation problem