The Key Technology Research on Embedded Gateway Based on CAN Bus and Ethernet

Author
WangShuai
Advisor
LiuMingShan
School
Jilin University
Major
Signal and Information Processing
Classification
TP393.05 Network equipment
Degree
Master's thesis
Year
2009
Downloads
235
Citations
0

Request the full text

Abstract

In the Mid-20th century,with the developing technology of computer, control,communications and network,the design of communications systems which can adapt to the industrial environment,with the performance of reliable and low price,and form the bottom of the factory network equipment as well as between the bottom of the production the scene between the external equipment and exchange of information has become the increasingly urgent demand.Fieldbus emerged.Fieldbus which is the lowest communications network is used in manufacturing production site,it realizes serial number of two-way digital communication between the measurement and control equipment or equipment node which used computers.The key of Fieldbus is making the automatic control systems and field devices can communicate,to connect them into a network system.Fieldbus technology is the successing combined between control technology and network technology,which has been widely used in the world.As a result of market and other reasons,there is a wide range of sophisticated technical standards of fieldbus in the world,and the most widely used fieldbus is the CAN bus,it has become the de facto standard fieldbus.The advantages of CAN bus are as follows:CAN work for multi-master nodes which divided into different priority level;the use of non-destructive arbitration technology;the use of short message frame structure,data error rate is extremely low;node in case of serious errors can be automatically closed.Because of these benefits CAN bus has been used from the initial application of the automobile industry,to automatic control,aerospace,marine,process industry,mechanical industry,textile machinery,agricultural machinery,robots,CNC machine tools,medical devices and sensors and other fields.However,as a bottom for the control of industrial communication networks, CAN-bus also has some obvious limitations,it is still a "device-level shop floor", doesn’t share the remote information.With the rapid development of technology and production requirements,we need to build the scene from the floor of industrial equipment to the enterprise control level,at all levels of management, such as network platform.With the rapid development of Ethernet technology,we find the new method to realize the "manage-control" system.At first Ethernet protocol is developed by Xerox Corporation and was later developed into a standard protocol,widely used in a variety of computer networks, such as the office LAN,industrial control networks and so on,and is developing. Ethernet-based networking equipments and new technologies continue to emerge, in fact,Ethernet has become the most commonly used network standard.The advantage is:Ethernet which based on the TCP/IP is a standard open network;the system which based on the Ethernet protocol has good compatibility, interoperability,and the sharing capabilities of resource,and can easily achieve sharing resources of the scene data and information systems;long distance data transmission,high transfer rate;easy connectivity with Internet,low-cost,easy network,and the interface between severs or computers is very convenient,so Ethernet protocol has a wide range of technical support.The integration between Ethernet technology and the underlying industrial network has the following advantages:its characteristics of high-speed,large capacity can adapt to the growing requirements about information;they can achieve the seamless connection between upper management and decision-making information;the cost of equipments and software will decrease;because of the relative popularity of Ethernet technology,the cost of personnel will decrease.Specific to the Ethernet technology for CAN bus,its advantages are as follows:1.It doesn’t need to lay the dedicated CAN communication network to transmit informations between devices,but to use the widespread,low-cost, standard Ethernet to transmit informations.The formation of such a monitoring network is fast,and in theory,no limit on the number of network nodes,low cost, easy to maintain.2.With the characteristics of a multi-master communication with the high capacity of data,each frame hardware CRC checksum,high reliability;packet can change,high efficiency;communication protocol TCP/IP is the global norm,so we can build the big management control network easily.3.Because the communication packet in line is the TCP/IP standard,so it can be online through the Internet switch or router,remote clients can easily query the status of all intelligent devices and real-time remote control of various intelligent devices.CAN bus which is combined with Ethernet control system enhanced industrial control system’s functionality.Domestic research in this area is rarely, we poses a new issue about the combination between CAN bus and Ethernet protocol,integrating the demand and the development of CAN bus and Ethernet at home and abroad,study the key connectivity technologies of the CAN bus and Ethernet,this thesis research will contribute to the domestic exploration about automatic industrial controls.Major iobs are as follows:1.Combine the industrial actual,made the whole idea of the embedded gateway.2.A detailed analysis of CAN bus protocol,combined with the background of industrial applications,to analyze its advantages and weaknesses;analyzed of SJA1000,designed the intelligent CAN node,and realized its basic communication features.3.Analyzed Ethernet interface ASIC RTL8019AS in detail,write its’ driver program and achieve basic communications features.4.Analyzed the TCP/IP protocol stack in detail,studied and designed embedded TCP/IP protocol stack.The specific ideas in the part of the papers as follows:For embedded ARP protocol,we established and maintained a local the ARP table to achieve the corresponding mapping between IP address and Ethernet address.For the embedded IP protocol,since the control network of CAN bus is a kind of short flames(each frame is 8 bytes),real-time network,so,IP packets without segmentation(MF=DF=0),at the same time,IP service type is the general type(TOS<sub>1-4</sub>=0000b).The head length is 20 bytes(the value of first Minister of degree is 5).TTL is set to 64.IP module is composed of two major functions:ip<sub>s</sub>end and ip<sub>r</sub>eceive.For embedded ICMP protocol,we only deal with the received frame which type is 0x08,and the sending frame which type is 0x00.It does not have its own proprietary variables,involving function is only ICMPGenCheckSun 0 and ICMPProcPktIn 0.For transport protocol,we chose the UDP,because CAN frame is a shorter form(each data frame up to a maximum of 8 bytes),if the TCP transport protocol, we want to transfer eight words CAN protocol data frame,first it is necessary to through the 3 handshakes to establish a connection,and then transmit data,and then through the handshake with the release of connections,so the transmission efficiency is limited,it is undoubtedly a waste for network resources.The UDP is a connectionless transport,so that can improve network efficiency,while mitigate gateway task.Therefore,we use UDP protocol in the communications transport layer.5.Achieve the basic functions of communication of the gateway.

Table of contents

Summary 4-10 Chapter 1 Introduction 10-16 1.1 research background and significance 10-11 1.2 subject of key technologies and their development in the world 11-14 1.2.1 Fieldbus and Its Application Status 11-12 1.2.2 Ethernet and Its Application Status 12-13 1.2.3 embedded technology and its development application status 13-14 1.3 This paper studies the content and 14-16 Chapter 2 CAN bus and the network protocol 16-22 2.1 CAN bus and its analysis 16-20 2.1.1 CAN bus physical layer 17 2.1.2 CAN bus data link layer 17 2.1.3 CAN data frame structure 17-19 2.1.4 CAN bus communication mechanism 19-20 2.2 Ethernet technology 20-21 2.2.1 Ethernet technical features 20 2.2.2 Ethernet works 20-21 2.3 Summary 21-22 Chapter 3 CAN interface and Ethernet interface principle and chip analysis 22-28 3.1 system, the overall structure of Figure 22-23 3.2 CAN bus controller SJA1000 About 23-24 3.3 CAN bus driver TJA1040 About 24-25 3.4 Ethernet interface chip Overview 25-26 3.5 S3C44B0 microcontroller 26-27 3.6 Summary 27-28 Chapter 4 System Hardware Design 28-37 4.1 CAN intelligent node hardware circuit design 28-31 4.1.1 CAN controller is connected circuit 28-29 4.1.2 nodes and controller chips connected circuit 29-31 4.2 Ethernet interface circuit 31-35 4.2.1 RTL8019AS register heap 31-33 4.2.2 data frame to send the process 33-34 4.2.3 data frame receiving process 34 4.2.4 Ethernet interface hardware circuit 34-35 4.3 S3C44B0, and serial chip to connect 35-36 4.4 Summary 36-37 Chapter 5 system software design 37-56 5.1 CAN node communication program design 37-41 5.1.1 CAN initialization routine 37-38 5.1.2 CAN send subroutine 38-39 5.1.3 CAN receive subroutine 39-41 5.2 of embedded TCP / IP protocol stack design 41-53 5.2.1 TCP / IP protocol architecture 41-42 5.2.2 embedded ARP protocol research and design 42-45 5.2.2.1 ARP protocol functions 42 5.2.2.2 ARP frame format 42-44 5.2.2.3 embedded design of the ARP protocol 44-45 5.2.3 Embedded IP protocol and design 45-48 5.2.3.1 IP agreement Profile 45 5.2.3.2 IP data format 45-47 5.2.3.3 Embedded IP protocol design 47-48 5.2.4 Embedded ICMP protocol of the study and design 48-50 5.2.4.1 ICMP Protocol Overview 48-49 5.2.4.2 ICMP packet format 49 5.2.4.3 ICMP packets sent 49-50 5.2.4.4 Embedded ICMP protocol design 50 5.2.5 embedded UDP protocol and design 50-52 5.2.5.1 UDP Protocol Overview 50-51 5.2.5.2 UDP datagram format 51 5.2.5.3 Embedded UDP protocol design 51-52 5.2.6 TCP protocol analysis and research 52 5.2.7 TCP and IP transport layer of choice 52-53 5.3 Gateway main handler 53-56 the Measurement and Analysis of Chapter 6 system 56-74 6.1 CAN nodes for measurement and analysis 56-58 6.1.1 CAN node debugging tools to analyze 56 6.1.2 CAN node tone measured and the results of analysis 56-58 6.2 Ethernet interface test 58 6.3 ARM development tools introduced 58-61 6.3.1 Code Warrior Integrated Development environment 59-60 6.3.2 ADS debugger 60-61 6.4 ADS installation and use 61-68 6.4.1 build an engineering 62-66 6.4.2 code debugging 66-68 6.5 gateway debug 68-74 the 6.5.1 networks is connectivity test 68-69 6.5.2 Ethernet and serial debug 69-72 6.5.3 Ethernet and CAN node test 72-74 , Chapter 7 Summary and Outlook 74-77 References 77-82 thank 82-83 Summary 83-86 Abstract 86-88

Related dissertations

  1. Design and Realization of Multi-bus Gateway for Integrated Bridge System
    RenKangJian ·Harbin Engineering University ·2013 ·Master's thesis
  2. Design and Research of Cabin Monitoring System Based on CAN Bus
    HuangChengWei ·Wuhan University of Technology ·2013 ·Master's thesis
  3. Design of Mine Underground Personnel Positioning System Based on CAN Bus
  4. Implementation of Vehicle Control System Credibility Based on CAN Bus and IPV6
    LiuJiaQiao ·Jilin University ·2012 ·Master's thesis
  5. Design and Implementation of Multimodal Traffic Signal Controller
    XuZuoLong ·South China University of Technology ·2012 ·Master's thesis
  6. Research and Implementation of CAN Bus and Ethernet Communication Based on ARM7Embedded System
    HuangBing ·Anhui University ·2012 ·Master's thesis
  7. Design of Vehicle Data Recorder Based on the Dual Bus
    LinGuoZheng ·University of North ·2012 ·Master's thesis
  8. The Design and Implementation of the power communication controller
  9. The Design of Small Coal Mine Remote Monitoring System Based on ARM
    XuJin ·Northeastern University ·2011 ·Master's thesis
  10. The Design and Realization of Extended System in Distributed Firealarm System Based on Microcontroller
  11. Design of Remote Control System Based on Ethernet
    YaoGaoHua ·South China University of Technology ·2013 ·Master's thesis
  12. The Design of Monitoring System for the Photovoltaic Plant Based on DSP
  13. Design and Application of the Distributed Monitoring System Based on Embedded Web
  14. The Design of Hybrid Electric Bus Data Acquisition and Test System
    LiHuiXian ·Hunan University ·2012 ·Master's thesis
  15. Design of Remote Strain Measurement System Based on FGPA
    LiuNanNan ·Harbin Engineering University ·2013 ·Master's thesis
  16. Industrial Field Data Acquisition System Design Based on CAN Bus
  17. Design of the Hazard Source Monitoring System Based on CAN Bus
  18. Design and Implementation of Multi-channel Data Acquisition System
  19. The Design of Displacement Detection System Based on CPLD Grating Subdividing Technology
  20. Research on Data Acquisition System of Can Bus