1 Overview
In large-scale enterprise automation systems such as factories, substations, and intelligent buildings, as shown in Figure 1(a), Ethernet and PCs are used in the upper enterprise management and production monitoring layers, while fieldbuses (such as RS-485, CAN, lonWorks, Foundation, etc.) and single-chip microcomputer measurement and control equipment are used in the lower workshops and fields. The communication between the upper and lower layers is usually achieved by using an industrial control computer plus an Ethernet card, plus an interface card on the PC slot or an EPP interface card for the parallel printer port. This connection method is costly and has a long development cycle. The interface card becomes the communication bottleneck between the upper and lower layers of the system. Once a fault occurs, the connection between the upper and lower layers is interrupted. To this end, as shown in Figure 1(b), we use the cheap "Network Communication" to form an Ethernet-CAN gateway based on a single-chip microcomputer to replace the expensive industrial control computer plus an interface card, and successfully realize the direct connection between Ethernet and the existing CAN bus network, and realize the connection between the management and monitoring layer (Ethernet) and the production measurement and control layer (CAN bus network). The upper and lower layer data can be easily communicated.
Figure 1 Comparison of two distributed automatic control systems
More importantly, the mature, stable and cheap Ethernet has been popularized and penetrated into factories, workshops, buildings and other grassroots. In large-scale enterprise automation systems, there is no need to use fieldbus and two-level structure. You can directly use the cheap Ethernet interface module "Network Communication" to directly connect various measurement and control equipment to Ethernet to form a modern network control system.
2 Composition Principle of Ethernet-CAN Gateway
In the network control system, we use "Network Communication" to form an Ethernet-CAN gateway based on a single-chip microcomputer. The structure is shown in Figure 2. "Network Communication" consists of an Ethernet interface A and a microprocessor. On this basis, adding a CAN interface B forms an Ethernet-CAN gateway.
Figure 2 Ethernet-CAN gateway based on "Network Communication"
(1) Ethernet interface A
Ethernet interface A can use 10Base-T universal interface chips that comply with IEEE802.3 protocol, such as UM9003, RTL8019, etc., to complete the connection with Ethernet at the physical layer and data link layer. Using the RJ-45 socket, it can be directly connected to the Ethernet.
(2) Microprocessor
The microprocessor is responsible for controlling the Ethernet interface A chip and the CAN interface B chip. The microprocessor has TCP/IP communication protocol and CAN protocol installed inside, which completes the conversion between Ethernet protocol and CAN bus protocol, and realizes the transparent transmission of communication data between interface A and interface B. [page]
Since the amount of data transmitted by the CAN bus is not large and the data transmission rate is not high, which is much lower than the data transmission rate of Ethernet, the data transmission bottleneck in the Ethernet-CAN interface module is the CAN interface B. In the field of measurement and control, the amount of data transmitted is usually not large and the data transmission rate requirement is not high. Therefore, the microprocessor in this module can be a common single-chip microcomputer such as 8031.
(3) CAN interface B
CAN interface B uses Philips' CAN physical layer and link layer interface chip SJA1000 and PCA82C250. The microprocessor directly controls the AD0~AD7, ALE, RST and pins of SJA1000. The MODEL pin of SJA1000 is connected to a high level and works in Intel mode; the chip select pin is grounded and is always in the strobe state, as shown in Figure 3. The microprocessor's operation on SJA1000 is mainly the operation of registers: on the one hand, the mode register (MOD), command register (CMR), status register (SR), interrupt register (IR), interrupt enable register (IEP), bus timing register (BTR0, BTR1), output control register (OCR), and clock divider counter (CDR) of SJA1000 are set and tested; on the other hand, the transceiver buffer is read and written to exchange data with the CAN device.
Figure 3 Ethernet-CAN interface schematic diagram
Figure 4 is a flowchart of the microprocessor initializing, reading and writing to SJA1000. The microprocessor writes the command sent from Ethernet to SJA1000 to transmit it to the CAN measurement and control device; conversely, it reads the measurement value or status of the CAN measurement and control device from SJA1000 and sends it out through Ethernet.
Figure 4 Schematic diagram of microprocessor CAN interface
[page]
3 Main features of Ethernet-CAN gateway
Network distributed control requires an open, digital, multi-point communication control network, and the widespread use of fieldbus-based network distributed control systems in automation systems illustrates this point. Using Ethernet to replace fieldbus networks not only meets these requirements, but also has many advantages.
① There is no need to lay a special CAN communication network to transmit information between devices, but to use the widely available, cheap, and standard Ethernet to transmit information. The establishment of such a measurement and control network is very fast, the number of nodes is theoretically unlimited, the networking cost is low, and maintenance is easy.
② In data transmission, the address of each measurement and control device actually consists of two parts: the IP address of the "Network Communication" and the CAN interface address. In Ethernet, the CAN address and data of the CAN interface measurement and control device are transmitted together as the data of the IP packet in the "Network Communication" communication.
③ It has the characteristics of high communication capacity with multiple masters and multiple slaves; each frame has hardware CRC check and high reliability; the communication message can be large or small and the efficiency is very high; the communication protocol TCP/IP is a global unified standard and can be easily connected into a large control network without geographical restrictions.
④ The human-machine interface of the WWW (Word Wide Web) browser is user-friendly and easy to use. The device management server uses the browser to detect and control different devices on the Ethernet, and uses the WWW publishing method to provide dynamic interactive web browsing to network clients. It is easy to implement a scheduling production management system or an office automation information system.
⑤ Since the communication data packets conform to the TCP/IP standard, they can pass through switches or routers on the Internet. Remote Internet users can easily query the status of each smart device and remotely control each smart device in real time using a WWW browser.
4 Application of Ethernet-CAN Gateway Interface Module in Automatic Measurement and Control System
In an enterprise automatic control system designed and modified by us, the method shown in Figure 5 was adopted. All the original CAN measurement and control equipment were directly connected to the enterprise Ethernet through the Ethernet-CAN interface module, and some were still connected to the Ethernet through the CAN bus network; while the newly added equipment was directly connected to the Ethernet using the Ethernet interface module, and there was no need to lay a special CAN communication network for information transmission between devices.
Figure 5 Block diagram of distributed control application system based on Ethernet
On Ethernet, all CAN measurement and control nodes form a virtual network segment. The CAN device management server is any control node in the enterprise Ethernet. The WIN NT server connected to the Ethernet is installed with special network management software to allow legitimate engineering and technical personnel to remotely manage CAN devices and communicate data with CAN devices through Ethernet. In this way, Ethernet can completely replace the original CAN bus network. At the same time, the server uses WEB publishing to provide dynamic interactive web browsing to network clients.
Conclusion
With the development of industrial automation and office automation, in some cases, the network of distributed control systems is becoming larger and larger, and fieldbus is increasingly restricted by geography, laying costs, and load capacity. On the other hand, with the rapid development of flexible, convenient, secure, and reliable Ethernet and the popularization of the Internet, broadband networks have penetrated into homes, offices, hotels, factories, and workshops, allowing people to exchange information through the Internet in all places of life and work. In this case, using cheap "network communication" and the Internet to replace fieldbus, the original fieldbus distributed control system can be easily converted into an Ethernet-based distributed control system, which will be more and more widely used.
Previous article:Combined application of DM9000A and baseband signal processing platform
Next article:Design of communication system between single chip microcomputer and digital signal processor based on CAN bus
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
- Overcurrent protection circuit with self-recovery function
- EEWORLD University - How to set up TI's ADS8681 performance demonstration kit
- Gallium Nitride is changing the world
- Wireless charging market is booming, and Texas Instruments boost and buck-boost DC-DC converters help wireless charging design
- Traffic light system, except for the start button, other buttons are invalid. I hope you can help me solve it.
- Infineon's 30% off flash sale is in progress, and you can win a prize when you place an order!
- Rapoo V10RGB Colorful Backlight Gaming Mouse Hard Pad Disassembly Review - Hardware Disassembly
- MSP430-IO Port Introduction
- Graduation Project: Water Sample Collection at Water Quality Monitoring and Control Station
- [Detailed and practical] Chinese illustration of every parameter of power MOS tube!