Top Banner
Seminar on CAN Bus Protoco l By Abhinaw Tiwari CSE- 12010330
30

CAN (Controller Area Network) Bus Protocol

Jan 12, 2017

Download

Education

abhinaw tiwari
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CAN (Controller Area Network) Bus Protocol

Seminar on

CAN Bus Protocol

By Abhinaw Tiwari CSE-12010330

Page 2: CAN (Controller Area Network) Bus Protocol

Contents

Introduction CAN Applications CAN Characteristics Message Types Arbitration CAN Data Protection Advantages Disadvantages Conclusion

- 2 -

Page 3: CAN (Controller Area Network) Bus Protocol

- 3 -

Introduction

• Multi-master protocol

• Broadcasting

• Serial communication technology

• Priority-based bit-wise arbitration

Page 4: CAN (Controller Area Network) Bus Protocol

- 4 -

Introduction

• Originally developed by Robert Bosch for automobile in-vehicle network in the 1980s

• For reliable data exchange between ECUs

• Robust in noisy environments

• Cost effective

Page 5: CAN (Controller Area Network) Bus Protocol

- 5 -

Introduction

• Compact and fast

• It is a message-based protocol.

• There are no defined addresses, just defined messages.

Page 6: CAN (Controller Area Network) Bus Protocol

Before CAN

Page 7: CAN (Controller Area Network) Bus Protocol

After CAN

Page 8: CAN (Controller Area Network) Bus Protocol

- 8 -

Real-world applications

Page 9: CAN (Controller Area Network) Bus Protocol

- 9 -

Real-world applications

• Automotive• Military vehicles• Industrial machinery• Medical systems• Agricultural machinery• Marine control and navigation• Elevator control systems

Page 10: CAN (Controller Area Network) Bus Protocol

- 10 -

CAN Characteristics

• All messages are broadcast• Any node is allowed to broadcast a

message• Each message contains an ID that

identifies the source or content of a message

• Each receiver decides to process or ignore each message

Page 11: CAN (Controller Area Network) Bus Protocol

- 11 -

CAN Characteristics

Bit Rate / Bus Length1M bit/sec 40 meters (131 feet)

500K bit/sec 100 meters (328 feet) 250K bit/sec 200 meters (656 feet) 125K bit/sec 500 meters (1640 feet)

Page 12: CAN (Controller Area Network) Bus Protocol

- 12 -

CAN Characteristics

Physical Medium

Single twisted pair wire terminated on each end

Node A

Node B

120 Ω 120 Ω

Page 13: CAN (Controller Area Network) Bus Protocol

- 13 -

CAN Characteristics

Network Size

• The maximum number of nodes is not specified.

• Networks are limited by electrical loading, up to 64 nodes is normal

Page 14: CAN (Controller Area Network) Bus Protocol

- 14 -

CAN Message Types

Four Message Types• Data Frame

– Used to transmit data• Remote Frame

– Used to request data transmission• Error Frame

– Sent by a node that detects an error• Overload Frame

– Sent by a node to request a delay in transmission

Page 15: CAN (Controller Area Network) Bus Protocol

• Standard Data Frame

• Extended Data Frame

CAN Message Format

Page 16: CAN (Controller Area Network) Bus Protocol

- 16 -

CAN Arbitration

• CSMA/CA

• All nodes must wait for an idle bus condition .

• If two nodes begin transmitting simultaneously, they then participate in an arbitration process.

Page 17: CAN (Controller Area Network) Bus Protocol

- 17 -

CAN Arbitration

• Wired-AND mechanism

• The node with the lower ID number wins the arbitration and continues transmitting its message.

• The loser of the arbitration backs off and re-tries.

Page 18: CAN (Controller Area Network) Bus Protocol

- 18 -

CAN Arbitration

CSMA/CA & Wired-AND Logic

Page 19: CAN (Controller Area Network) Bus Protocol

- 19 -

CAN Data Protection

CAN Data Protection-Error Detection

• Bit Monitoring Sender Task Compares every bit placed on the CAN bus with the

actual bus level Discrepancy indicates a bit monitoring error and

results in error handling

Page 20: CAN (Controller Area Network) Bus Protocol

CAN Data Protection

CAN Data Protection-Error Detection

• Stuff Check Receiver Task Compares arriving bit stream for a sequence of six

homogeneous bits. Detection of a sixth homogeneous bit indicates bit

stuffing error and results in error handling

- 20 -

Page 21: CAN (Controller Area Network) Bus Protocol

CAN Data Protection

CAN Data Protection-Error Detection

• Form Check Receiver Task Comparison of the arriving bit stream with the

message format Detection of a dominant delimiter bit (CRC delimiter,

ACK delimiter) or a dominant bit within EOF indicates a format error and results in error handling

- 21 -

Page 22: CAN (Controller Area Network) Bus Protocol

CAN Data Protection

CAN Data Protection-Error Detection

• Cyclic Redundancy Check Receiver Task Utilizes the arriving bit stream and generator

polynomial for the Cyclic Redundancy Check defined in ISO 11898-1

Detection of a CRC error results in error handling

- 22 -

Page 23: CAN (Controller Area Network) Bus Protocol

CAN Data Protection

CAN Data Protection-Error Detection

• ACK Check Sender Task Acknowledge error (ACK error) is detected if the

recessive level placed by the sender is not overwritten

Detection of an ACK error results in error handling

- 23 -

Page 24: CAN (Controller Area Network) Bus Protocol

- 24 -

CAN Data ProtectionError Tracking

Page 25: CAN (Controller Area Network) Bus Protocol

- 25 -

CAN Advantages

• High performance under light loads• Low cost• Reliable• Robust

Page 26: CAN (Controller Area Network) Bus Protocol

- 26 -

CAN Disadvantages

• Unfair access: Node with high priority can hog the network

• Starvation for some particular nodes

Page 27: CAN (Controller Area Network) Bus Protocol

- 27 -

Conclusion

• CAN is ideally suited in applications requiring a large

number of short messages with high reliability in

rugged operating environments.

• Because CAN is message-based and not address-

based, it is especially well-suited when data is

needed by more than one location and system-wide

data consistency is mandatory.

Page 28: CAN (Controller Area Network) Bus Protocol

- 28 -

References

1. https://elearning.vector.com

2. https://slideshare.net

Page 29: CAN (Controller Area Network) Bus Protocol

- 29 -

CAN Bus Protocol

Q & A

Page 30: CAN (Controller Area Network) Bus Protocol

- 30 -

CAN Bus Protocol

Thank you!