Intro to Controller Area Networks (CAN) Part 2 of 2, E. Zivi, April 1, 2015 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a.

Slides:



Advertisements
Similar presentations
Contents Overview Data Information Frame Format Protocol
Advertisements

I2C bus Inter Integrated Circuits bus by Philips Semiconductors
Setha Pan-ngum. History of CAN [1] It was created in mid-1980s for automotive applications by Robert Bosch. Design goal was to make automobiles more reliable,
William Stallings Data and Computer Communications 7th Edition
Slide 1 Industrial Automation - Customer View - Training PhW - CANopen_en 02/ 2002 CANopen QUIZ CANopen QUIZ.
Assessment 1 Review Network Layers. Computer 1Computer 2 2.
EUT 1040 Lecture 10: Programmable Logic Controllers.
Chapter 6 Errors, Error Detection, and Error Control
EC312 CANopen mbed Intrusion E. Zivi April 26, 2015
Lecture 4a: Communication and Networking CSCI102 - Introduction to Information Technology B ITCS905 - Fundamentals of Information Technology.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
CS335 Networking & Network Administration Wednesday, April 7 PacketsPackets, Frames, and Error DetectionFramesError Detection.
Open System Interconnection (OSI) Model
Chapter 6: Errors, Error Detection, and Error Control
SYST5030/4030 ☻Error control☻ ☻ Network architecture ☻ ☻ Protocols ☻ ☻ Transmission Efficiency and Throughput ☻
Network Data Organizational Communications and Technologies Prithvi N. Rao Carnegie Mellon University Web:
Host Data Layer 7 Application Interacts with software requiring network communications; identifies partners, resources and synchronization Layer 6 Presentation.
Chapter 6 Errors, Error Detection, and Error Control
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Review on Networking Technologies Linda Wu (CMPT )
EUT 1040 PLC Timers and Motor Protection. Industrial Communications RS-422 (EIA 422): Asynchronous Serial Communications, similar in many respects to.
1 LAN Topologies, Access methods (Week 1, Wednesday 1/10/2007) © Abdou Illia, Spring 2007.
Intro to CANopen Networks E. Zivi Nov 6, 2014 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network.
 What is a Controller Area Network?  History of CAN  CAN communication protocol  Physical layer  ISO  CiA  CANopen  DeviceNet  Applying.
Intro to Controller Area Networks (CAN) Part 1 of 2, E. Zivi, April 1, 2015 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a.
EECS 373 Controller Area Networks Samuel Haberl Russell Kuczwara Senyuan Zhong.
1 Computer Networks Course: CIS 3003 Fundamental of Information Technology.
Chapter 10 Error Detection and Correction
SERIAL BUS COMMUNICATION PROTOCOLS
Computers in Surveying SVY2301 / E4006 Automated Surveying.
Chapter Five Network Architecture. Chapter Objectives  Describe the basic and hybrid LAN technologies  Describe a variety of enterprise-wide and WAN.
January 9, 2008BAE In-Vehicle Networking Lecture 2 CAN Physical Layers ISO 11898, ISO Part 2, J ,12,13 Physical Layers BAE
Midterm Review - Network Layers. Computer 1Computer 2 2.
Presentation on Osi & TCP/IP MODEL
1 Layer 2: Concepts Honolulu Community College Cisco Academy Training Center Semester 1 Version
ECGR 6185 Advanced Embedded Systems Controller Area Network University Of North Carolina Charlotte Bipin Suryadevara.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
OSI Model. Topics What is the OSI Model? What is a Protocol? Why 7 Layers? The 7 Layers – Application – Presentation – Session – Transport – Network –
BR 6/001 Universal Serial Bus Universal Serial Bus is a new synchronous serial protocol for low to medium speed data transmission Full speed signaling.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This training course provides an overview of Message Frames.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 6: Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach Third Edition.
Section 3 - Slide 1/19 P&T - GPS - Formation PhW - CANopen_lev1_en - 01/2004 History CANopen and the ISO model Physical layer Link layer Application layer.
11/22/2004EE 42 fall 2004 lecture 351 Lecture #35: data transfer Last lecture: –Communications synchronous / asynchronous –Buses This lecture –Transmission.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
1 Lecture Controller Area Networks Dr. Tony Grift
1 Chap. 2 Protocol. 2 Communication model Simplified communication model  source node  gather data from sensor or switch using ADC (analog-to-digital.
SYSTEM ADMINISTRATION Chapter 2 The OSI Model. The OSI Model was designed by the International Standards Organization (ISO) as a structural framework.
OSI Model. Open Systems Interconnection (OSI) is a set of internationally recognized, non proprietary standards for networking and for operating system.
An Introduction to CAN CAN Basics 2 Renesas Interactive
1 Copyright © 2014 Tata Consultancy Services Limited Controller Area Network (CAN) By Renukacharya A. Thakare.
1 Business Telecommunications Data and Computer Communications Chapter 6 The Data Communications Interface.
Simple LAN Topologies  Terminators stop signals after they have reached their destination  Signal bounce –Phenomenon in which signals travel endlessly.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Ch. 6 Digital Data Communication Techniques. 6.1Asynchronous & Synchronous Transmission Asynchronous Transmission: transmission in which each information.
LAN Topologies Part 1. What is topology? Topology is the physical or logical interconnection of communicating devices Physical Topology: LANtopology,
Controller Area Network
National Institute of Science & Technology TECHNICAL SEMINAR PRESENTATION Presented by TRUPTI RANJAN BEHERA Roll no: EI Under the Guidance of.
Serial Communications
Controller Area Network (CAN) Training
Packetizing Error Detection
Chapter 3: Open Systems Interconnection (OSI) Model
Basic Check-out of a Controller Area Network (CAN) Bus
Packetizing Error Detection
Packetizing Error Detection
Controller Area Networks (CAN)
Data Communication.
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Intro to Controller Area Networks (CAN) Part 2 of 2, E. Zivi, April 1, 2015 References: 1.A CAN Physical Layer Discussion Microchip Application Note AN00228a 2.Controller Area Network (CAN) Implementation Guide Analog Devices Application Note AN Controller Area Network, CANPRES Version 2.0, Siemens Microelectronics, Inc., October CAN physical layer ref: 7.Controller Area Network Physical Layer Requirements, TI SLLA270–January CAN Tutorial, 9.CANopen Introduction, ref: 9.Embedded Networking with CAN and CANopen, by Pfeiffer, Ayre and Keydel 10.CAN open Implementation: Applications to Industrial Networks, by Farsi and Barbosa 11.CS4700/CS5700 Fundamentals of Computer Networks, Alan Mislove, Northeastern University 12.Controller Area Networks

Review: CAN is the “Nervous System” of Many Complex Systems New cars typically contain 50 to 100 microcontrollers

Review: CAN & International Standards Organization (ISO) Open Systems Interconnect (OSI) Reference Model 3 High level CAN Protocols implement Application layer and skip the four intervening layers

In Future Classes We’ll Introduce The CANopen Application 4 High level CAN Protocols implement Application layers and skip the four intervening layers ISO CAN Data Link Layer ISO CAN Physical Layer Application CiA 301 CANopen Application Layer & Communication Profile CiA 302 CANopen Framework for CANopen Managers & Programmable Devices CiA 4xx Device Profiles CiA 401 Generic I/O Profile CiA 402 Motion Control Profile IEC Programmable Devices Profile Not Implemented by CAN or CANopen

Review: CAN Differential Bus Interface Transceivers The CAN idle state presents a recessive state, signaled by a small differential voltage across CANH and CANL. With the indicated split termination, this idle voltage will be halfway between VDD (positive supply) and VSS (ground). The CAN dominant state occurs when one or more transceivers simultaneously close the indicated transistor switches driving CANH and CANL toward VDD and VSS, respectively. This open collector transistor switch configuration is referred to as a “wired or” since any node transmitting a dominant bit always overrides a recessive bit. Since a dominant bit represents a logic 0, this arrangement is sometimes referred to as “wired and” since bus a logic “1” state is achieved only if all nodes (node 1 AND node 2 AND node 3 …) signal logic “1” recessive bits). Micro- controller Transceiver Additional Transceivers … Transistor Switches 60Ω Split Termination Example Capacitive coupling to ground 5

Review: CAN ISO V Nominal Bus Levels Assuming Split Termination  Recessive voltage ≈ 2.5V 6

Example CAN Sample Signaling 7 Dominant bus state = logic 0 Recessive bus state = logic 1

Review: “Wired OR” Closing Node A switch OR closing Node B switch turns on the light. Conversely, the light is off unless Node A switch is open AND Node B switch is also open. 8

Review: CAN Arbitration Animation Mouse over graphic to control animated bus arbitration example 9

CAN Bit Synchronization, Timing & Propagation Delay 1.CAN signaling is bit synchronized across the entire network during the Sync portion which is the time required for each node to synchronize with the leading edge of a recessive to dominant edge transition. 2.The Signal Propagation is the time for the bit signal to propagate throughout the network. 3.Longer networks result in longer Signal Propagation delays which require longer bits resulting in slower data rates. 4.The Phase 1 portion delays sampling so that the bit signal can settle to a stable value Signal Propagation Propagation delay Settling time Sample Point 10 Faster bit rates require shorter propagation delays and therefore, smaller networks.

CAN Bit Rate Versus Bus Length 11 For a CAN bus, the signaling rate is determined from the total system delay – down and back between the two most distant nodes of a system and the sum of the delays into and out of the nodes on a bus with the typical 5ns/m prop delay of a twisted-pair cable. A conservative rule of thumb for bus lengths over 100 m is: Signaling Rate (Mbps) × Bus Length (m) ≤ 50 Bus Length (m) Signaling Rate (Kbps) 401,

CAN Synchronization Via Bit Stuffing CAN nodes use Recessive to Dominant edges to maintain bit synchronization. Bit Stuffing ensures sufficient Recessive to Dominant edges to maintain bit synchronization A stuff Bit inserted after 5 consecutive bits at the same state A Stuff Bit is the inverse of previous bits and is discarded by the receiver

MicroMod TPDO 2 Transmit on Analog In Change of State Message (40 μS / Division):

MicroMod Heartbeat, Note ACK bit transmitted by Receiving Node (40 μS / Division):

TPDO 2 Analog Input Transited on change of state 4 Words, 2 Bytes each, little endian PCAN-Diag Hand Held Diagnostic Scope (40 μS / Div.) 10-bit Analog Input Conversion Factor 5 V / 1023 counts = V / count 0x023b   V 0x017a   V 0x0174   V 0x0169   V

MicroMod Heartbeat, with ACK bit (40 μS / Div.) CANopen Heartbeat Messages 0: Boot-up 4: Stopped 5: Operational 127: Pre-operational Heartbeat 1 Byte Node Status

Five Types of CAN Error Checking 1.Bit error: Transmitting node compares transmitted & received bit value. 2.Stuff error: More than 5 successive recessive or dominant bits without a “Stuff Bit”. 3.CRC error: Sender CRC value in message does not match receiver CRC calculation. 4.Form error: Frame is not formatted properly. 5.Acknowledgement error: Transmitter sends recessive ACK bit. At least one receiver node must assert a dominant ACK reply into sender message.

The cyclic redundancy check (CRC) method is used for detection of bit errors. The binary polynomial used in CAN 2.0 is: gCAN (x) = x15 + x14 + x10 + x8 + x7 + x4 + x3 + 1 = CAN Cyclic Redundancy Check “Bit Bucket” Error Frame is a superposition of 6 to 12 consecutive Bits asserted by nodes that detect an error. Note that Error Frame breaks bit stuffing rules

CAN Example Physical Network Layout 20

Typical Differential CAN Cabling Differential signaling minimizes common mode noise Twisting cables minimizes effects of electromagnetic interference Optional cable shielding protects against electrostatic interface 21

CAN Typical Physical Layer Connector CAN has a variety of connectors for various applications. The sub-D connector, shown above, is often used in laboratory setups. Only CAN_H and CAN_L are required, the other signals are optional. Note that CAN cables can distribute power to remote nodes. 22

Characteristic Impedance of CAN Twisted Cable Voltage charges capacitance, current charges inductance as wave travels down transmission line. ≈ Transmission line inductance & capacitance Equivalent Circuit