You are on page 1of 24

Controller Area Network (CAN)

Controller

N
Area

C A Network
AGENDA

Need for a Bus System

Why CAN?

N
What is CAN?

A
The CAN Protocol

C
Features of CAN Protocol

CAN Data Frame

CAN Applications
NEED FOR A BUS SYSTEM

As the number of Electronic Control Units (ECUs) in an automotive increase, the


need for reliable and fast information exchange between these ECUs increases
rapidly.

N
AIR

A
BAGS
ENGINE
CONTROL
BODY

C
ELECTRONICS
ACTIVE
SUSPENSION
INFOTAINMENT
ANTI-LOCK
BREAKING
NEED FOR A BUS SYSTEM

Conventional Point to Point Connections

ENGINE ANTI-LOCK
CONTROL BREAKING

N
ACTIVE AIR

A
SUSPENSION BAGS

C
Disadvantages of Point to Point Connections:
Increases Material Costs
Increases Production & Testing Time
NEED FOR A BUS SYSTEM

Bus Protocol

ENGINE ANTI-LOCK AIR


CONTROL BREAKING BAGS

N
CAN CAN CAN

A
BUS
Eg CAN

C
Advantages of Bus System:
Proven Reliability
Reduced Costs
Reduced Production & Testing Time
What is CAN ?

CAN is
an ISO standard (ISO 11898) for serial communication

AN
a protocol developed Robert Bosch Gmbh for automotive applications

C
a differential two-wire bus CAN_H & CAN_L

a message-oriented transmission protocol with efficient distributed control


Features of CAN

Low cost.
Low cost.

Extremely robust.

N
Highspeed
High(up to 1(up
speed MBits/sec).
to 1 MBits/sec).

A
Reliable. Error handling and Error Confinement.

C
Reliable. Error handling and Error Confinement.
Automatic retransmitting of the faulty data.

7
Automatic retransmitting of the faulty data.

Automatic disconnect of nodes which are suspected to be physically

N
faulty.
Automatic disconnect of nodes which are suspected to be physically faulty.

Functional
Functional

C A
Addressing,
Addressing,
"broadcasted"
i.e. no source/destination
i.e. no source/destination
on the network.
"broadcasted" on the network
address,address,
the datathe
aredata are

8
Attributes of CAN ?
Broadcast Communication Mechanism is adopted

Each node will have its own crystal clock, so no common clock needed

N
Theoretically no limitation on the number of nodes

A
CSMA / CD Bus contention & Non-Return To Zero (NRZ) mechanism

C
Each CAN message can transmit from 0 to 8 bytes of user information

The Data rates supported are bus length dependant


- 1 Mbit/s for bus length up to 40m
- 10 kbit/s for bus length up to 6 km

9 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Attributes of CAN

Broadcast Communication Mechanism

AN
10
C
ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Attributes of CAN

There are two logic states on the bus :


Dominant : Logic 0
Recessive : Logic 1
The Dominant bit overwrites the Recessive bit 5v
( Wired-AND Implementation )

N
CAN BUS

NODE C
Transmits
00001111
T

C A R

NODE B
Transmits
00110011
T R

NODE A
Transmits
01010101
T

11 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Attributes of CAN

Frame Formats
Standard Frame 11 bit Identifier ( CAN 2.0A )

N
Extended Frame 29 bit Identifier ( CAN 2.0B )

A
Frame Types

C
Data Frame: for sending of a message

Remote Frame: for requesting of a message

Error Frame

Overload Frame

12 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Attributes of CAN

CAN 2.0A Data Frame Format

Arbitration Field

AN Control Field Data Field CRC Field


ACK
Field
End of
Frame Inter-

C
11 Bit Identifier DLC (4) 0 to 64 Bits 15 Bits 7 Bits 3 Bits
SOF

IDE
RTR

r0

Bus Idle
CRC Delimiter
Bus Idle
Ack Slot
Ack Delimiter

13 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Data Frame

SOF: Start of frame bit. It is the indication of start of frame when a dominant bit is
detected after the bus idle condition.

Identifier field: contains informations about message.

RTR: one bit wide. Indicates that incoming frame is a data frame or a remote
frame depending on the value of this bit.

IDE: one bit wide. Indicates that the incoming frame is of standard format if
dominant bit is received in this field or else extended one (if recessive).

14
Data Frame Continued.,

Control field: six bit wide. Two bits r0 and r1 are reserved. In standard
frame r1 is replaced by IDE bit. And remaining 4 bits called as data length
control (DLC) describes total length of data field.

Data field: contains the actual information within the limit of {08} bytes.

CRC field: 16 bit wide. Divided into two parts:

CRC sequence: 15 bit length. Calculated over SOF to data field.

CRC delimiter: 1 bit recessive bit.

15
Data Frame Continued.,

ACK field: 2 bit wide and contain two fields ACK flag and ACK
delimiter.

ACK flag: being successful reception of frame the receiver will indicate
the transmitter by putting a dominant bit in this place. Otherwise
recessive.

END OF FRAME: 7 bit wide. Consists of 7 recessive bits.

Interframe space: 3 bit wide. Two continuous frames are separated by


interframe space.

16
17
Attributes of CAN

CAN Waveform - Oscilloscope Pictures

CAN_H and GND

AN
18
C CAN_L and GND

ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Why CAN ?

Mature Standard

Simple Hardware implementation of the protocol

Simple Transmission Medium

N
Excellent Error Handling

A
Fine Fault Confinement

C
Proven Best Performance / Price ratio

19 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Applications of CAN
Mobile Machinery

Special Industrial
Application Control
Fields

N
Systems

CAN

Public Transport
& Traffic

C A Building
Automation
Systems

Passenger Cars & Trucks

20 ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Implementing CAN

There are three ingredients required for implementing CAN :

AN
21
C
ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Robert Bosch India Ltd ( RBIN )

Tools

CANoe ( Vector ) CANalyser ( PEAK )

AN
KOMO ( BLAUPUNKT )

22
C
CANvas ( RB India )

ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Robert Bosch India Ltd ( RBIN )

CAN we?

A N
we CAN!

23
C
ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.
Robert Bosch India Ltd ( RBIN )

AN
24
C
ECR | 01/03/2006 | Robert Bosch India Ltd reserves all rights even in the event of industrial property rights. We reserve all rights of disposal
such as copying and passing on to third parties.