Raziuddin khazi
Chemnitz University of Technology
Embedded Systems
Second Semester
CAN BUS in
Automotive systems
2
Contents
2
• Introduction
• CAN requirements
• CAN frame format
• CAN OSI layers
 Physical layer
 Data link layer
• Advantages
• CAN vs Flexrays
• References
• CAN bit stuffing
3
Introduction
• CAN was dedicatedly developed for automobile in the 1980’s, today CAN
chips are manufactured by Motorola, Intel, Phillips etc.
• Half duplex, Message based protocol that overtook Ethernet and USB
because of its price to performance ratio & simple hardware.
• ISO-11898 is the CAN standard, CAN2.0A – 11 bit identifier and CAN2.0B
-29 bit identifier.
• High speed CAN - 1Mbps(suspension , engine control ) and Low speed
CAN – 125kbps(power window, wiper control).
Continued..
4
Introduction
Source: http://processors.wiki.ti.com
Typical CAN bus
5
CAN requirements
• Twisted pair cable eliminate the electromagnetic interference.
• Recommended to have maximum 30 nodes with 120 ohm termination .
• According to the ‘rule of thumb’, signal rate * length <= 50
Bus length in
meters
Signal rate in
Mbps
40 1
100 0.5
500 0.10
1000 0.05
Source : www.esp elecrtonics.comSource : http://digital.ni.com
6
CAN frame format
Arbitration : When multiple nodes access the bus same time, the node
with least arbitration wins.
RTR : When RTR = ‘1’ then it is remote frame, otherwise data frame.
IDE : Select standard CAN when ‘0’ and extended CAN when ‘1’
Source: https://en.wikipedia.org
Continued..
7
CAN frame format
Source: http://canbus.pl
Continued..
8
CAN frame format
• DLC: Data length code(4 bits) contains number of bytes of data being transmitted.
• DATA: up to 64 bits (8 bytes) of data can be transmitted.
• CRC: 16 bit cyclic redundancy check detects the transmission error.
• ACK: Dominant bit(0) after receiving correct data, otherwise writes recessive bit(1).
• EOF: Marks the end of frame and disable the bit stuffing .
• IFS: Inter frame space is the time required to move correctly received frame to
message buffer area.
9
CAN bit stuffing
Stuff error:
Active error:
• It has six ‘0’s & eight ‘1’s, For every active error count increments by 8 and rest all
receiving nodes increments by 1.
Passive error:
• Do not block bus traffic but keeps counting, if count is beyond 256 it results into bus
off error.
Bus off error:
• Internally disconnects the node and only re-initialization can solve the issue.
Bit stuffing :
• Transmitter adds the opposite level bit on detecting 5 consecutive same level bits,
and receiver discard the stuffed bit when receiving.
10
CAN OSI : Physical layer
• Physical layer can only be implemented on hardware.
• When transmitting it converts 1’s and 0’s into electrical signal and back again to
bits when receiving.
Source: http://www.ti.com/product/SN65HVD231/datasheet
Continued..
11
CAN OSI : Datalink layer
• It can be implemented both on hardware and software.
• Carrier Sense: Nodes checks the bus status, if the bus is idle then accesses it
otherwise wait.
• Multiple Access/CD+ AMP: Avoid collision when multiple nodes access the bus
same time.
CSMA/CD+AMP explained Source: http://canbus.pl
12
Advantages
• CAN is multi master capable communication.
• Reduce the wiring complexity between nodes.
.
• Error detection and correction capability.
• Easy interface with other protocol.
• High speed up to 1Mbps .
Source: www.ixxat.com
13
CAN vs Flex ray
Properties CAN bus Flex ray
Standard ISO-11898 ISO-17458
Max speed 1 Mbps 10 Mbps
Topology Bus Bus and Star
Cost Low High
Source : https://en.wikipedia.org/
14
References
[1] Controller area network and its applications , Akshay Rane, Ajit schendge,
Volume 4, Issue 3 March 2014.
[2] A novel bit stuffing technique for controller area network(CAN) protocol,
Tapas ranjan, Ayas kant and kamala kant , 978-1-4799-2206-2/14, 2014
[3] Introduction to controller area network by Texas Instruments
http://www.ti.com/lit/an/sloa101b/sloa101b.pdf (accessed on 8-06-2017)
[4] CAN hardware software manual by National instruments
http://www.ni.com/pdf/manuals/370289g.pdf (accessed on 8-06-2017)
[5] http://hem.bredband.net/stafni/developer/CAN.htm (accessed on 6-06-2017)
[6] https://www.kvaser.com/about-can/the-can-protocol/can-physical-layers/
(accessed on 6-06-2017)
THANK YOU

Controller area network (CAN bus) ppt

  • 1.
    Raziuddin khazi Chemnitz Universityof Technology Embedded Systems Second Semester CAN BUS in Automotive systems
  • 2.
    2 Contents 2 • Introduction • CANrequirements • CAN frame format • CAN OSI layers  Physical layer  Data link layer • Advantages • CAN vs Flexrays • References • CAN bit stuffing
  • 3.
    3 Introduction • CAN wasdedicatedly developed for automobile in the 1980’s, today CAN chips are manufactured by Motorola, Intel, Phillips etc. • Half duplex, Message based protocol that overtook Ethernet and USB because of its price to performance ratio & simple hardware. • ISO-11898 is the CAN standard, CAN2.0A – 11 bit identifier and CAN2.0B -29 bit identifier. • High speed CAN - 1Mbps(suspension , engine control ) and Low speed CAN – 125kbps(power window, wiper control). Continued..
  • 4.
  • 5.
    5 CAN requirements • Twistedpair cable eliminate the electromagnetic interference. • Recommended to have maximum 30 nodes with 120 ohm termination . • According to the ‘rule of thumb’, signal rate * length <= 50 Bus length in meters Signal rate in Mbps 40 1 100 0.5 500 0.10 1000 0.05 Source : www.esp elecrtonics.comSource : http://digital.ni.com
  • 6.
    6 CAN frame format Arbitration: When multiple nodes access the bus same time, the node with least arbitration wins. RTR : When RTR = ‘1’ then it is remote frame, otherwise data frame. IDE : Select standard CAN when ‘0’ and extended CAN when ‘1’ Source: https://en.wikipedia.org Continued..
  • 7.
    7 CAN frame format Source:http://canbus.pl Continued..
  • 8.
    8 CAN frame format •DLC: Data length code(4 bits) contains number of bytes of data being transmitted. • DATA: up to 64 bits (8 bytes) of data can be transmitted. • CRC: 16 bit cyclic redundancy check detects the transmission error. • ACK: Dominant bit(0) after receiving correct data, otherwise writes recessive bit(1). • EOF: Marks the end of frame and disable the bit stuffing . • IFS: Inter frame space is the time required to move correctly received frame to message buffer area.
  • 9.
    9 CAN bit stuffing Stufferror: Active error: • It has six ‘0’s & eight ‘1’s, For every active error count increments by 8 and rest all receiving nodes increments by 1. Passive error: • Do not block bus traffic but keeps counting, if count is beyond 256 it results into bus off error. Bus off error: • Internally disconnects the node and only re-initialization can solve the issue. Bit stuffing : • Transmitter adds the opposite level bit on detecting 5 consecutive same level bits, and receiver discard the stuffed bit when receiving.
  • 10.
    10 CAN OSI :Physical layer • Physical layer can only be implemented on hardware. • When transmitting it converts 1’s and 0’s into electrical signal and back again to bits when receiving. Source: http://www.ti.com/product/SN65HVD231/datasheet Continued..
  • 11.
    11 CAN OSI :Datalink layer • It can be implemented both on hardware and software. • Carrier Sense: Nodes checks the bus status, if the bus is idle then accesses it otherwise wait. • Multiple Access/CD+ AMP: Avoid collision when multiple nodes access the bus same time. CSMA/CD+AMP explained Source: http://canbus.pl
  • 12.
    12 Advantages • CAN ismulti master capable communication. • Reduce the wiring complexity between nodes. . • Error detection and correction capability. • Easy interface with other protocol. • High speed up to 1Mbps . Source: www.ixxat.com
  • 13.
    13 CAN vs Flexray Properties CAN bus Flex ray Standard ISO-11898 ISO-17458 Max speed 1 Mbps 10 Mbps Topology Bus Bus and Star Cost Low High Source : https://en.wikipedia.org/
  • 14.
    14 References [1] Controller areanetwork and its applications , Akshay Rane, Ajit schendge, Volume 4, Issue 3 March 2014. [2] A novel bit stuffing technique for controller area network(CAN) protocol, Tapas ranjan, Ayas kant and kamala kant , 978-1-4799-2206-2/14, 2014 [3] Introduction to controller area network by Texas Instruments http://www.ti.com/lit/an/sloa101b/sloa101b.pdf (accessed on 8-06-2017) [4] CAN hardware software manual by National instruments http://www.ni.com/pdf/manuals/370289g.pdf (accessed on 8-06-2017) [5] http://hem.bredband.net/stafni/developer/CAN.htm (accessed on 6-06-2017) [6] https://www.kvaser.com/about-can/the-can-protocol/can-physical-layers/ (accessed on 6-06-2017)
  • 15.