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.
Previous article:Design of JPEG image compression system based on Zynq
Next article:Some opinions on learning embedded low-level development
- 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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- 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
- Circuit View (Collection)
- SimpleLinkTM low-power Bluetooth wireless MCU supports Alibaba Cloud Link IoT platform
- CC3235x SimpleLink Wi-Fi MCU Solutions
- [MPS Award-winning Review] Let’s talk about the past of model selection
- Schematic diagram of TMCC160 low voltage DC servo system-on-chip supporting EtherCAT CANopen
- Unboxing - ESP32-S2-KALUGA-1+K210Sipeed M1
- Adder
- Low power touch solution supporting sleep and wake-up
- Qinheng USB PD and other fast charging protocol power receiving chip CH224 evaluation - the second level configuration test and battery charging test
- MSP-EXP430F5529LP Development Board 005-PWM Library Function + Clock Configuration