You are on page 1of 21

CAN Networks

By Mark Longson 2008

Electronic Control
The electronic control unit or ECU is definitely commonplace in motor vehicles. Essentially it is a computer and works in much the same way. It employs stored functions and algorithms (processing programs) to process incoming signals. The ECU converts incoming signals to a language it can understand and then to a language its recipient will understand.

Multiplexing

Multiplexing allows several intelligent sensors, nodes (ECUs) and man machine interfaces to share signals between each other without the need for large amounts of cabling. Sensors and actuators can also be shared across the entire network.

The amount of cabling is reduced reducing build costs and lightening the vehicle.

10.4 kbs 500 kbs

K LINE DRIVE

100 kbs 100 kbs

CONVINIENCE INFOTAINMENT

21.2 mbs 100 kbs

MEDIA

DISPLAY

Instrument Pack / Gateway Diagnostic

Data Bus Wires


The data bus wires are bi directional and are used for the transmission of data. They are defined as CAN high (A) or CAN low (B). To prevent interference from affecting data transmission, the two wires take the form of a twisted pair.

The twists also prevent the data bus line from radiating interference, to be effective there need to be at least 20 twists per metre.

Both wires carry a counter-opposing voltage, i.e. when the voltage on one wire is high, then the other wire carries a large voltage and vice-versa.
The sum of the voltages is thus kept constant and the electromagnetic fields of both wires cancel each other out.

High Voltage

Low Voltage

CAN System Architecture


Sensors Actuators Micro Controller Micro Controller Sensors Actuators Micro Controller Sensors Actuators

CAN Controller TX RX ERR

CAN Controller TX RX ERR

CAN Controller TX RX ERR

CAN Transceiver

CAN Transceiver

CAN Transceiver

CAN High

CAN Low

CAN network nodes are multi - master, each node is a master in its own right and can request the use of the BUS or NETWORK any time.

Why is CAN so fast ?


To understand the speed of the MOST network we need to learn a little about data transfer, in particular Bit Rates. Bit Rate is the ratio of the number of bits that are transferred between devices in a specified amount of time, typically one second. Bit rate is the same as data rate, data transfer rate and bit time.
terabit Tbit/s 1000000000000

gigabit

Gbit/s

1000000000

megabit

Mbit/s

1000000

kilobit

kbit/s

1000

10.4 kbs 500 kbs


Xenon Control Module

K LINE DRIVE

100 kbs 100 kbs

CONVINIENCE INFOTAINMENT

21.2 mbs 100 kbs

MEDIA

DISPLAY

Instrument Pack / Gateway


Steering Column Keyless Entry /Immobiliser Rear Control Module Drivers Door Passenger Door RHR Door LHR Door Drivers Seat Memory Passengers Seat Memory Parking Assistant

Engine ECU

Diagnostic
Compass Wiper Motor Control Reversing Camera

Tiptronic

PASM Trailer Module Airbag Off Road Stability Stability Management Rear Diff Control Transfer Box Lockup Roof Module Tyre Pressure Monitor Front Climate Control Rear Climate Control Electrical System

PCM GW CAN MOST MMI


CD Changer

Amplifier

Satellite Navigation

Telephone

Television

CAN Data Transfer Process


SUPPLY The control unit supplies the data to the CAN controller for
transfer.

SEND The CAN transceiver receives data from the CAN controller, converts
it into suitable electrical signals & then sends them. RECIEVE All the other control units situated on the CAN network then become receivers. have received to carry out their functions or if it is irrelevant.

CHECKING The control units check whether they require the data they

ACCEPT If the received data is important or relevant, it is accepted.


NOT ACCEPT If the received data is NOT important or relevant, it is
ignored.

ACCEPT DATA CHECK DATA RECEIVE DATA

SUPPLY DATA CHECK DATA SEND DATA

END

ACCEPT DATA CHECK DATA RECEIVE DATA

RECEIVE DATA

Arbitration
Surprisingly a CAN network is only capable of handling 1 CAN message at a time. The messages run blisteringly fast however which allows the system to function without delays. If several control units need to transmit their data message at the same time then it needs to be decided which units message has the highest priority. This is done through a process called arbitration whereby the most important message wins the argument.

For example an ABS signal is more important than the signal from the Transmission or Engine and must be allowed on the network first.
Each CAN message can be split into sections and the first section carries an identifier to say where it came from and then its level of urgency or importance.

1st Bit The ABS/PSM control unit transmits a higher value bit. The Motronic control unit also transmits a higher-value bit. The Tiptronic transmission control unit transmits a lower-value bit and recognises that a higher value bit is present on the data bus. This causes it to loose its right to transmit and switches to receive. 2nd Bit The ABS/PSM control unit transmits a higher value bit. The Motronic control unit transmits a lower-value bit and recognises that a higher value bit is present on the data bus. This causes it to loose its right to transmit and switches to receive. 3rd Bit The ABS/PSM control unit has the highest priority and therefore has permission to transmit. It continues to transmit its data message until this is completed. After the ABS/PSN control unit has finished transmitting its data message, the other control units again attempt to transmit their data messages. ABS/PSM Control Unit

DME Control Unit

Automatic Transmission Control Unit Higher Value Lower Value

Start Field DME Loses Auto Transmission Loses

Data Bus Terminator


ECUs with CAN Controller and Transceiver built in

Data Bus Terminators prevent echo.

Data Bus Termination Resistor 120

Data Bus Wires (twisted pair)

Data Bus Termination Resistor 120

For diagnostic purposes a network in good order should have 60 resistance when measured with a multimeter.

Can System Types


High Speed Bus CAN C
Many major car manufacturers use high speed system CAN for the drive network. Information on this bus travels at 500 Kbits per second and is used by the engine and transmission. Messages on the high speed CAN network are transmitted cyclically or at regular set intervals.

1 0 0 20 40 60 80 100 120

Time in m/s

Engine

Transmission

Bus Signal Levels

In order to guarantee reliable transmission free from electromagnetic interference (EMI), data transmission on CAN lines is carried out by means of differential signals. CAN C (high speed) and CAN B (low speed) use different kinds of differential signal. Complete the following diagram to show the signal level of high speed bus. Mirror Image must be seen or message cannot be read.

5v 3.5v 2.5v 1.5v

volts

CAN High

2 volt gap

CAN Low 0v Recessive 1 Dominant 0 Recessive 1 time

Low Speed Bus CAN B


Many major car manufacturers use low speed system CAN for the convenience system, infotainment etc. Information on this bus travels at 100 Kbits per second or less and is used for non safety critical devices. Messages on the low speed CAN network are transmitted cyclically or spontaneously for inputs such as a button press.

Spontaneous Messages Dis 1 Com 1


1 0 0 50 100 150 200 250 300

Time in m/s

Comfort 1

Display 1

Complete the following diagram to show the signal level of a low-speed bus.

5v 3.75v 3.25v 1.75v 1.25v 0v

Recessive 1

Dominant 0

Recessive 1

Low speed CAN does not need a mirror image to function because it is not doing anything safety related. Therefore a low speed network is fault tolerant and is able to function in single wire mode with reduced functionality. Notice the sloping sides of the square wave on a slower network message form.

CAN Protocol
What does the CAN data bus transfer? It transfers a data protocol between control units at short intervals. The data protocol consists of a large series of bits following one another. A bit (binary digit) is the smallest unit of information (one switched condition per time interval) in digital technology and in a data processing system. In electronics this information can only have the value of a logical 1 (yes) or a logical 0 (no). Eight bits together form one byte. In a byte there are 256 different bit patterns possible and therefore 256 different pieces of information can be coded or represented.

In a CAN system, the information is exchanged with the help of messages.


The CAN transmitters and receivers know the exact structure of the message and can therefore correctly interpret the individual bits and bytes in a bit stream being received. The following illustration shows the structure of a data protocol (data frame) this being identical for both wires.

CAN Protocol
Start Field (1 bit)
The start field marks the beginning of the data record or message. A bit is sent with 5V on the CAN-High line and 0V on the CAN-Low line. When all stations connected to a bus system recognise a start bit, they switch to receive.

Status Field (Identifier / Name) (12 bit)


The status field determines the priority of the data or message. If, for example two control units attempt to transmit their data message at the same time, the one with the highest priority will take precedence.

Control field (Check Field) (6 bit)


The control field contains the number of data bits contained in the data field. Each receiver can thus check if it has received all the data transferred to it.

The identifier part of the signal will determine the content of the signal and the priority of the signal. Arbitration is necessary when a message is transmitted at the same time as another message. The control field carries information as to the number of bytes to follow and the data field is the actual value of the signal being transmitted. As an ECU transmits a signal onto CAN it also reads back the identifier on CAN. If it does not recognise the identifier as its own means it has lost arbitration to another signal transmission and it stops the transmission of its own message. The ECU will wait until the Bus is quiet before transmitting its message again. Error checking of the signal is performed by the cyclic redundancy check (CRC). All the bits that make up the signal are assembled into an algorithm and this is sent to the CRC part of the signal. The receiver ECU will assemble the signal into the same algorithm and the result should match the CRC part of the signal. If they do not match, an error is recognised and the message is ignored. No acknowledgement (confirm) is given to the erroneous message. The ECU which transmits the message is also waiting to receive an acknowledgement, it recognises that the message is faulty and re-transmits the message.

Data Field (max 64 Bit)


The data field contains the information transmitted to the other control units.

Security Field (Cyclic Redundancy Check CRC) (16 Bit)


This field is used to recognise transmission failures.
Acknowledgement Field (Confirmation) (2 Bit) In the acknowledgement field, the receiver signals the transmitter that it has correctly received the data message. If a failure has been recognised, it is immediately sent to the transmitter. The transmitter then repeats the transmission.

End Field (7 Bit)


The end field marks the end of the data message. This is the final way of announcing a failure, leading to a retransmission of the data. The whole message structure can vary from a minimum of 44 bits in length to a maximum of 108 bits. The message will begin with data to signify the start of the message and will also contain data to signal the message end, end of frame.

You might also like