Share this

Development of an ARM-based Industrial Ethernet Smart Gateway

2026-04-06 08:57:29 · · #1
Abstract: This paper introduces the design method of an industrial Ethernet intelligent gateway using the LPC2210 microcontroller with a 32-bit embedded ARM core. The design includes CAN bus, USB bus, and Ethernet interface hardware circuits, as well as a real-time multitasking software flow based on μC/OS-II. This industrial Ethernet intelligent gateway solves the data transmission problem between instruments and Ethernet, enabling remote control and access to instruments. Keywords: Intelligent gateway, ARM, Real-time operating system 1. Overview Currently, bus technology is widely used in industrial control, connecting various devices in the system to form an industrial network system. Nodes in this system include: sensors with intelligent and communication features, controllers, various communication devices, and computers. However, due to competition among different groups, there are many different bus methods for industrial field instruments. Some instruments use serial communication, some use USB bus, some use CAN bus, and some use Ethernet. These instruments are independent and difficult to monitor or manage centrally. Clearly, the development trend of these bus control systems should be to adhere to unified technical specifications, truly forming an open interconnected system, and seamlessly connecting with the widely used information network—Ethernet. Therefore, building industrial Ethernet will be the main development direction of industrial control networks. However, in terms of processors, the TCP/IP protocol stack currently running on 8-bit and 16-bit microcontroller platforms can connect intelligent control devices, instruments, etc. to Ethernet, but it can only complete simple, low-speed data transmission, which cannot meet the real-time and reliability requirements of industrial sites, especially when there are many connection requests or complex control tasks, where real-time performance is almost non-existent. Therefore, it is necessary to use a more powerful and faster 32-bit microprocessor and run an application-specific embedded real-time operating system for reasonable task scheduling to meet the real-time and reliability requirements of industrial sites. This paper develops an industrial Ethernet intelligent gateway based on the ARM core-based 32-bit microcontroller LPC2210. 2. Hardware System Architecture of ARM-based Intelligent Gateway The PHILIP LPC2210 is a microcontroller based on a 32-bit ARM7TDMI-S core architecture that supports real-time simulation and tracing. The ARM architecture is based on the Reduced Instruction Set Computer (RISC) principle. Due to its pipelining technology, all parts of the processing and storage system can operate continuously. Typically, while executing one instruction, the next instruction is decoded, and the third instruction is fetched from memory. The LPC2210 also features multiple 32-bit timers, four 10-bit ADCs or eight 10-bit ADCs, and up to nine external connections, resulting in high performance and making it ideal for communication gateways, protocol converters, embedded softmodems, and various other applications. Currently, commonly used communication interfaces include RS232, USB, CAN, and Ethernet. This smart gateway uses the LPC2210 control core and designs its corresponding data transmission hardware circuit to implement data transmission to Ethernet using several common bus formats, as shown in Figure 1. [align=center]Figure 1 System Design Architecture[/align] 3. Hardware Circuit Design Figure 2 shows the USB and CAN bus interface circuit design. The CAN bus circuit mainly consists of five parts: a microcontroller LPC2210, an independent CAN controller SJA1000, a CAN bus driver PCA82C250, a high-speed optocoupler 6N137, and a power isolation module. The microcontroller LPC2210 controls the SJA1000 to transmit and receive data. The SJA1000 is responsible for the data link layer. It processes the data in the transmit buffer and sends it to the 82C250, and processes the data to be received and puts it into the receive buffer to wait for the microprocessor to read it. The 82C250 provides the interface between the SJA1000 and the physical bus. The 6N137 and the power isolation module are used to realize the electrical isolation of each CAN node on the bus, enhancing the system's anti-interference capability. The CH372 is a general-purpose device interface chip for USB bus, featuring an 8-bit data bus, read, write, chip select control lines, and interrupt outputs. It can be easily connected to the system bus of microcontrollers or DSPs. The CH372 integrates the underlying USB communication protocol and has both built-in and external firmware modes. In built-in firmware mode, the CH372 automatically handles all transactions on the default endpoint 0, with the local microcontroller only responsible for data exchange. In external firmware mode, the external MCU handles various USB requests as needed, enabling the creation of devices compliant with various USB class specifications. P3.23 of the LPC2210 is connected to the CS pin of the SJA1000; a low level selects the SJA1000. P0.30 is connected to the INT pin of the SJA1000 for USB interrupt response. P2.22 and P3.21 are connected to the CS and A0 pins of CH372, respectively. When P3.21 is low and P2.22 is high, the command port of CH372 is selected; when P3.21 is low and P2.22 is low, the data port of CH372 is selected. [align=center] Figure 2 shows the USB and CAN bus interface circuit design[/align] Figure 3 shows the RTL8019 Ethernet interface circuit. The Ethernet interface circuit consists of three parts: the microcontroller LPC2210, the Ethernet interface chip RTL8019, and the network interface HR901170A. The microcontroller LPC2210 controls the RTL8019 to send and receive data. The RTL8019 integrates an Ethernet controller, a Media Access Control (MAC) sublayer, and a physical layer, making it easy to design as an ISA bus system. In addition, it provides a simple interface for the microcontroller, allowing the microcontroller to complete Ethernet operations simply by reading and writing to its relevant registers. It also boasts advantages such as compatibility with NE2000, good software portability, and low cost. [align=center]Figure 3 RTL8019 Ethernet Interface Circuit[/align] The circuit is designed to access the RTL8019 via a 16-bit bus. The RTL8019's data lines SD0-SD15 are connected to the CPU's P2.0-P2.15. The RTL8019 operates in jumper mode, selecting port I/O base address 300H. SA6, SA7, and SA10-SA19 are grounded, SA8 and SA9 are connected to a high level, and SA5 is connected to chip select P3.23. When SA5 is low, the chip is selected. The read/write signal lines IORB and IOWB are connected to the microprocessor's read/write signal lines, respectively. RSTDRV is the chip reset pin, connected to P0.6 of the LPC2210. The RTL8019 has a built-in 10BASE-T transceiver, so the network interface circuit is relatively simple. After passing through a filter, it connects to the HR90117A, an RJ45 interface with an integrated network transformer. Using this interface saves space and increases reliability. Other circuit designs include a DS1232 watchdog circuit for power-on reset of the LPC2210, a MAX232 serial port level conversion circuit for serial communication, and the power supply circuit used by the system. 4. Real-time Multitasking Software Design Based on μC/OSII The embedded real-time operating system μC/OSII is an open-source preemptive real-time multitasking operating system kernel designed specifically for microcontroller systems and software development. It is a background program that executes first after the embedded system starts. User applications are various tasks running on top of the real-time operating system. The real-time operating system performs resource management, message management, task scheduling, and exception handling according to the requirements of each task. For data acquisition systems with high real-time and stability requirements, introducing μC/OSII will undoubtedly greatly improve its performance. In a real-time system, each task has a priority. The real-time system dynamically switches between tasks based on their priorities to ensure real-time performance. The main program flowchart of the intelligent gateway software system is shown in Figure 4. Each functional module can be divided into eight subtasks: serial port sending/receiving, CAN bus data sending/receiving, USB data sending/receiving, and Ethernet data sending/receiving. The serial port sending subtask has the lowest priority, while the Ethernet data receiving subtask has the highest. Semaphores are used to establish communication between tasks. After the main program starts, it initializes each module and then starts each subtask. The Ethernet receiving subtask waits in real-time for data to be sent from the host computer to the slave computer. After receiving data, it sets the corresponding semaphore according to the received host computer instructions. The USB sending, CAN bus data sending, and serial communication sending subtasks receive the set semaphores in real-time and determine whether to send the currently received Ethernet data to the corresponding slave computer based on the semaphore value. The USB receiving, CAN bus data receiving, and serial communication receiving subtasks wait in real-time for data to be sent from the slave computer to the host computer. When data is received, the corresponding semaphore is set. The Ethernet transmission subtask determines the semaphore in real time and sends the data to the host computer based on the semaphore value. This intelligent gateway ensures the conversion between data from different bus formats and Ethernet. [align=center]Figure 4 Flowchart of the main program of the software system[/align] Based on the real-time multi-tasking user application design, it is not necessary to consider all possible overlapping situations of all tasks running simultaneously. Writing each subtask separately not only greatly reduces the workload of program writing but also reduces the possibility of errors, ensuring high reliability of the final program. 5. Conclusion The innovation of this paper is: summarizing the design ideas of previous industrial gateways and proposing the hardware and software design of an Arm-based industrial Ethernet intelligent gateway. By connecting instruments and meters to a computer network, remote acquisition and control of instruments and meters are realized, which is beneficial for centralized monitoring of multiple parameters in complex industrial sites. We used 5 oil-grade water content meters with CAN bus and 10 flow meters with serial communication as lower-level machines. Through the industrial Ethernet smart gateway developed in this paper, the system periodically sends instructions to request the reading of lower-level machine data, and then sends the read data to the Ethernet in TCP/IP mode. On any PC in the local area network, the lower-level machine data can be observed by entering the IP address of the smart gateway. This design is low in cost and flexible in use, and will have a broad market prospect. References [1] Zhou Ligong. Basic Tutorial of ARM Embedded System [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2005. [2] Lü Changtai, Luo Yonggang. Research and Design of Embedded Ethernet Interface [J], Microcomputer Information, Vol. 22, No. 8-2, 2006, pp: 68-30. [3] Wang Junbo, Zou Jijun. Design of USB Bus and CAN Bus Protocol Converter [J]. Journal of East China University of Technology, Vol. 29, No. 3, September 2006, pp: 273-276.
Read next

CATDOLL 126CM Alisa (TPE Body + Hard Silicone Head) Customer Photos

Height: 126cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/58/66cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22