Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Introduction to Automotive

Networks
An introduction to:
CAN, LIN, MOST and Flexray
Agenda
Evolution of in-vehicle automotive Networks
Why were automotive networks introduced?
What are automotive networks used for?
Basic introduction to networking principles
Current and future networking technologies
CAN, LIN, MOST, Flexray
General Computer Networks
Interconnected devices that store, retrieve and
share information
Automotive Network Evolution - 1
ECU = Electronic Control Unit
Automotive Networking Evolution - 2
Hard-wired Integration
ECU = Electronic Control Unit
Automotive Networking Evolution - 3
Data Bus Integration
ECU = Electronic Control Unit
Automotive Networking - advantages
Reduced wiring harness weight
lower emissions, improved fuel consumption
Reduction in number of redundant sensors &
connectors
Improved reliability fewer warranty issues
Improved diagnostics
Eases integration of more ECUs
Standard interfaces
Legacy and current networking
technologies
Legacy Current Future
Powertrain /
Chassis
CAN CAN, FlexRay
Body SCP,
K-bus
CAN, LIN CAN, LIN,
FlexRay
Infotainment D2B MOST
Gen 2.1
Ethernet
(BroadR-Reach)
In-Vehicle Network Protocols
Why so many different types of
networks?
0.5 1 2.5 5
20K
1M
125K
10M
25M
CAN
Dual wire
LIN
Single wire
Flexray
Optical/
Copper
Relative communication cost
per node
Data rate
(bps)
MOST
Optical
Comparison : Network data rate versus relative
communication costs per node
Multiple networks and gateways
Multiple-Bus Networking
Tail
Lights
Engine
Control
Doors
Head
Lights
ABS
Dash
Board
Gateway
Suspension
Control
Low
Speed
CAN
High
Speed
CAN
Controller Area Network (CAN)
Overview
CAN
CAN Network History & Evolution
Developed by Bosch in Europe
At request of BMW and Mercedes
History and Evolution of CAN Network protocol
1991 ISO/Draft International Standard + Extended
CAN
1992 First use in car (S-series, BMW 8)
1999 estimated 125 million nodes world-wide
2003 estimated 240 million nodes world-wide
2003 ISO 11898 revised
Used by almost all car manufacturers for the
main data communications technology
CAN physical layer Hardware
Tw i sted- pai r W i re
Input/Output Ports Input/Output Ports
CAN Controller
e.g. 82527
CAN Transceiver
TX0 TX1 RX0 RX1
CAN Controller
e.g. 82C200
CAN Transceiver
TX0 TX1 RX0 RX1
CAN_H
CAN_H
CAN_L
CAN_L
Microcontroller
eg. 68705
Microcontroller
eg. 80537
Microcontroller
eg. 68HC05X4
CAN physical layer CAN
Signalling
Bit Representation
CAN uses an electrical
medium to transfer data
UTP (Unshielded Twisted
Pair)
Data represented by voltage
difference between two wires
CAN_High
Recessive = 2.5V
Dominant = 3.5V
CAN_Low
Recessive = 2.5V
Dominant = 1.5V
t
V
3.5 V
2.5 V
1.5 V
0 0 0 0 1 1 1
CAN Signalling
Logical 1 = Vdiff = 0V
Logical 0 = Vdiff = 2V
Can_H
Can_L
Receiver looks
for a 2V
differential
Transient noise
CAN physical layer Twisted pair
wiring
CAN-HI
CAN-LO
CAN physical layer Bus topology
CAN Physical Layer Realities: JLR + J2284 (SAE)
Node 2
Node 3
120
CAN_H
CAN_L
Node 1
120
Node n
Automotive constraints are quite different from the original theoretical
specification
CAN Data Rate CAN Bus Length
500 Kbps 33.5 m*
250 Kbps 50 m
125 Kbps 50 m
Stub Length
1 m
1 m
1 m
Max Nodes
16*
32
32
*Note. 5m+1node required for test equipment access =>max length fromJ 1962connector to terminator =28.5m
CAN physical layer Bus topology
Example Physical implementation of CAN bus
schematic
CAN physical layer Bus topology
Example Physical implementation of CAN bus
schematic
CAN data link layer CAN message
frame
CAN Data is transferred in frames
1 Bit 1 Bit 6 Bits
1 ... 8
bytes
15
Bits
1Bit
1 Bit
1 Bit
7
Bits
>=3
Bits
Interframe
Space
Interframe
Space
End of Frame
ACK Delimiter
ACK Slot
CRC Delimiter
CRC Sequence
Data Field
Control (2 bits reserved for future, DLC0-3 is the data length
code )
RTR Bit
Identifier
Start of Frame
{
{
ACK
RTR = Remote Transmission Frame
CRC = Cyclic Redundancy Check
ACK = Acknowledge
DLC = Data Length Code
Arbitration
Field
11 or 29
Bits
CAN data link layer Bus Access
Access to the CAN network
Multiple bus masters - every node attempts to transmit when it
wants to
Every node must contend (arbitrate) for network access
Bus Access is achieved through CSMA/CD with NDBA
Carrier Sense Multiple Access/Collision Detect
Allows multiple access to transmission medium
Used in Ethernet, CAN etc.
Non-Destructive Bit-wise Arbitration
Fixed priority scheme (based on node ID)
If node senses a higher priority node is requesting bus access it
relinquishes bus
Highest priority node always granted access
No corrupted message during arbitration - No wasted bandwidth
Guaranteed throughput of high priority messages
Automotive Networking CAN bus
Overview
CAN Data Link Layer How CSMA/CD & NDBA
works
Node A
Node B
Node C
Bus
R
D
t1 t2
ID 1501
(5DDHex)
ID 1493
(5D5Hex)
ID 2013
(7DDHex)
ID 1493
(5D5Hex)
SOF
t1 & t2 , Node C and Node B lost arbitration
R
D
R
D
R
D
1 1 1 1 1 1
0
0 0
CAN Network Bus Load & Message
Latency
CAN networks are non-deterministic
No guarantees on time to deliver a message
Does not perform well above 50% bus loading
35-40% is the usual practical bus loading limit
Typical CAN bus characteristic
Bus Load
Message
Latency
CAN Network Summary
Features
Low cost, twisted-pair (2-wire) electrical
implementation
Multiple bus masters - arbitration used to grant access
to network
125 & 500kbits/sec
Non-deterministic
Where used
High speed - PowerTrain
Low/Medium speed Body Control Systems
Local Interconnect Network (LIN)
Overview
LIN Network overview
Not a competitor or alternative to CAN
Introduced in 2000
Low cost / lower bandwidth
Developed for intelligent sensor and actuator
applications
Automotive Sub-bus (UART based), CAN bus
complement
Where used
Switches, Solenoids, Actuators and Motors
(mechatronics)
Bodywork, Doors etc.
LIN applications
LIN physical layer Signalling
Data Representation
LIN uses an electrical medium to transfer data
A simple single wire interconnect (based on enhanced
ISO 9141)
Data represented simply by voltage on wire
12 volts = Logic 1, 0 volts = Logic 0
Speed
Low speed - 20Kbaud
Limited for EMC reasons
12V=logic 1
0V=logic 0
LIN Bus Architecture master/slave
LIN Master
LIN Slave LIN Slave
LIN
Bus
Message Header
Message
Response
Message
Response
Message
Response
Possibly to
vehicle body
control CANbus
LIN Slave
Message
Response
LIN data link layer LIN message
frame
LIN data is transferred in frames
Produced
by Master
Produced by
Master or
Slave
LIN data link layer Bus access
Access to the LIN network
Single Master no arbitration necessary
Master determines transmission using task
schedule
Predictable message timing as everything works to
the master schedule
Slaves respond to master request
LIN Network Summary
Features
Low cost, single-wire implementation (UART)
Single Master, Multiple Slaves
Low bandwidth - 20kbaud
Complements CAN bus not a replacement
Where used
Switches, Solenoids, Actuators and Motors
(mechatronics)
Bodywork, Doors etc.
Media Orientated Systems Transport
(MOST) Network Overview
MOST Network History
A network was required to link modular multi-media
systems
Ability to transmit audio signals as well as control
Audio signals are typically twisted pair wiring, can be 9+ audio
sources = wiring complexity issues
AM/FM radio, CD, DVD, Satellite radio, Navigation, Phone, Voice,
TV, Auxiliary input
Ability to seamlessly control several sources
Need to share large amounts of data
Phone book (phone to navigation display)
Traffic messages (radio to navigation display)
Station data (Satellite radio to navigation display)
Ease of upgrade (not quite plug & play)
MOST was developed & controlled by industry consortium
Used by JLR, Volvo, BMW, Mercedes, GM
MOST Physical Layer Network layer 1
Data representation
MOST uses an optical medium to transfer data
Plastic Optical Fibre (POF)
Ring topology
Data represented by presence or absence of light
Speed
Up to 25Mbits/sec
MOST data link layer Types of
MOST messages
MOST Data is transferred in network frames
which can contain three types of data:
Synchronous data
Guaranteed bandwidth with minimal buffering
Real-time transmission e.g. streaming audio & video
files
Asynchronous data
Variable throughput
For transmission of large packet data e.g. computer
files, Sat-Nav maps, web pages etc.
Control Data
Transportation of Commands, Status and small
Packet Data
MOST Frame Data
Two examples
ONE NETWORK FRAME = 512 bits (64 bytes)
PARITY CHECK
FRAME CONTROL & STATUS BOUNDARY DESCRIPTOR
PREAMBLE
CONTROL CHANNEL
63
63
61-62
0
0
= Boundary
Descriptor
SOURCE DATA CHANNELS
(Asynchronous and/or Synchronous)
1-60
0 63
= Asynchronous
Channel
= Synchronous
Channel
0 63
MAX BANDWIDTH ALLOCATED TO ASYNCHRONOUS CHANNELS = 36 bytes
24 bytes 36 bytes
60 bytes
Audio CD, Radio Data phone book download, traffic info
Audio CD, Radio, DVD, Phone, satellite radio, i-Pod
MOST data link layer Bus Access
Access to the MOST network
Single network master device the timing
master
Time Division Multiplexing
Time slots provide predictable performance
Bandwidth can be varied by allocating bytes to logical
channels
MOST Network Summary
Features
Single Plastic Optical Fibre, Ring topology
Good EMC characteristics (immunity & emissions)
High speed for digital audio & video (low cost per
Mhz)
Asynchronous (14.4Mbps), Synchronous (23Mbps)
data
Plug & Play Applications for up to 64 devices
If ring is broken everything fails
Where used
Designed for Multi-media applications (also known as
Infotainment) in the automotive environment
Future Automotive Networks
Future Automotive Networks
Industry pressures:
Move to drive-by-wire applications
Safety-critical, robust, fault-tolerant
More sophisticated control strategies
Hybrid/EV vehicles
Faster speeds
Increased bandwidth
More ECUs, more sensors
Higher volumes of data to move around the vehicle
Faster response times
Hybrid vehicle electric motor control
Networking Message Latency
Bus Load
Message
Latency
Typical CAN bus characteristic
unpredictable latency
Bus Load
Message
Latency
Typical TT network characteristic
predictable latency
FlexRay is a time-triggered (TT) protocol each node is guaranteed
access to the bus
FlexRay Physical Layer
Differential voltage uBus = uBP - uBM
Idle-LP : Power Off situation. BP & BM @ GND.
Idle : No current is drawn, BP & BM biased to the
same voltage level
Data_1, BP +ve, BM ve, Differential = +ve
Data_0, BM +ve, BP -ve, Differential = -ve
FlexRay
Electrical, Twisted Pair
22metres@ 10Mbit/s
CAN
Electrical, Twisted Pair
(40metres@ 1Mbit/s)
FlexRay Physical Layer
FlexRay Data Link Layer
TDMAAccess
Note: FlexRay is much more complex than CAN to design there are multiple design
parameters to consider. Consider integration issues as well.
FlexRay Networking
FlexRay
High speed backbone
X-by-Wire
Airbag deployment
LIN Sub Bus:
Doors
Seats etc.
CAN/TTCAN
Applications:
Powertrain/body
TTCAN deterministic
powertrain
MOST
Infotainment
Many proposed uses of FlexRay
Review of what weve learnt
Networking principles
physical layer how data is represented
data link layer how data is transferred between
nodes
Evolution of automotive networks
Why they were introduced
Current Network Technologies
CAN, LIN, MOST
Choice depends upon application requirements,
speed, cost etc.
Future Network Technologies
FlexRay (one possible solution)

You might also like