Question? Leave a message!




Implementation of a Generic Gateway as a Multipurpose Communication Node

Design and Implementation of Intelligent Home Wireless Gateway Design and implementation of data gateway communication protocol based on XML
Dr.FelixCarl Profile Pic
Dr.FelixCarl,Netherlands,Researcher
Published Date:03-01-2018
Your Website URL(Optional)
Comment
MASTER THESIS Master's Programme in Embedded and Intelligent Systems, 120 credits Implementation of a Generic Gateway as a Multipurpose Communication Node Hesam Moshiri Information Science, Computer and Electrical Engineering, 30 Credits Halmstad 2014-03-12Abstract Steering and navigation systems play an essential role in governing today’s leisure boats. CPAC Systems AB, a subsidiary of Volvo AB, satisfies a large part of the global market needs for this kind of products. CPAC Systems, among others, manufactures a well-known “steer-by-wire” (SBW) control system, the “Electronic Vessel Control” (a.k.a. EVC). The need to connect the EVC to systems and devices designed by other companies resulted in the development of “gateway” devices, which have a primary role in preserving the integrity of the overall system architecture. Whenever the SBW communicates with external products, gateways are used as electric isolators and protocol translators, in order to protect the integrity of the SBW function. Today, a number of different gateway devices are required to match the different interfaces to which the CPAC’s EVC system has to be connected. This thesis aims to tackle the huge diversification of the requirements and evaluates the possibility of designing a “single” product that satisfies most of the requirements. In addition to that, the work aims to design a flexible device that could be easily updated to comply with the potential needs of the incoming applications. This is beneficial in terms of both technology and cost-efficiency. Existing gateway products are designed to fulfill the assigned tasks or just to do a specific protocol conversion and apart from this significant difference with a generic gateway, they have some limitations concerning environmental conditions and prospective upgrades. Therefore designing, testing and implementation of one multifunctional gateway to be applicable as a multipurpose communication node to cover several functionalities, would be beneficial. Several challenges arose in designing the generic gateway device, such as: hardware design with a limited number of connection I/Os (solution is limited to 20 I/Os, whereas current gateway products require as many as 35 I/Os), robustness, final cost and power consumption. The contribution of the thesis was to analyse current gateway products, to design the hardware (Schematic and PCB), to implement the software, to debug the operation, to verify of the designed hardware to ensure the operation of each part. For gathering test results and investigation of communication or instruction signals, industrial equipment like digital oscilloscope and CAN analyser have been used to prove the operation of the device which are demonstrated in the “design tests” part. In addition, robustness of the gateway has been tested against several industrial test parameters, such as temperature variations, isolation, power supply robustness and typical power consumption. The results of these tests are discussed in the “robustness tests” part. By fulfilling all of these steps and collaboration with the company team, satisfactory results have been achieved. 5 Table of Figures Figure 1 General block diagram view of a Gateway .............................................................. 16 Figure 2 Typical application of the gateway. The green lines represent the CPAC’s proprietary protocol while the red lines represent external protocols.............................. 17 Figure 3 All CPAC gateway product, which should be combined in the Generic Gateway ........................................................................................................................................................ 20 Figure 4 Implementation of CAN Bus wiring ......................................................................... 22 Figure 5 Standard Architecture of layered ISO 11898:1993 ............................................... 23 Figure 6 CAN Bus logic bits ....................................................................................................... 24 Figure 7 CAN Bus voltage thresholds vs. logic levels............................................................ 24 Figure 8 Bit timing of the CAN messages................................................................................ 26 Figure 9 Standard CAN frame................................................................................................... 27 Figure 10 Extended CAN frame ............................................................................................... 27 Figure 11 EIA-422 physical connection diagram .................................................................. 29 Figure 12 Master and Slave connections of the LIN network ............................................. 31 Figure 13 Block diagram of the Autopilot gateway .............................................................. 32 Figure 14 Insertion Loss factor, αe and frequency response, dashed line is related to symmetrical (differential mode) and ordinary line is asymmetrical (common mode) (Reference: Component Datasheet) ......................................................................................... 33 Figure 15 Current response of the component (Iop/IR) in terms of temperature (Reference: Component Datasheet) ......................................................................................... 34 Figure 16 Pulse width distortion parameter in accordance with temperature changes, (Reference: Component Datasheet) ......................................................................................... 35 Figure 17 Thermal characteristics of the voltage regulator, output voltage VQ, in accordance of increasing the temperature TJ, (Reference: Component Datasheet) ......... 36 Figure 18 Block diagram of the AGI gateway......................................................................... 37 Figure 19 The relation between forward voltage drop and instantaneous forward current of rectifier diode, (Reference: Component Datasheet) ........................................... 38 Figure 20 Block diagram of the CAN to Serial level converter, (Reference: Component Datasheet) .................................................................................................................................... 39 Figure 21 Block diagram of the AGI output driving IC, (Reference: Component Datasheet) .................................................................................................................................... 40 Figure 22 Block diagram of the DSAG Gateway..................................................................... 41 Figure 23 ACTISENSE NGW-1 gateway (Reference: Product datasheet) .......................... 45 Figure 24 MARETRON EMS100 gateway (Reference: Product datasheet) ....................... 46 Figure 25 AIRMAR U200 gateway in application (Reference: U200 Product datasheet) ........................................................................................................................................................ 47 Figure 26 Application of AMEC NK-80 in boat’s communication architecture (Reference: NK-80 gateway datasheet) ................................................................................... 48 Figure 27 Block diagram of the generic gateway .................................................................. 50 Figure 28 The block diagram of the power supply of the generic gateway ...................... 51 Figure 29 Response time vs. Voltage level of the GDT at input protection stage of the power supply block (Reference: Component datasheet) ...................................................... 51 Figure 30 Generic Gateway power supply input protection part ....................................... 52 6 1 Introduction 1.1 Motivation In the modern boats, the navigation control unit is a main part of the boat’s controlling system. There are few companies in the world that produce navigation control units and CPAC Systems AB as a subsidiary of VOLVO AB is one such company, which designs, develops and produces electronic controlling systems for vehicles; including steer by wire (SBW) for boats. In the whole controlling system, when the SBW communicates with external (Non-CPAC) products, gateways are used as isolators and protocol translators to protect the integrity of the SBW system. Gateways are designed to accomplish several tasks based on their assigned operation, environmental and/or end customer needs. In practice, for every connection establishment request, like NMEA2000 (CAN based) protocol to NMEA0183 (Serial based) or internal CAN (CPAC CAN) to external CAN (non-CPAC CAN), a proper connection is made just by having a “Gateway”. It means for each connection, a proprietary gateway is to be developed, which is not acceptable in product development for the manufacturer in the long term. 1.2 Goals Currently, the CPAC Systems produces 10 different gateways 1. They are named: NMEA2000, NMEA0183, Autopilot, DPS, PFM, ACU, DSAG, AGI, MOTORSIM, LZGW and TJSGW 1. Each of these gateways is designed to accomplish a specific task, which mainly includes CAN interface and some instruction lines. The goal of the thesis work is to combine all existing gateways in a universal product, which must have the capability to handle the functionalities of all gateways in a limited number of I/Os. In this project, we design and implement a pertinent hardware and modify and write some segments of the embedded software to test and verify the designed hardware. The hardware design should be according to the industrial requirements, in order to be considered as a first prototype of the final product. 1.3 Problem Statement & Approach The hardware design of the generic gateway that could cover all functionalities of the existing gateways, requires 35 I/O lines, but the generic gateway should be designed with 20 I/Os. In other words, the designer should design the hardware in a way that most of I/O lines could handle several functionalities, instead of just one. For example, if there is an output I/O line that controls the boat’s trim level gauge through a PWM signal, it should also handle the LIN connection as its second functionality (Multiplexing). The device should be designed from scratch and the gateway’s MCU must be selected from the types which could deliver enough processing power (at least double in performance (MIPS) compared to the existing gateway MCUs) as well as enough internal flash memory size (at least 64Kbyte), SRAM (minimum 64Kbytes) to process signal processing functions and filters and providing sufficient embedded facilities to complement the functionalities of the existing gateways as well, such as UART and CAN 1, 10. 13 The gateway is an important part in the boat controlling system. It connects unknown customer devices (Mainly CAN-based) to the CPAC-designed boat controlling products. The designer should consider how and what he designs and how each part of the design may perform in the real environment. The main challenges, which have been investigated, are:  Designing a gateway hardware with the multiplexed I/Os, which covers all existing gateways’ functionalities within a limited number of I/Os (20 I/Os). All of the I/O lines which must be included are: Internal CAN (CPAC CAN, 4 lines), External CAN (Non-CPAC CAN, 2 lines), Select1, Select2, TempAlarm, Tachometer, PowerTrimAngle, OilAlarm, UART (3 Lines), StatusOut, Enable (2 Lines), PositionIN, GearStatus+, GPSUART (3 Lines), 1587(2 Lines), LIN, Internal power (CPAC supply, 2 lines) and external power (non- CPAC supply, 2 lines).  Reliability and robustness of the gateway, which is derived into four categories:  Isolation (Physical and signal): according to the requirements, the resistance between two test points should be at least 1MOhm in 60V.  Power supply robustness: The power supply should tolerate short circuit and 48V injection for the duration of 2 minutes. In addition, it should bear with the reverse polarity.  Temperature: the gateway should perform flawlessly in the temperature boundaries. The up and down temperature test points are +85C and -20C.  Power consumption: the current consumption of the gateway should not exceed 150mA. 14 1.5 Structure The thesis contains six main parts. In the background section (Section 2), the main blocks of a gateway, description of the several existing gateways, investigation and studies of the most important implemented communication protocols, analysis of hardware of the existing gateways in addition to the roles of the key components and blocks are discussed. In addition, the major requested standards for the implementation of the generic gateway are introduced briefly. In the related work section (Section 3), similar products of different non-CPAC companies have been investigated and compared with the generic gateway and at the end, a comparison between all CPAC gateways and the Generic Gateway has been made. In the methodology section (Section 4), the major contribution and description of the hardware and software blocks in addition to the associated challenges have been discussed and demonstrated. The results section (Section 5) consists of the investigation of the major communication lines in accompany with some signal images, CAN analyser results and design achievements in comparison with existing gateways. The conclusions part (Section 6) consists of a brief description of the motivation of the project, the main challenges, contribution and the outcome of the thesis. 15 2 Background 2.1 Block Diagram of a Gateway In principle, the block diagram of a gateway product is a combination of a Microcontroller, one or two CAN bus communication interfaces, some discrete hardware circuits and instruction I/Os. The gateway block diagram view is shown in Figure 1. External Power CPAC Power CPAC CAN Interface MCU External Isolated CAN Interface Instrumentation I/Os Figure 1 General block diagram view of a Gateway Figure 1 demonstrates all possible hardware blocks of one gateway (existing CPAC gateways). In some gateways, all blocks have not been implemented and in some of them the instrumentation I/Os and/or the external isolated CAN have been not implemented. For example, the AGI gateway has 6 instrumentation I/Os and the internal CAN (“Internal” refers to the CPAC devices, design blocks, communication interfaces and all related equipment and “External” term refers to the non-CPAC design blocks and communication interfaces). It is designed to connect customers’ products to the internal communication interface 1. A typical setup of the gateways is illustrated in Figure 2 where different protocols share information. The device that enables the protocol translation is a node that is called Gateway 10. 16 Mid-interface circuitGPS Receiver Other External Devices Gateway Gateway Driver interface Gateway Twin IPS Trim planes Figure 2 Typical application of the gateway. The green lines represent the CPAC’s proprietary protocol while the red lines represent external protocols. 17 2.2 Description of the CPAC Gateways The description and an overview of the existing CPAC Company’s gateway products are given in this section. 2.2.1 AGI AGI is a gateway that provides a connection between the analogue gauges monitoring interface of the customer’s marine monitoring dashboard and the internal controlling unit (CPAC side) 1. It consists of an internal CAN block, an internal power block and six instrumentation I/Os. It is equipped with a PIC Microcontroller 1. 2.2.2 NMEA0183 NMEA0183 provides a connection between all non-internal products, which are using CAN, NMEA0183 serial communication protocol and the internal controlling unit (CPAC devices). It consists of an internal CAN block, an internal power block, an external power block and a serial NMEA0183 communication interface 1. It is equipped with a PIC Microcontroller 1. 2.2.3 NMEA2000 NMEA2000 provides a connection between customer devices which use CAN to connect the GPS navigation unit to the main internal controller (NMEA2000 is a newer version of the NMEA0183 which is mainly based on CAN bus) 1. The gateway consists of an internal CAN block, an external isolated CAN block, an external power block and one internal power block. It is equipped with a PIC Microcontroller 1. 2.2.4 Autopilot The autopilot is a gateway that provides a connection between the customer GPS devices, which use CAN or serial communication for data transaction and the internal controlling unit 1. It consists of an internal power block, an internal CAN block, an external power block, an external isolated CAN block and an isolated UART interface 1. It is equipped with a PIC microcontroller 1. 2.2.5 DSAG DSAG is a gateway which provides a connection between the boat steering system and the internal controlling unit (boat steering unit can operate manually or in automatic mode) 1. It consists of an internal CAN block, an internal Power block and 4-four I/O instrumentation interface. It is equipped with a PIC Microcontroller 1. 2.2.6 PFM PFM is a gateway that transfers both CAN and power in the longer distances in the boat 1, in other words, it acts like a network repeater for both power and the CAN bus 1. It connects the secondary power supply unit also, because the boat’s dashboard colourful graphical displays consume high current and the dissipation in the power line is significant, so this gateway should be used in such circumstances 1 (This gateway has been removed from the combination list). 18 2.2.7 LZGW LZGW is a gateway that provides a connection between the boat’s gearbox and the internal controlling unit 1. It consists of an internal CAN block, an internal power block, an external power block and one instrumentation I/O. It is equipped with a PIC Microcontroller 1. 2.2.8 DPS DPS gateway is used to connect the VOLVO PENTA GPS navigation module to the internal controlling devices. The intention of such design is implementation of a ”digital anchor”; when the boat needs to be stationary for a short time, for example when the boat is waiting for a bridge movements to be able to pass through the channel 1. It consists of an internal CAN block, an external isolated GPS CAN block, an internal power block and an external power block. It is equipped with a PIC Microcontroller 1. 2.2.9 TJSGW The TJSGW gateway provides a connection between the external CAN-based devices and the internal CAN 1. It consists of an internal CAN block, an external isolated CAN block, an internal power block and an external power block. It is equipped with a PIC Microcontroller 1. 2.2.10 ACU The ACU gateway provides the connection between CAN based GPS navigation module and 1587 serial communication interface to the internal controlling devices. This feature also has enhanced with embedding a high quality inclinometer inside the gateway 1. The gateway consists of an internal CAN block, an external isolated GPS CAN block, an internal power block and 5-five instrumentation I/Os. It is equipped with a PIC Microcontroller 1. 2.2.11 MOTORSIM MOTORSIM is a product that is used to simulate the several boat engines for testing and simulation purposes 1. When there is an intention to test the gateways or similar products in the laboratory, first, they must be tested in the virtual environment and one essential key element in the real operation of the marine products is the influence of the boat engine 1. MOTORSIM consists of an internal CAN block, an internal power block and 2-two instrumentation I/Os (1587 interface). The selection between several boat engines is done in a real time by one miniature PCB-mounted switch 1. The MOTORSIM does not act like a gateway, but the function of this device should be considered in the design of the generic gateway. Therefore, the communication protocols and other I/Os of the MOTORSIM have been analysed and implemented in the generic gateway. A brief overview of all gateways and their physical connection are demonstrated in Figure 3. The limitations in the existing gateway products include their inefficient use of cable harnesses, insufficient processing power (because of using an 8bits PIC MCU), non-upgradable hardware (in connection with the software), and lifetime limitation of some of the components in their construction. 19 Deutsch DT06-6S CAN / Power NMEA2000 Micro C – 5 Pin Isolated CAN / Power Deutsch DT06-6S CAN / Power AutoPilot Micro C – 5 Pin Isolated CAN / Power Deutsch DT06-6S CAN / Power NMEA0183 3 wires Data, GND, PWR Deutsch DT06-6S CAN / Power DPS Deutsch DT04-6P CAN / Power Deutsch DT06-6S Passive CAN RFM Deutsch DT04-6P Passive CAN / Power Power Wires Power Inclinometer Deutsch DT06-6S Passive CAN ACU Deutsch DT04-6P Passive CAN / Power 3 Wires DATA / GND / PWR Deutsch DT06-6S CAN / Power DSAG 5 Wires ReqAngle, Button, Engage Deutsch DT06-6S CAN / Power AGI 9 Wires Instrumentation Deutsch DT06-6S CAN / Power / 1587 / IGN MOTORSIM 2 Wires Power Deutsch DT06-6S CAN / Power LZGW 2 Wires Gear Output Status Deutsch DT06-6S CAN / Power TJSGW MicroC – 5Pin Isolated CAN / Power Figure 2 Figure 3 All CPAC gateway product, which should be combined in Gateways which should be combined in one Gateway Product the Generic Gateway 20 2.3 CAN Interface The CAN (Controller Area Network) is an asynchronous serial communication protocol (CSMA/CD) for industrial networks. It supports real-time communication (bit rate up to 1Mbps) with very high level of the security and noise immunity. There is no central transceiver in the CAN protocol, so a direct connection allows data transfer between any two or more nodes without a master node 2, 3. The CAN communication protocol was initially created within 1980s as a solution for automotive applications. Since 1990, CAN has become operational in automotive applications as well control design in industrial applications. This development was due to its robustness and good performance. In addition, low development cost is another significant feature for the CAN 2, 3. ISO11898 standard defines CAN bus as differential two wires based reliable protocol for high-speed applications. The identifier field length of CAN 2.0A protocol has 11 bits 3, 4. Data frames are used to transmit up to 9 bytes of information from one specific CAN node to one or more CAN nodes. The 11 bits identifier field length allows up to 2048 available identifiers or logical addresses, where each one can be assigned as a specific functional node 4. In the practical condition, up to 64 nodes could be connected to the bus and 127 nodes on a CANOpen (CANOpen has some differences in the higher OSI model in terms of the method of transmission and interpretation) 2, 4. The minimum of two nodes are required to build one CAN connection. High-Speed ISO-11898 standard specifications are delivered for a maximum transmission rate of 1Mbps with a bus length of 40 meters and a maximum number of 30 nodes. The kind of the cable is specified to be chosen from shielded or unshielded twisted-pair with 120Ω impedance (Figure 4). The reason of why two resistors are used is for avoiding the signal reflection from bus (EMC limitation). There are three methods of bus termination. In this application, the most common termination technique, which is based on two 120Ω termination resistors, has been used 3, 4. 21 Noden Node01 Node02 DSP or MCU DSP or MCU DSP or MCU CAN Controller CAN Controller CAN Controller CAN Transceiver CAN Transceiver CAN Transceiver Figure 4 Implementation of CAN Bus wiring Figure-3 CAN Bus implementation The CAN protocol, as many network protocols is structured in the following layers 2: Application Layer Data Link Layer Physical Layer 2.3.1 Physical Layer The CAN physical layer will be discussed in more details, because it has been considered more in the design of the “generic gateway”. The physical layer is the basic hardware requirement for the CAN network, based on the ISO-11898 electrical specifications. The physical layer, converts logic-1 and Logic-0’s into the corresponding differential electrical pulses which leave a node 3, 4. Although other communication layers may be implemented in software or within hardware as integrated embedded parts, the Physical Layer is always implemented in the hardware. The standard architecture of the layered ISO 11898:1993 has been shown in the Figure 5. 22 120R 120R Application Layer DSP or MCU CAN Controller Embedded or Logic Link Control Seperated Embedded CAN DataLink Layer Controller Medium Access Control Physical Signaling Physical Layer Physical medium Attachment CAN Transceiver Medium Dependent Interface Electrical Specifications: Transcievers, Connectors, Cables CAN Bus Line Figure-4 The layered ISO 1189:1993 standard architecture Figure 5 Standard Architecture of layered ISO 11898:1993 The electrical aspects of the physical layer such as the voltage, the current, and the number of the conductors are specified in the ISO11898-2:2003 standard 3, 4, which is widely accepted. However, the mechanical characteristics of the physical layer such as the connector type and number of pins, colours, labels and pin-outs diagram are not formally specified. The CAN protocol specifies two logical level states: recessive and dominant. The ISO-11898 standard, defines differential voltages to represent recessive and dominant states (Logic Bits), as shown in Figure 6 3, 4. 23 Dominant CANH Recessive Recessive VDIFF CANL Time (t) Figure 6 CAN Bus logic bits Figure-5 CAN Logic Bits In the recessive state (logic ‘1’), the differential voltage on CANH and CANL is less than the minimum threshold (0.5V on receiver input and 1.5V on transmitter output). In the dominant state (Logic ‘0’), the differential voltage on the CANH and CANL is greater than the minimum threshold (Figure 7) 3, 4. Voltage 3.75 2.5V 2.5 1.25 1 0 1 Data Time Figure 7 CAN Bus voltage thresholds vs. logic levels 24 Voltage Level (V)According to the ISO11898-2 specification, compatible transceiver must meet a specific number of electrical requirements. Some of these specifications are intended to ensure that the transceiver can survive in the harsh electrical conditions and with the aim of protecting the communications of the CAN. These requirements have been demonstrated in Table 1. Parameter Min Max DC Voltage on CANH and CANL -3V +35V Transient voltage on CANH and CANL -150V +100V Common Mode Bus Voltage -2.0V +7.0V Recessive Output Bus Voltage +2.0V +3.0V Recessive Differential Output Voltage -500V +50V Differential Internal Resistance 10 100 Common Mode Input Resistance 5.0 50 Differential Dominant Output Voltage +1.5V +3.0V Dominant Output Voltage (CANH) +2.75V +4.5V Dominant Output Voltage (CANL) +0.5V +2.25V Permanent Dominant Detection (Driver) Not required Not required Power-On Reset and Brown-Out Detection Not required Not required Table 1 ISO11898 Electrical Requirements In the generic gateway design, generally two types of CAN must be implemented. The internal CAN and the external isolated CAN 3, 4. The internal CAN is the company’s defined and modified CAN bus 3, 4. The External CAN establishes the connection between the customer side devices and it has unknown characteristic for the internal side devices, because every company has its own specific design 3, 4. The internal CAN must be protected and isolated for any kind of noise and unwanted disturbances that may penetrate from the external CAN, in both hardware design and implementation and regarding the software filters. The CAN cable length is another technical issue that should be considered. Table 2 provides to check the cable length information against data rate. 25 Signalling Rate Bus Length (M) (Mbps) 40 1 100 0.5 200 0.25 500 0.10 1000 0.05 Table 2 Suggested cable length vs. signaling rate As a rule of thumb, the bus wire length in meters (for busses over 100m) multiplied by the baud rate in Mbps, should always be always less than or equal to 50 (Equation 1). Data communication Rate (Mbps) Bus Length (m) ≤ 50 (1) In the gateway communication, the maximum signalling rate is 0.5Mbps and hence, up to 100 meters cable length is permitted 3, 4. 2.3.2 Bit Timing In the CAN network, no clock is sent during the transmission. Synchronization is earned by dividing each bit of the frame into a number of segments, which are: synchronization, propagation, Phase 1 and Phase 2 (Figure 8). Synchronization helps to read the correct message on the receiver side 2. Previous Bit Sync Prop Phase 1 Phase 2 Next Bit Nominal Bit Time Figure-7 Figure 8 Bit timing of the CAN messages Bit timing of CAN message 26 2.3.3 CAN Message frame description Four different types of the messages are defined by the CAN protocol. Data Frame is the first one and the most common form and it is made of arbitration field, CRC field and ACK field. The data field varies between zero to 8 bytes, the RTR bit (Figure 9) is dominant 2 and the length of data part is defined by the DLC parameter 2. The next frame is remote frame, which is essentially a data frame with the RTR bit set to signify that there is Remote Transmit Request. The other two frame types are used in error handling 2. One of them is called Error Frame and another one is named overload frame 2. The active nodes on the bus that detect protocol errors are defined by CAN, generate error Frames. Overload errors require more time to process the messages, which have already received 2. Because CAN was the protocol that was initially designed for use in automobiles, error handling was critical to acquire the market acceptance. With the official introduction of version, 2.0B of the CAN protocol, communication rate was increased 8 times more 2. At this rate, there is no problem for most time-critical values to be transmitted without any latency concerns. Furthermore, to guarantee the integrity of messages, the CAN protocol has a comprehensive list of error detection 2. In Figure 9, the standard CAN frame and in Figure 10, the extended CAN frame has been demonstrated 2. 0..8 Bytes of SOF 11-bit identifier RTR IDE r0 DLC CRC ACK EOF IFS data Figure 9 Standard CAN frame 0..8 Bytes of SOF 11-bit identifier SRR IDE 18-bit identifier RTR r1 r0 DLC CRC ACK EOF IFS data Figure 10 Extended CAN frame The identifier part of the frame is not only used for the priority purposes, but also helps the receiver to filter the messages 2, 10. Before starting to transmit, each node will check if the bus is idle. The nodes, which are going to access the bus, will contend for the access simultaneously, the higher the priority, the lower binary message identifier 2, 10. The nodes that are sending their identifier, listen to the bus at the same time 2. If one node sends a recessive bit and another one sends a dominant bit, the one with the dominant bit will win and the other one will stop sending the identifier 2. This is realized by AND operation. Since the dominant bit overwrites the recessive bit, and the node monitors its own transmission by listening to the bus, it can see if the bus has the same value as what has been sent or not, if so it will continue with the rest of the message frame 2. 27 2.4 NMEA0183 NMEA0183 is a standard, which defines both the electrical interface and the data communication protocol for transmission/reception among marine instrumentation and devices 6. NMEA0183 is an industry standard, first released in the March-1983. The electrical standard of NMEA0183 is EIA-422 although most hardware with NMEA0183 outputs are also capable to drive single EIA-232 port. NMEA0183 can handle single talker and several listeners on one bus. Interconnect wiring is recommended to be a shielded twisted pair, with the grounded shield only at the talker 6. The specification of serial communication is: Baud rate: 4800 Number of data bits: 8 (bit 7 is 0) Stop bits: one (or more) Parity: none Handshake: none The recommendation is that the talker output complies with the RS-422 standard. It is differential based with two signal lines, "A" and "B". These differential drive signals have no reference to ground and therefore the signal has more immunity to noises. EIA422 (Full duplex: EIA-485): The standard is published by the ANSI Telecommunications Industry Association/Electronic Industries Alliance (TIA/EIA) 6. The devices based on EIA- 485 communication standard can be used widely for long distances and in noisy and harsh environments. These characteristics make EIA422 more practical in industrial applications. EIA-485 (RS485) offers data transmission speeds of 35 Mbit/s up to 10m and 100Kbit/s up to 1200m, because it applies differential balanced line over twisted pair wire and one optional ground wire for more convenient matching balance and noise reduction (like EIA-422) (Figure 11). One easy rule could be used in this case: the speed in bit/s multiplied by the length in 8 meters should not exceed than 10 . Thus, for example on a 50-meter cable, one should not signal faster than 2Mbit/s. 28 Figure 8 Figure 11 EIA-422 physical connection diagram EIA-485 Connection 2.5 NMEA2000 NMEA2000 can be considered as a successor of NMEA0183. NMEA2000 is a bi-directional, multi-transmitter, multi-receiver and serial based data communication network. There is no central controller; it is multi-master and self-configuring. NMEA2000 connects devices using CAN bus which is originally developed for the automotive industry 7. Several instruments that meet the NMEA2000 standard could be connected to one main cable, known as a backbone. The backbone enables power for each instrument and conveys data among all instruments on the network bus. NMEA2000 is used as "plug and play" to allow devices, which are constructed by different manufacturers, to talk and listen to each other. There are two types of cabling defined by the NMEA2000 standard. The larger one is denoted as "Mini" (or "Thick") cable, and is rated to be able to carry up to 8Amp. The smaller sizes is known as "Micro" (or "Thin") cable and it is rated to handle up to 3Amp current of power supply 7. The mini cable is mainly used as a "backbone" for networks of larger vessels (minimum of 20 meters). The micro cable is used for connections between network backbone and individual nodes. Networks of smaller vessels are often constructed mainly based on the micro cable and connectors 7. NMEA2000 network is not compatible with an NMEA0183 network in terms of electrical characteristics; therefore, an interface device is needed to send messages between devices on different types of network. In Table-3, a brief look of the NMEA2000 network characteristic is provided 7. 29