Hardware and software design of Zigbee access points in EPA system
2026-04-06 05:58:43··#1
Abstract: Introducing Zigbee technology into EPA networks is a newly proposed research topic. Based on the analysis of ZigBee technology, this paper performs system modeling and design for ZigBee access to the EPA control network, presents an implementation scheme and protocol model for ZigBee access to the EPA control network, and designs an EPA-ZigBee access point device according to the proposed scheme. Finally, the designed access point device is tested multiple times. Analysis and test results show that the EPA-ZigBee access point device operates stably and reliably, meeting various needs in the work field. Keywords: IEEE 802.15.4, Zigbee access, EPA, MAC protocol model Introduction With continuous rolling support from the National 863 Program, Chongqing University of Posts and Telecommunications, as a core unit, participated in the formulation of the national standard—"EPA (Ethernet for Plant Automation) System Architecture and Communication Standard for Industrial Measurement and Control Systems" (hereinafter referred to as "EPA Standard"). Based on this, 85C/357/NP was published by the International Electrotechnical Commission (IEC) as IEC/PAS 62409 with a 95.8% approval rate. It was included as Type 14 in the international real-time Ethernet standard IEC 61748-2 and will also be included as Type 14 in the international fieldbus standard IEC 51158 (revised version). The EPA standard is an industrial control network communication standard based on information network communication technologies such as Ethernet, wireless LAN, and Bluetooth, suitable for data communication between industrial automation control system devices and instruments, and between industrial automation instruments themselves. Zigbee is a low-speed (2kbps~200kbps) WPAN IEEE standard with a transmission rate of only 100Kbps. It also features low power consumption, simple architecture, and low cost, making it suitable for various wireless needs, especially in industrial control (monitors, sensors, and automatic control equipment), where it demonstrates unique advantages. Introducing Zigbee technology into the EPA network is a newly proposed research topic. This paper focuses on how to integrate ZigBee wireless communication with wired real-time Ethernet, proposing a scheme for ZigBee access to the EPA network, and designing an implementation example device—the EPA-ZigBee access point device—based on the proposed scheme. After repeated testing and verification, the EPA-ZigBee access point device is currently operating stably, reliably, and securely, meeting various needs in the work field. 1 ZigBee Access to EPA Network Scheme 1.1 ZigBee Access Point Access to EPA Network Scheme EPA is a wired network, while ZigBee is a wireless communication technology. Addressing the research topic of how to integrate ZigBee technology into the EPA network, a networking scheme is proposed. In this scheme, the EPA wired network consists of a remote monitoring center, application computer, EPA server, and database; the ZigBee network consists of EPA field devices and EVA-ZigBee access points. The EPA wired network and the ZigBee network are connected through the EPA-ZigBee access point, which is responsible for the connection and data forwarding between the ZigBee network and the wired network. ZigBee networks support star, tree, and mesh topologies, allowing for the networking of multiple ZigBee devices. In this overall solution, the ZigBee access point is a crucial device in the EPA control network, responsible for managing terminal devices and coordinating communication between wireless and wired networks. The ZigBee access point connects ZigBee devices to the EPA wired network, acting as a bridge between the EPA wired network and the ZigBee network. As a wireless access point, the ZigBee terminal devices collect field data, process and package the data, and transmit it to the ZigBee access point via a wireless link. Here, the EPA-ZigBee access point is a ZigBee module with access point functionality, essentially an EPA gateway. It maps each field device in the ZigBee network to an IP address and a TCP/UDP port, enabling the mutual conversion between IP addresses, TCP/UDP ports, and ZigBee network addresses. This allows other devices in the EPA wired network to access each field device via its IP address and TCP/UDP port. 1.2 Zigbee Access EPA Network Layered Protocol Model Considering the characteristics of control networks, where information transmitted is mostly short-frame information and information exchange is frequent, and to make the communication protocol of the control network simple and practical, improve work efficiency and communication real-time performance and time determinism, and shorten system response time, based on the analysis of the characteristics of the control system, the IEEE 802.15.4 protocol and the Zigbee protocol, and the feasibility of ZigBee access in EPA, this paper proposes an application model of the communication protocol layers between EPA access devices and the IEEE 802.15.4/ZigBee network, and between EPA access devices and the EPA wired network. The layered architecture of this communication protocol is shown in Figure 1. In this communication protocol layer, the functions of each layer of the IEEE 802.15.4/ZigBee protocol are as follows: ① Physical Layer. IEEE 802.15.4 operates in the 2.4 GHz ISM band. It adopts Direct Sequence Spread Spectrum (DSSS) modulation to reduce the cost of digital integrated circuits, and uses the same packet structure for short operation cycles and low power consumption. ② MAC Layer. It handles all physical wireless channel access, generates network and synchronization signals, supports PAN connection and disconnection, and provides a reliable link between two peer MAC entities. ③ EPA Application Layer. The EPA application layer provides an interface for data communication between user application processes. For real-time industrial control applications, it provides real-time communication services such as variable access, event management, and file upload/download. When sending data, the EPA application process should provide all required parameters when calling the application layer service. The application layer service then encodes the data and passes it to the network interface layer object, which then calls the network layer data transmission service to send the data. When receiving data, the application layer uploads it to the application layer service after receiving data from the communication port. The application layer service, based on the destination application process identifier ID in the service message, transmits the received data to the corresponding user application process in the application layer. The user application process then updates and further processes the corresponding parameters. 2 Hardware Design of the EPA-Zigbee Access Point Data collected by Zigbee field devices is processed and transmitted to the ZigBee access point via a wireless link. The interface circuit of the ZigBee access point is shown in Figure 2. The MCU used is the C8051F120, distributed by Xinhualong. It is a fully integrated mixed-signal system-on-a-chip (SoC) with 128KB Flash memory, 8448 bytes of on-chip RAM, a peak clock speed of 100MHz, and 64 digital I/O pins. The C8051F120 was chosen primarily due to the system's storage capacity and processing speed. Access points handle more requests than terminals, making the C8051F120 more suitable. The RAM is an IS62LV2568 with 256KB of storage and a 3.3V operating voltage. The main purpose of using RAM is to expand the C8051F120's memory, as the EPA protocol stack needs to be programmed here, requiring a significant amount of memory. The Zigbee module is the IP-Link 1270. This is a 2.4 GHz wireless transceiver module fully compliant with the IEEE 802.15.4 standard and ZigBee specifications. The module provides a series of commands, allowing for convenient configuration of various key attributes. Users can configure parameters using terminal configuration tools or the module's UART. The module's primary function is data acquisition and control of industrial field devices (which also have an IP-Link 1270 module). Data and control information are transmitted via wired network to a PC for display or input from the PC. The RTL8019PLS Ethernet controller is manufactured by Realtek. This highly integrated Ethernet controller chip integrates the Media Access Control (MAC) sublayer and physical layer performance, facilitating the design of ISA bus-based systems and offering simple interfacing with general-purpose microcontrollers. Furthermore, it boasts advantages such as NE2000 compatibility, good software portability, and low cost, holding a significant market share in the 10Mbps network card market. 3. Software Implementation of the EPA-Zigbee Access Point The software implementation of the access point consists of roughly three modules: driver and communication between Zigbee and C8051F120, driver and communication between C8051F120 and RTL8019, and conversion of ZigBee messages into EPA messages. Before introducing the software implementation, let's briefly introduce the protocol model of the ZigBee access point. 3.1 Communication Process of the Zigbee Access Point The following is the protocol model of the designed ZigBee access point, as shown in Figure 3. The basic principle is to build a self-organizing network (SON) – one of the ZigBee PAN implementation modes – through the network layer above the ZigBee MAC layer. This is a network formed between devices with ZigBee. Both the client and the access point are members of the PAN. At the same time, the access point must also implement another ZigBee PAN implementation mode, the Network Access Point (NAP) function. Other devices with ZigBee can only access the wired network through NAP if they are PAN members. The communication process of a Zigbee access point implemented using the network layer is as follows: After the connection is fully established, the communication process between the ZigBee device and the Ethernet device can be described as follows: The application data is packaged by the MAC layer and LLC layer, and then encapsulated with the headers of each layer. The encapsulated data packet is then sent to the corresponding physical layer of the EPA-ZigBee access point device through the physical layer. In the EPA-ZigBee access point device, each corresponding layer will unpack the received data packet. The entire unpacking process is the reverse of the encapsulation process. The unpacked data packet is handed over to the LLC layer for re-encapsulation, and then further encapsulated by the 802.3 MAC layer before being transmitted to the EPA network through the physical layer interface. After receiving the above data packet, the EPA field device will also perform the unpacking process until it obtains the data from the sending application. 3.2 Driver and Communication between Zigbee and C8051F120 The Zigbee module is a 2.4 GHz wireless transceiver module. The serial port baud rate used is 38400 bps. The connection between the ZigBee module and the C8051F120 uses a UART1 serial port driver. (The source code for writing the UART1 serial port driver to implement the communication connection between the ZigBee module and the C8051F120 is omitted.) 3.3 Driver and Communication between C8051F120 and RTL8019 The connection between the RTL8019 and C8051F120 consists of data lines, address lines, and control lines. To complete the communication between them, serial port drivers and communication programs for both need to be written. 3.4 Zigbee Message to EPA Message Conversion The received Zigbee messages need to be converted into EPA messages to finally complete the ZigBee application in the field. The ZigBee module receives messages encapsulated according to the ZigBee protocol. The data field (DATA) needs to be extracted and the header, trailer, and other fields defined by the EPA protocol added to convert it into the standard message format defined by the EPA protocol. Extracting Device Data Parameters from Zigbee Protocol Format: 4. Conclusion The demand for Zigbee technology in industrial environments has increasingly attracted industry attention. Industrial applications of Zigbee technology differ from other applications. The transmitted data in industrial applications is shorter but more critical, requiring accurate transmission. Furthermore, industrial equipment is often placed in harsh environments such as high temperatures and strong vibrations; power consumption is also a significant issue, necessitating frequent manual replacement if batteries are used. Its usability needs to be considered. Zigbee technology, with its low data rate, low power consumption, low cost, simple architecture, and small size, perfectly meets the needs of industrial environments. Its security and reliability also make its application prospects very optimistic. In summary, the design of the Zigbee access point device and the implementation of EPA network communication demonstrate the feasibility of Zigbee access to EPA networks. Zigbee access to EPA networks is an important and meaningful supplement to existing EPA wireless access methods.