At present, there are more and more applications where multiple standards and protocols coexist, and gateways that act as a bridge for protocol conversion play a key role. The two most popular local wireless technologies are undoubtedly Wi-Fi and Bluetooth. However, for low-power, low-bandwidth control applications, such as sensor networks in factories, ZigBee may be a better choice. Equipped with a powerful processor, ZigBee can efficiently complete many complex applications under the constraints of low power consumption and low bandwidth.
ZigBee has become one of the most popular technologies in industrial wireless communication due to its many advantages such as low cost, low power consumption, and flexible networking. ZigBee is a low-speed network with a transmission speed of 10KB/S to 250KB/S. The diverse interconnection methods make the networking method flexible and robust.
This article introduces a design of ZigBee industrial Ethernet gateway based on AT91SAM9260, which realizes a transparent access between ZigBee and industrial Ethernet. The upper layer adopts ZigBee protocol, which is applied to Ethernet protocol conversion for short-distance wireless control, monitoring, data transmission, etc. in industrial sites, and has an embedded WebServer to realize remote monitoring and remote data interaction of field instruments. The system application block diagram is shown in Figure 1. Users can directly access or modify instrument data through the WebServer embedded in the ZigBee Ethernet gateway to realize remote monitoring and remote diagnosis of field instruments. When the gateway is connected to GPRS or the Internet, you can access industrial field instrument data at any time no matter where you are, realize remote configuration, remote diagnosis and remote operation of field instruments, and enable different sensor monitoring networks around the world to share information. Figure 1 ZigBee Ethernet gateway application diagram 1 Hardware design
The gateway hardware is shown in Figure 2. The system is based on AT91SAM9260, which is a high-performance ARM9 processor from ATMEL. The main frequency can reach 200M, with Ethernet MAC, expanded Ethernet PHY module, ZigBee wireless communication module, Nand FLASH and SDRAM. In the figure, K9F2G08 is 256M Nand FLASH, HY57V64162 is 64M SDRAM, and is directly connected to the address line, data line, chip select line, and read and write line of AT91SAM9260 without decoding.
DM9161 is an Ethernet PHY chip, 10M/100M compatible, and implements the Ethernet physical layer. CC2520 is TI's second-generation ZigBee/IEEE 802.15.4 RF transceiver, with the best selectivity/coexistence and excellent link budget features in the industry today. It aims to meet the requirements of ZigBee/IEEE 802.15.4 and proprietary wireless systems in various applications, and provides a wide range of hardware support, including data packet processing, data buffering, burst transmission, data encryption, data authentication, idle channel evaluation, link quality indication, and data packet timing information, etc., and communicates and controls data with AT91SAM9260 through SPI. Figure 2 Gateway hardware block diagram 2 Software design
The gateway software uses the embedded Linux-2.6.28 kernel, adds ZigBee services to the upper layer application, and realizes the conversion between ZigBee and Ethernet protocols. The Ethernet data message is received through the UDP port, the frame header and frame tail are removed, the ZigBee short address is attached, and it is sent to CC2520 through the serial port and encapsulated as a ZigBee message. The ZigBee message of the field data is converted by CC2520 to serial port data reception, the ZigBee short address is removed, the UDP frame header and frame tail are attached, and then forwarded by the Ethernet port. The software design architecture is shown in Figure 3. [page] Figure 3 Gateway software design architecture The software execution flow chart is shown in Figure 4. The underlying hardware initialization includes clock settings, GPIO management, serial port configuration, Ethernet interface MII configuration, and PHY chip settings. Then the CC2520 initialization configuration wireless communication module complies with the ZigBee protocol standard. After the CC2520 is initialized, the module can realize transparent serial port transmission and interact with the ARM processor for data. In order to adapt to the development trend of short-frame real-time and deterministic communications, Ethernet communication uses the UDP/IP protocol to start the Linux kernel multi-task scheduling management to perform tasks such as sending and receiving serial port data, receiving and sending UDP, and embedded WebServer. Figure 4 Software execution flow 3 ZigBee and Ethernet protocol conversion software design
The TCP/IP protocol uses MAC addresses to identify hardware addresses and uses the ARP protocol to resolve hardware addresses to IP addresses. Therefore, the conversion from ZigBee to ARP addresses must be completed to ensure normal communication. Each node in ZigBee has its own MAC address, which is composed of a 64-bit long address and a 16-bit short address. This article designs and implements the adaptation layer and ARP in the ZigBee protocol to complete the mapping of MAC addresses to Ethernet IP addresses in ZigBee. The workflow diagram is shown in Figure 5. When the gateway receives an Ethernet data packet normally sent to the local IP, it is sent to the upper layer UDP (TCP) for processing after protocol judgment, and finally to the gateway application for processing. The gateway application analyzes and determines which node in the ZigBee network needs to be forwarded to, and resolves the corresponding node MAC address in ZigBee through the ARP address of the ZigBee end, and sends the corresponding data packet to the node to complete a data communication.
Similarly, when the ZigBee end receives the data packet, it will send the data packet to the corresponding node or device through the same analysis. Through the embedded WebServer, users can access, modify, and configure the ZigBee node in real time. Figure 5 Gateway protocol working block diagram 4 Conclusion
The WebServer is embedded in the gateway, which can access or modify the data of field instruments at any time through Ethernet, realizing remote control, remote diagnosis, etc. This product effectively solves the problem of connecting the short-distance ZigBee wireless communication to Ethernet in industrial sites, and approaches the Internet of Things in a new way.
Previous article:Design of Charging Station Monitoring System Based on MCGS
Next article:Design of GUI for digital encrypted telephone system based on MiniGUI
Recommended ReadingLatest update time:2024-11-16 20:57
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Detailed explanation and engineering practice of unmanned monitoring technology (Xie Jianbin, Li Peiqin, Yan Wei, Liu Tong, Lin Chenglong, Hong Quanyi, Zhou Hongfei, Cui Yibing)
- Introduction to Wireless Sensor Networks (Edited by Ma Sasa et al.)
- Introduction to the Internet of Things (Liu Yunhao)
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
- After adding shutdown and low power consumption, stm32 will run away after working for 8-9 hours
- [Silicon Labs Development Kit Review] +6-axis inertial sensor ICM-20648
- Welcome our new moderator, Azuma Simeng~~
- Thanks to all the staff of Electronic Engineering Forum
- TI DSP--Memory space allocation and designation
- Reward (1000RMB) 3-output Hall speed sensor chip selection and external circuit design
- How to set up the Qt program to start automatically on the Sinlinx A64 development board
- Four aspects to understand the internal loss of switching power supply
- Some time functions in C language (time/sleep/clock)
- ESP32 MicroPython Web Server – Web page displaying sensor data