CAN
Controller Area Network
Vikas Kumar M
Slide No 2
Vehicle Components
 Components for functioning of a Vehicle?
Engine
Body
Chassis
Music System
Brakes
Lighting System
Battery
Sensors
Doors
Windows
Gauges
Climate Control
Meters
Slide No 3
Components Communication
 If all the mentioned components communicate in this fashion, would be a
mess, more no of cables would require, etc.
Also if a new node is to be introduced, it will be very difficult and complex
components
ECM/BCM
Slide No 4
Topology for communication
 What is a Topology
 In general, it is a study of Shapes and Spaces, such as
 Connectedness
 Continuity
 Boundary
 Branches
Slide No 5
CAN – “Bus Topology”
 What is a Network Topology
 It is the arrangement of various elements [Links, Nodes, Etc.]
for a Network [a telecommunication n/w] to exchange Data
 So CAN is a BUS Topology
Slide No 6
Vehicle Bus Topology
 What is a Vehicle Bus
 An internal communications network that interconnects components inside a
vehicle [e.g. automobile, bus, train, industrial or agricultural vehicle, etc.]
components
Internal Communication
Network
Slide No 7
Protocol
 Now we have the Vehicle Bus for communication,
 What if there is
 NO Format on how it should be routed / communicated or passed to others
 NO Syntax on how to understand the communication
 NO Identification to track the communication
Slide No 8
Protocol
 What is a Protocol
 Protocol is a set of rules for exchanging messages within or between
components/system
 Basic requirements of protocols
 Data formats for data exchange
 Address formats for data exchange
 Address mapping
 Routing
 Acknowledgment
Slide No 9
Types of Protocol
 What are the types of Protocol?
 In general, protocols differ in so many ways that it's not
possible to give an answer
 Why you need different varieties of Protocols:
 Because it depends on who, where, how, whom
Slide No 10
CAN
 CAN (Controller Area Network)
Development of Controller Area Network bus
started originally in 1983 at Robert Bosch GmbH.
Slide No 11
Before CAN
Before CAN
Slide No 12
Development of CAN
 The development of CAN began:
 when more and more electronic devices were implemented
into modern motor vehicles
 It was designed specifically for automotive applications but now also used in other areas
 To improve the behavior of the vehicle even further,
 it was necessary for the different control systems (and their sensors) to exchange information
Slide No 13
After CAN
After CAN
One of the advantages of this topology is:
that nodes can easily be added or removed with minimal software impact
Slide No 14
CAN
 What are the Characteristics of a CAN
 It is a Vehicle BUS with:
 Serial communication Protocol
 Multi-Master Message Model
 System flexibility
 Communication speed
Slide No 15
CAN
 CAN bus is a Serial Communication Protocol
 What is Serial Communication?
 Serial communication is the process of sending data one bit at a time,
sequentially, over a communication channel
 Serial Communication is used for all long-haul communication
Slide No 16
CAN
 Why Serial Communication?
 Basic differences:
Serial Communication Parallel Communication
One data bit is transceived at a
time
Multiple data bits are transceived
at a time
Less number of cables required to
transmit data
Higher number of cables required
Long Distance Short Distance
Slide No 17
CAN
 Why Serial Communication
 A few advantages
 A serial connection requires fewer interconnecting cables (e.g., wires/ fibers) and
hence occupies less space.
 The extra space allows for better isolation of the channel from its surroundings.
 Serial is a better option because it is cheaper to implement
 In general, Common Serial Communication Protocol are:
 SPI, I2C, FireWire, Ethernet, USB, RS232, etc.
Slide No 18
Vehicle Bus Protocol
Protocol Abbreviation Nature
CAN Controlled Area Network
an inexpensive low-speed serial bus for
interconnecting automotive components
D2B Domestic Digital Bus a high-speed multimedia interface
FlexRay -
a general purpose high-speed protocol with
safety-critical features
I²C Inter-Integrated Circuit for attaching low-speed peripherals
KWP 2000 Keyword Protocol 2000
– a protocol for automotive diagnostic devices
(runs either on a serial line or over CAN)
LIN
Local Interconnect Network
a very low cost in-vehicle sub-network
MOST
Media Oriented Systems
Transport
a high-speed multimedia interface
SPI Serial Peripheral Interface
for communication with slow peripheral
devices, which are accessed infrequently
Common Vehicle Bus Protocols include:
Slide No 19
CAN
 CAN bus is a Multi Master Message Model
 What is Multi Master
 Any Node* can Transmit or Receive any message
 What is Message Model
 Data transmitted from any node on a CAN bus, does not contain ADDRESSES of
either the transmitting node, or of any intended receiving node.
 Instead it contains MESSAGE which will be labelled by an identifier
Slide No 20
CAN, Multi Master Message Model
 Basic working Principle
 Data that are transmitted from any Node, contains MESSAGE labelled with
IDENTIFIER, which is unique throughout the network
 All other nodes receive the message and each performs an acceptance test on the
identifier to determine if the message, and thus its content, is relevant to that
particular node.
 If the message is relevant, it will be processed; otherwise it is ignored.
Tx
Rx
Rx
Rx
RxRx
Tx
Rx
Slide No 21
CAN, Multi Master Message Model
 What if two or more nodes start sending a message at
same time?
 Answer:
 A node with message having a highest priority will be granted to send first
 Advantage:
 It guarantees that messages are sent in order of priority
 In addition it also ensures that No message are lost
Slide No 22
CAN Node Requirement
 Each node requires a
 Host Processor
 The host processor decides: what received messages mean and which messages it wants to transmit itself
 Sensors, actuators and control devices can be connected to the host processor.
 CAN Controller
 Receiving: the CAN controller stores received bits serially from the bus until an entire message is available, which can then
be fetched by the host processor (usually after the CAN controller has triggered an interrupt)
 Sending: the host processor stores its transmit messages to a CAN controller, which transmits the bits serially onto the bus.
 CAN Transceiver
 Receiving: it adapts signal levels from the bus to levels that the CAN controller expects and has protective circuitry that
protects the CAN controller
 Transmitting: it converts the transmit-bit signal received from the CAN controller into a signal that is sent onto the bus.
Slide No 23
CAN
 CAN Message are Transmitted/Received:
 Periodically
 On Request
 On a State change
At a uniform and
fixed bit rate
within a CAN Bus or
Network
Slide No 24
CAN
Error Free Communication
Low Wiring Cost
Low Hardware Cost
Easy expandability
Low Node-Connection Cost
Safety critical equipment Real-time System
“Twisted Pair Wire”, wiring cost is low
Connectivity with MCU doesn’t occupy much Chip area,
which keeps the MCU’s cost Low
Simple to add Nodes to the network;
Just lap in two wires at any point on the bus
Only two pins are needed on MCU and in Bus connectors
More Chips with CAN Hardware
More and more MCUs with CAN functionality are becoming available
Slide No 25
CAN
 Quantity of CAN Nodes:
 Theoretically it is unlimited
 But practically it is limited to certain number, because higher the nodes will
impact on the Delay of the response, will increase the electrical load
Slide No 26
CAN
 CAN Bus implementation
 A Common way to implement using Two-Twisted wires with two termination
Resistors of 120 ohms
Twisted Pair Connection – for bi-directional data
Terminators
Slide No 27
CAN – Twisted Pair Wire
 Reason for Twisted Pair Wires
 To Cancel out Noise generated by external fields across Wires
 Current flowing in each wire in Opposite direction, their magnetic field cancels,
so the cable radiates less
 What is a Terminator
 A device connected to one end of a bus or cable that absorbs signals
 Terminators can be passive (simple resistors) or active (more complex electronics)
depending on the type of bus being terminated
Slide No 28
CAN Termination
 CAN Bus is terminated with 120 ohms?
 The terminator is placed at the end of a transmission line to
 Eliminate reflections at the ends of bus wire
 Thus to Match Impedance*
Slide No 29
CAN
 CAN Bus is terminated with 120 ohms?
Source Destination
Source Destination
Termination
Slide No 30
CAN
 Why only 120Ω been used?
 120 Ω is going to be close most of the time for the relatively large wires
commonly used for CAN.
Slide No 31
CAN
 Non-Automotive CAN Applications:
 Ships
 Locomotives, Railway Systems
 HVAC Systems
 Elevators
 Industrial Freezers, High Speed Printing Machines
 Many Others
Slide No 32
Thank You
Slide No 33
CAN
 CAN Standard Specification
 CAN Protocol is Standardized by ISO
 ISO11898 and ISO11519-2, with no much difference except at the Physical Layer
 ISO11898 is a standard for high-speed CAN communication
 ISO11519 is a standard for low-speed CAN communication
Slide No 34
CAN
 What is Matching Impedance?
 When sending power down a transmission line, it is usually desirable that as much
power as possible will be absorbed by the load and as little as possible will be
reflected back to the source.

Controller Area Network (Basic Level Presentation)

  • 1.
  • 2.
    Slide No 2 VehicleComponents  Components for functioning of a Vehicle? Engine Body Chassis Music System Brakes Lighting System Battery Sensors Doors Windows Gauges Climate Control Meters
  • 3.
    Slide No 3 ComponentsCommunication  If all the mentioned components communicate in this fashion, would be a mess, more no of cables would require, etc. Also if a new node is to be introduced, it will be very difficult and complex components ECM/BCM
  • 4.
    Slide No 4 Topologyfor communication  What is a Topology  In general, it is a study of Shapes and Spaces, such as  Connectedness  Continuity  Boundary  Branches
  • 5.
    Slide No 5 CAN– “Bus Topology”  What is a Network Topology  It is the arrangement of various elements [Links, Nodes, Etc.] for a Network [a telecommunication n/w] to exchange Data  So CAN is a BUS Topology
  • 6.
    Slide No 6 VehicleBus Topology  What is a Vehicle Bus  An internal communications network that interconnects components inside a vehicle [e.g. automobile, bus, train, industrial or agricultural vehicle, etc.] components Internal Communication Network
  • 7.
    Slide No 7 Protocol Now we have the Vehicle Bus for communication,  What if there is  NO Format on how it should be routed / communicated or passed to others  NO Syntax on how to understand the communication  NO Identification to track the communication
  • 8.
    Slide No 8 Protocol What is a Protocol  Protocol is a set of rules for exchanging messages within or between components/system  Basic requirements of protocols  Data formats for data exchange  Address formats for data exchange  Address mapping  Routing  Acknowledgment
  • 9.
    Slide No 9 Typesof Protocol  What are the types of Protocol?  In general, protocols differ in so many ways that it's not possible to give an answer  Why you need different varieties of Protocols:  Because it depends on who, where, how, whom
  • 10.
    Slide No 10 CAN CAN (Controller Area Network) Development of Controller Area Network bus started originally in 1983 at Robert Bosch GmbH.
  • 11.
    Slide No 11 BeforeCAN Before CAN
  • 12.
    Slide No 12 Developmentof CAN  The development of CAN began:  when more and more electronic devices were implemented into modern motor vehicles  It was designed specifically for automotive applications but now also used in other areas  To improve the behavior of the vehicle even further,  it was necessary for the different control systems (and their sensors) to exchange information
  • 13.
    Slide No 13 AfterCAN After CAN One of the advantages of this topology is: that nodes can easily be added or removed with minimal software impact
  • 14.
    Slide No 14 CAN What are the Characteristics of a CAN  It is a Vehicle BUS with:  Serial communication Protocol  Multi-Master Message Model  System flexibility  Communication speed
  • 15.
    Slide No 15 CAN CAN bus is a Serial Communication Protocol  What is Serial Communication?  Serial communication is the process of sending data one bit at a time, sequentially, over a communication channel  Serial Communication is used for all long-haul communication
  • 16.
    Slide No 16 CAN Why Serial Communication?  Basic differences: Serial Communication Parallel Communication One data bit is transceived at a time Multiple data bits are transceived at a time Less number of cables required to transmit data Higher number of cables required Long Distance Short Distance
  • 17.
    Slide No 17 CAN Why Serial Communication  A few advantages  A serial connection requires fewer interconnecting cables (e.g., wires/ fibers) and hence occupies less space.  The extra space allows for better isolation of the channel from its surroundings.  Serial is a better option because it is cheaper to implement  In general, Common Serial Communication Protocol are:  SPI, I2C, FireWire, Ethernet, USB, RS232, etc.
  • 18.
    Slide No 18 VehicleBus Protocol Protocol Abbreviation Nature CAN Controlled Area Network an inexpensive low-speed serial bus for interconnecting automotive components D2B Domestic Digital Bus a high-speed multimedia interface FlexRay - a general purpose high-speed protocol with safety-critical features I²C Inter-Integrated Circuit for attaching low-speed peripherals KWP 2000 Keyword Protocol 2000 – a protocol for automotive diagnostic devices (runs either on a serial line or over CAN) LIN Local Interconnect Network a very low cost in-vehicle sub-network MOST Media Oriented Systems Transport a high-speed multimedia interface SPI Serial Peripheral Interface for communication with slow peripheral devices, which are accessed infrequently Common Vehicle Bus Protocols include:
  • 19.
    Slide No 19 CAN CAN bus is a Multi Master Message Model  What is Multi Master  Any Node* can Transmit or Receive any message  What is Message Model  Data transmitted from any node on a CAN bus, does not contain ADDRESSES of either the transmitting node, or of any intended receiving node.  Instead it contains MESSAGE which will be labelled by an identifier
  • 20.
    Slide No 20 CAN,Multi Master Message Model  Basic working Principle  Data that are transmitted from any Node, contains MESSAGE labelled with IDENTIFIER, which is unique throughout the network  All other nodes receive the message and each performs an acceptance test on the identifier to determine if the message, and thus its content, is relevant to that particular node.  If the message is relevant, it will be processed; otherwise it is ignored. Tx Rx Rx Rx RxRx Tx Rx
  • 21.
    Slide No 21 CAN,Multi Master Message Model  What if two or more nodes start sending a message at same time?  Answer:  A node with message having a highest priority will be granted to send first  Advantage:  It guarantees that messages are sent in order of priority  In addition it also ensures that No message are lost
  • 22.
    Slide No 22 CANNode Requirement  Each node requires a  Host Processor  The host processor decides: what received messages mean and which messages it wants to transmit itself  Sensors, actuators and control devices can be connected to the host processor.  CAN Controller  Receiving: the CAN controller stores received bits serially from the bus until an entire message is available, which can then be fetched by the host processor (usually after the CAN controller has triggered an interrupt)  Sending: the host processor stores its transmit messages to a CAN controller, which transmits the bits serially onto the bus.  CAN Transceiver  Receiving: it adapts signal levels from the bus to levels that the CAN controller expects and has protective circuitry that protects the CAN controller  Transmitting: it converts the transmit-bit signal received from the CAN controller into a signal that is sent onto the bus.
  • 23.
    Slide No 23 CAN CAN Message are Transmitted/Received:  Periodically  On Request  On a State change At a uniform and fixed bit rate within a CAN Bus or Network
  • 24.
    Slide No 24 CAN ErrorFree Communication Low Wiring Cost Low Hardware Cost Easy expandability Low Node-Connection Cost Safety critical equipment Real-time System “Twisted Pair Wire”, wiring cost is low Connectivity with MCU doesn’t occupy much Chip area, which keeps the MCU’s cost Low Simple to add Nodes to the network; Just lap in two wires at any point on the bus Only two pins are needed on MCU and in Bus connectors More Chips with CAN Hardware More and more MCUs with CAN functionality are becoming available
  • 25.
    Slide No 25 CAN Quantity of CAN Nodes:  Theoretically it is unlimited  But practically it is limited to certain number, because higher the nodes will impact on the Delay of the response, will increase the electrical load
  • 26.
    Slide No 26 CAN CAN Bus implementation  A Common way to implement using Two-Twisted wires with two termination Resistors of 120 ohms Twisted Pair Connection – for bi-directional data Terminators
  • 27.
    Slide No 27 CAN– Twisted Pair Wire  Reason for Twisted Pair Wires  To Cancel out Noise generated by external fields across Wires  Current flowing in each wire in Opposite direction, their magnetic field cancels, so the cable radiates less  What is a Terminator  A device connected to one end of a bus or cable that absorbs signals  Terminators can be passive (simple resistors) or active (more complex electronics) depending on the type of bus being terminated
  • 28.
    Slide No 28 CANTermination  CAN Bus is terminated with 120 ohms?  The terminator is placed at the end of a transmission line to  Eliminate reflections at the ends of bus wire  Thus to Match Impedance*
  • 29.
    Slide No 29 CAN CAN Bus is terminated with 120 ohms? Source Destination Source Destination Termination
  • 30.
    Slide No 30 CAN Why only 120Ω been used?  120 Ω is going to be close most of the time for the relatively large wires commonly used for CAN.
  • 31.
    Slide No 31 CAN Non-Automotive CAN Applications:  Ships  Locomotives, Railway Systems  HVAC Systems  Elevators  Industrial Freezers, High Speed Printing Machines  Many Others
  • 32.
  • 33.
    Slide No 33 CAN CAN Standard Specification  CAN Protocol is Standardized by ISO  ISO11898 and ISO11519-2, with no much difference except at the Physical Layer  ISO11898 is a standard for high-speed CAN communication  ISO11519 is a standard for low-speed CAN communication
  • 34.
    Slide No 34 CAN What is Matching Impedance?  When sending power down a transmission line, it is usually desirable that as much power as possible will be absorbed by the load and as little as possible will be reflected back to the source.

Editor's Notes

  • #4 The automotive industry quickly realized the complexity of wiring each module to every other module. Such a wiring design would not only be complex, it would have to be altered depending on which modules were included in the specific vehicle. For example, a car without the anti-lock brake module would have to be wired differently than one that included anti-lock brakes.
  • #6 What is a Bus In General, Bus is an electrical pathway In other words, the bus is the channel, that connects components and transfers information
  • #10 For example, a general scenario, its your birthday You bring sweets and send mail to everybody You want to go out for dinner, to mail to selected people
  • #17 http://maxembedded.com/2013/09/03/serial-communication-introduction/#what
  • #20 Multicast is the delivery of data to a group simultaneously in a single transmission from the source.
  • #21 If two or more units start sending a message at the same time, the unit whose message has highest priority is granted the rights to send, and all other units perform a receive operation. In situations where two or more nodes attempt to transmit at the same time, a non-destructive arbitration technique guarantees that messages are sent in order of priority and that no messages are lost.
  • #22 If two or more units start sending a message at the same time, the unit whose message has highest priority is granted the rights to send, and all other units perform a receive operation. In situations where two or more nodes attempt to transmit at the same time, a non-destructive arbitration technique guarantees that messages are sent in order of priority and that no messages are lost.
  • #24 http://www.playerwindow.com/video/sw3ADKPo1Uo
  • #25 http://dkc1.digikey.com/us/en/tod/Renesas/CANBasicsPart-1_NoAudio/CANBasicsPart-1_NoAudio.html
  • #26 http://rockerjin.blogspot.com/2012/06/4848-blog-4-controller-area-network-bus.html
  • #27 For short cables, you can often get by without any termination unless the baud rate is very high.
  • #28 http://rockerjin.blogspot.com/2012/06/4848-blog-4-controller-area-network-bus.html https://learn.sparkfun.com/tutorials/what-is-a-circuit/circuit-basics
  • #29 http://dkc1.digikey.com/us/en/tod/Renesas/CANBasicsPart-1_NoAudio/CANBasicsPart-1_NoAudio.html
  • #31 http://rockerjin.blogspot.com/2012/06/4848-blog-4-controller-area-network-bus.html
  • #34 The CAN protocol has been standardized by ISO, so that there are several ISO standards for CAN such as ISO11898 and ISO11519-2. In the ISO11898 and ISO11519-2 standards, there are no differences in the definition of the data link layer, but differences exist for the physical layer.
  • #35 In electronics, impedance matching is the practice of designing the input impedance of an electrical load (or the output impedance of its corresponding signal source) to maximize the power transfer or minimize reflections from the load. >> http://en.wikipedia.org/wiki/Impedance_matching >> http://en.wikipedia.org/wiki/Transmission_line >> http://en.wikipedia.org/wiki/Electrical_termination