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. Very suitable for wireless sensor networks with low transmission rates. The ZigBee Alliance was established in 2001. Invensys, Mitsubishi Electric, Motorola and Philips Semiconductor joined in 2002 and is now growing rapidly. The alliance researches and develops other high-level protocols suitable for wireless sensor networks based on the PHY layer, MAC layer and data link layer based on IEEE 802.15.4.
The two standards of the physical layer are 2.4 GHz and 868/915 MHz. They are both based on Direct Sequence Spread Spectrum DSSS (Direct Sequence Spread Spec-trum) technology and use the same physical layer data packet format. The 2.4 GHz band is a globally unified ISM band that does not require application, which is helpful for the promotion of ZigBee equipment and the reduction of 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 delay and shorter working cycle, thereby saving more power.
The ZigBee Alliance defines two physical device types: full-function device FFD (Full Function Device) and reduced-function device RFD (Re-duced Function Device). The star topology of ZigBee network usually consists of one FFD and several RFDs. FFD acts as a network coordinator. Other devices only communicate with the coordinator, and the coordinator decides what to do. If an end device needs to transmit data to another end device, it sends the data to the coordinator, which then forwards the data to the target receiver end device. Through FFD relay transmission, the network can be expanded into other topologies, as shown in Figure 1.
With the research and development of ZigBee, in 2005, major chip manufacturers have launched transceiver modules and communication kits that comply with the ZigBee standard. However, currently only the Norwegian Chip-con Company (CC2420/CC2430 and CC2500/CC2550, etc.) and the American Freescale Semiconductor The ZigBee kits of four original equipment manufacturers (OEMs) of the company (MC13192 and MC13193), US CompXs Company (ML7065) and US Ember Company (EM2420) comply with the standards stipulated by the alliance. In 2007, Texas Instruments (TI) announced the launch of a free download 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, storing network node information, and providing routing information between associated nodes; in addition, the network coordinator must store some basic information , such as node data devices, data forwarding tables and device association tables, etc.
The problem is that the current ZigBee protocol is mainly implemented on low-end 8-bit or 16-bit microcontrollers. For the network coordinator node, its data processing capability is not strong and it is limited to its own hardware resources, so it can 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 PC-based network coordinator node is not only large in size, high in price, but also high in power consumption. It is a waste of resources for sensor networks with low transmission rates. Therefore, a network based on the ARM series embedded chip as the core microprocessor is developed. Coordinators are necessary. The experiment is based on a star structure. On the basis of realizing the RFD function, an embedded network coordinator based on ARM9 is developed, and a 3.5-inch TFTLCD touch screen is provided for human-computer interaction to display the working status and test parameters of other nodes, which will provide future Provides a platform for advanced applications.
2.2 Coordinator hardware structure
The RF chip in this design uses CC2420 from Norwegian Chipcon Company (2.4 GHz, supports 250 kb/s data transmission rate). The microprocessor adopts 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
Using the embedded Linux operating system, based on TI's ZigBee protocol stack, the file system is modified on the original Bootloader and Kernel, GUI applications are 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 process of the network coordinator. Three threads are concurrent for serial port data transmission and reception, GUI display and button response, and ZigBee node offline detection to improve the system response speed. The software structure is shown in Figure 3.
2.4 System data flow
The MAC frame format consists of the following basic parts:
①MAC header frame (MAC Header, MHR), including frame control field, sequence number and address information;
②MAC payload (variable length), the information contained specifies the type of frame;
③MAC layer frame footer (MAC footer, MFR) contains a frame check sequence.
Among them, MHR has a fixed order, and not all frames contain address fields. 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, the ZigBee device uses a 16-bit short address, and the load comes from the sampling voltage value of the photoresistor, which is 2 bytes. The FCS is automatically verified by CC2420. Therefore, the frame length used in this design is 15 bytes. The data format that defines the ZigBee frame is as follows:
Connect the RFD node and PC through the serial port, and you can observe frames in the following format through the serial port debugging assistant:
41 88 0A 01 OO 01 OO 00 OO 00 00 E2 03 F9 EB
The first 2 bytes (88 41) are the frame control domain, the 3rd byte (OA) is the frame sequence number, 4 to 5 bytes (00 01) are the PAN ID of the destination address, and 6 to 7 bytes are the destination address ( 00 01), 8 to 9 bytes (00 00) are the PAN ID of the source address, 10 to 11 bytes (00 00) are the source address, 12 to 13 bytes (03E2) are the payload, 14 to 15 bytes ( F9 EB) is the check digit.
2.6 Coordinator’s data flow and software flow
The data frame transmitted by RFD is received through the antenna and automatically verified by CC2420. If it is correct, it will be decoded and decoded, then sent to ATmega128L through the SPI interface, and then sent to the S3C2440 through the serial port UART1. After data processing, it will be displayed on the corresponding LCD touch screen. The coordinator software process is shown in Figure 5.
3 Experimental results
When two RFDs enter the monitoring range of the network coordinator, the LCD will display two green balls, as well as the corresponding address, data and other information. In the same way, when the RFD is removed or stopped working, the two green balls will disappear from the LCD at the same time.
4 Summary
This design refers to TI's ZigBee protocol stack. After completing the RFD function, it adds the ARM9 chip and peripheral circuits 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, the LCD can interact with humans and computers, and the network port can connect to the Internet. Therefore, it not only improves the overall performance of the network, but also provides a foundation for future applications. The application prospects of sensor networks are very broad and can be widely used in military, environmental monitoring and forecasting, health care, smart homes, building condition monitoring, complex machinery monitoring, urban transportation, space exploration, large workshop and warehouse management, as well as airports, large Safety monitoring of industrial parks and other fields. With the in-depth research and widespread application of sensor networks, sensor networks will gradually penetrate into various fields of human life.
Previous article:Circuit design based on ADAS embedded navigator
Next article:Set-top box media player based on TQ2440 development board
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- MCU + I2C communication response signal is abnormal
- 【NUCLEO-L552ZE Review】- 7 : EXTI - One unexpected thing after another
- Key scanning program based on FPGA
- Issues that should be paid attention to when drawing PCB diagrams from the perspective of welding
- Can anyone help analyze the parameters of this DC-DC transformer?
- In the 5G era, IoT technology empowers smart healthcare
- Sony HT-Z9F speaker system disassembled with Rockchip RKNanoD chip
- Help! Why can the command sent by the microcontroller only display up to the fourth step?
- Future Outlook of IoT
- msp430g2553 hardware IIC