Presentation is loading. Please wait.

Presentation is loading. Please wait.

EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong.

Similar presentations


Presentation on theme: "EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong."— Presentation transcript:

1 EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong

2 Presentation Outline  CAN history and basics  CAN standard message frame & arbitration  Error checking & noise protection  CAN implementation  Application strengths http://goo.gl/Ktm1BY

3 CAN History  Developed by Bosch in 1983  Presented at SAE Conference in Detroit in 1986  Designed for automotive uses  Allows multiple controllers and sensors to communicate  2008: all US vehicles required to implement CAN for OBD  Multiple CAN implementations and variations

4 Where is CAN Used?  Automotive industry  Electronic control units (ECUs)  Sensors and switches  Multimedia systems  Factory automation  Low-cost machinery and electronics  Michigan Hybrid Racing Electric Drive System Photo credit: Sam Haberl

5 CAN Basics  Multi-master, broadcast serial bus  Real Time Arbitration  Robust error-checking and noise protection  No extra wires for clock or arbitration  Cheap http://www.aa1car.com/library/can_systems.h tm

6 Masters and Targets  Each node can be a master and a target  Arbitration field indicates message type  Nodes listen to messages that they care about  Addresses composed of dominant and recessive bits  0 – Dominant, 1 – Recessive  Lowest address (0x000) is most dominant http://goo.gl/NafrtG

7 Standard Message Frame  Start of frame  Arbitration (identifier)  Control (data length, reserved bits)  Data field  CRC (cyclical redundancy check)  ACK (acknowledgement field)  End of frame  Intermission (time between frames) Image from http://www.softing.com/home/en/industrial-automation/products/can-bus/more-can-bus/data-frame.php?navanchor=3010395 11 or 29 Bit

8 Arbitration http://electronicdesign.com/Files/29/9131/Figure_02.gif 11 or 29 Bit

9 Error Checking  Form Errors  Proper message formatting is enforced  Bit Errors  Transmitter detects wrong bit while transmitting.  CRC Checksum Errors  Checksum calculated, compared to transmitted checksum  Acknowledgement Errors  ACK field must be set dominant by a receiving node  Bit stuffing Errors  Any time there are 5 of the same bits, one opposite bit sent  Error triggered by 6 identical bits

10 Error Handling  Any node on the bus can raise an “Error frame.”  Holds bus dominant for 6 bits  Other nodes realize this is wrong, raise their error frames  Node that was transmitting re-sends message  Each node keeps individual error count  Node goes into “passive” mode at 127 errors  Node removes itself from bus after 255 errors Image from http://www.softing.com/home/en/industrial-automation/products/can-bus/more-can-bus/error-handling/active-error- frame.php?navanchor=3010501

11 Timing http://goo.gl/nUry9c  No bus clock signal, each node has its own clock  Each bit is divided into four sections  Synchronization, Propagation, Phase 1, Phase 2  Bit sampled between phase 1 and 2  Receiving nodes synchronize by adjusting phases

12 CAN Implementations Variants  CAN architecture can be implemented in many different approaches  Standards for single-wire, twisted pair, four-wire  Twisted-pair CAN is most commonly used  Twisted pair uses CAN_H and CAN_L signals  No additional wires needed  Signal generated by transceiver, not by processor http://www.networkcablinglosangeles.com/wp- content/themes/networkcablinglosangeles/images/unshielded_cable.jpg

13 Electrical Noise  Lots of Noise in Automotive Application  Only getting worse with more automation for luxury http://upload.wikimedia.org/wikipedia/commons/0/0a/3phase-electric-motor-1.18.png

14 Differential Signals  Two-Wire differential signal  Value represented by difference between wires, not the absolute value of one wire  Difference creates immunity to noise 10? 00

15 From Master to Bus (2-Wire Implementation) http://goo.gl/RPHJ8R  Processor uses logic-level signal  Signals sent over 2-wire bus  Use transceiver as bridge

16 Full Message Example  Sends the message with identifier 00000010100  Sends One Byte with value “1”  15 bit CRC field  Bit Stuffing is handled by can transceivers and is not visible

17 A CAN Bus For Everyone  Allows multiple bitrates and buses  Bitrates affect robustness and bus length  1 Mbit/s – High-priority  i.e. Airbags  10 kbit/s – Low-priority  i.e. Audio System changes (volume, audio source)

18 Multiple CAN Bus Example http://goo.gl/UFsVd1

19 Application Strengths  Arbitration with no delay or extra wires  High-priority devices don’t wait  No extra weight or cost from wires  Robust error correction  Faulty nodes remove themselves from bus  Minimizes need for software correction  Noise immunity from twisted pair CAN  Inexpensive  56 cents @ 2,500 qty for SN65HVD1040DR CAN Transceiver (DigiKey)

20 References  Robert Bosch GmbH  http://esd.cs.ucr.edu/webres/can20.pdf http://esd.cs.ucr.edu/webres/can20.pdf  KVaser CAN Solutions  http://www.kvaser.com/en/about-can/the-can-protocol.html  Dearborn Group Technologies  http://www.dgtech.com/images/primer.pdf http://www.dgtech.com/images/primer.pdf  Softing CAN Bus Products  http://www.softing.com/home/en/industrial-automation/products/can- bus/index.php?navanchor=3010024 http://www.softing.com/home/en/industrial-automation/products/can- bus/index.php?navanchor=3010024  Vector CANtech  http://vector.com/vi_controller_area_network_en.html?gclid=CNOAroPo47oCFdFDMgod9 GsAIw&et_rp=1 http://vector.com/vi_controller_area_network_en.html?gclid=CNOAroPo47oCFdFDMgod9 GsAIw&et_rp=1

21 Questions?


Download ppt "EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong."

Similar presentations


Ads by Google