Design of ZigBee Industrial Ethernet Gateway Based on AT91SAM9260

Publisher:量子启示Latest update time:2021-05-31 Source: eefocusKeywords:AT91SAM9260 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Preface


Industrial wireless communication technology is another industry research hotspot in the field of industrial automation after industrial Ethernet and industrial fieldbus technology. At present, the number of applications where multiple standards and protocols coexist is increasing, and the gateway that acts as a bridge for protocol conversion plays 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 application block diagram of the system 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.



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/write line of AT91SAM9260 without decoding.


DM9161 is an Ethernet PHY chip, 10M/100M compatible, realizing 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, aiming 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 performs data communication and control with AT91SAM9260 through SPI.



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.



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 initialization settings, 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 communication, Ethernet communication uses UDP/IP protocol to start the Linux kernel multi-task scheduling management, and performs tasks such as sending and receiving serial port data, receiving and sending UDP, and embedded WebServer.



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 a data packet, it sends the data packet to the corresponding node or device through the same analysis. Through the embedded WebServer, users can achieve real-time access, modification, and configuration of ZigBee nodes.



4 Conclusion


The embedded ZigBee Ethernet gateway designed and developed based on the AT91SAM9260 processor is used for monitoring and controlling physical quantities such as pressure, temperature, and flow in wireless communication situations. It has Ethernet access function and a built-in WebServer in the gateway. It can access or modify the data of field instruments at any time through Ethernet to achieve remote control and remote diagnosis. This product effectively solves the problem of connecting short-distance ZigBee wireless communication to Ethernet in industrial sites, approaches the Internet of Things in a new way, and lays the foundation for more complex wireless applications in the future. Field applications show that the ZigBee Ethernet gateway product based on AT91SAM9260 has reliable performance and meets current market demand. It is a good innovation in short-distance ZigBee communication in industrial sites, meets customer requirements, and has broad application prospects.


Keywords:AT91SAM9260 Reference address:Design of ZigBee Industrial Ethernet Gateway Based on AT91SAM9260

Previous article:Design of JPEG image compression system based on Zynq
Next article:Some opinions on learning embedded low-level development

Latest Microcontroller 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号