Vehicle Bus Standards. Basics of Can & Its Interface With Labview

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Vehicle Bus Standards.

Basics of CAN & its


Interface with LabVIEW

BY SARAVANA KUMAR N – 22/07/2016

1
Agenda
 Introduction to Vehicle bus
 Various Bus Standards
 Introduction to CAN
 Details about CAN Protocol Architecture
 CAN Interface & Classification
 NI LabVIEW CAN Interface Required Items
 Benefits of CAN
 Sources

2
Introduction to Vehicle bus
• A vehicle bus is a specialized internal communications network that
interconnects components inside a vehicle.
• Radio
• ECU (Engine Control Unit)
• TCU (Transmission Control Unit)
• ABS Control Unit
• BCM (Body Control Module)

3
Reason Behind vehicle Network
 Electronic control module typically gets its input from sensors
(speed, temperature, pressure, etc.) that it uses in its
computation.

 Various actuators are used to enforce the actions determined by


the module (turn the cooling fan on, change gear, etc.).

 The modules need to exchange data among themselves during


the normal operation of the vehicle. For example, the engine
needs to tell the transmission what the engine speed is, and the
transmission needs to tell other modules when a gear shift
occurs.

4
 The automotive industry quickly realized the complexity of wiring
each module to every other module.

 The industry's answer to this problem was to create a central


network in the vehicle.

 This need to exchange data quickly and reliably led to the


development of the vehicle network. The vehicle network is the
medium of data exchange.

 Each module, a node on the vehicle network, controls specific


components related to its function and communicates with the
other modules as necessary, using a standard protocol, over the
vehicle network.

5
Various Bus Standards/Protocols
Avionics Data Bus ARNIC 429
MVB (Multifunction Vehicle Bus)
Train Communication Network
Byte Flight
CAN (Controller Area Network)
Basic Automobile Data Bus D2B (Domestic Digital Bus)
FlexRay
LIN (Local Interconnect Network)
MOST (Media Oriented Systems Transport)
J1939 and ISO 11783
Heavy Vehicles Automobile Data Bus J1708 and J1587
Keyword Protocol 2000 (KWP2000)
VAN (Vehicle Area Network)
SPI (Serial Peripheral Interface)
DC-BUS
Other Automobile Data Bus IDB-1394
IE BUS- (Inter Equipment Bus
I2C
J1850
6
Avionics Data Bus

ARINC 429 - Aeronautical Radio INC avionics data bus used on most
higher-end commercial and transport aircraft.

Train Communication Network

MVB (Multifunction Vehicle Bus) Multifunction Vehicle Bus– part of


the Train Communication Network. The multifunction vehicle bus
(MVB) present inside each coach and the wire train bus (WTB) to
connect the MVB parts with the train control system and it is
standardized with IEC 61375.

7
Basic Automobile Data Bus

Byte Flight - is an automotive data bus created by BMW and partners


Motorola, ELMOS Semiconductor and Infineon
CAN (Controller Area Network) an inexpensive low-speed serial bus for
interconnecting automotive components
D2B (Domestic Digital Bus) a high-speed multimedia interface, ring-
based fibre-optical communications technology, with a bandwidth of 12
Mbit/s for use in automotive applications. D2B is used by Mercedes
Benz in their vehicles.
FlexRay a general purpose high-speed protocol with safety-critical
features. It is designed to be faster and more reliable than CAN, but it is
also more expensive.
LIN (Local Interconnect Network)a very low cost in-vehicle sub-network.
MOST (Media Oriented Systems Transport) a high-speed multimedia
interface. The serial MOST bus uses a ring topology to transport audio,
video, voice and data signals via plastic optic fibre (POF)
8
Heavy Vehicles Automobile Data Bus

J1939 and ISO 11783– an adaptation of CAN for commercial (J1939)


and agricultural (ISO 11783) vehicles.

J1708 and J1587- SAE J1708 is a standard used for serial


communications between ECUs on a heavy duty vehicle and also
between a computer and the vehicle. Common higher layer protocols
that operate on top of J1708 are SAE J1587 and SAE J1922. The
protocol is maintained by SAE International. SAE J1708, although still
widely used, is replaced by SAE J1939 which is a CAN protocol.

Keyword Protocol 2000 (KWP2000) – a protocol for automotive


diagnostic devices (runs either on a serial line or over CAN).

VAN (Vehicle Area Network)- It is a serial protocol capable of speeds


up to 125 kbit/s and is standardised in ISO 11519-3.
9
Other Automobile Data Bus

SPI (Serial Peripheral Interface) bus is a synchronous serial


communication interface specification used for short distance
communication, primarily in embedded systems.
DC-BUS – Automotive power-line communication multiplexed
network. Yamar developed the unique DC-BUS power line technology
for economical multiplex power line communication networks. Many
devices can be attached to the power line that provides both power
and information.
IDB-1394 - IEEE 1394 was the High-Definition Audio-Video Network
Alliance (HANA) standard connection interface for A/V (audio/visual)
component communication and control.

10
IE BUS- (Inter Equipment Bus) is a two-wire vehicle bus used in the
automotive industry as a communications bus between various devices
(usually multimedia devices).

I2C- It is typically used for attaching lower-speed peripheral ICs to


processors and microcontrollers in short-distance, intra-board
communication. invented by Philips Semiconductors.

J1850 - Defines a serial data protocol. There are two variants-


10.4 kbit/s (single wire, VPW) and 41.6 kbit/s (two wire, PWM). Mainly
used by US manufacturers, also known as PCI

11
Introduction to CAN (Controller Area Network)
 CAN is a Vehicle Bus standard which is used to communicate with
various Electronic Devices like ECU, TCU, Light Control, etc.
 Protocols are basically two types:-
Address based protocol- The data packets contain the address
of the destination device for which the message is intended.
Message based protocol- In a message based protocol every
message is identified by a predefined unique ID rather than the
destination addresses.
 CAN is a message based protocol, originally designed for automobile
industry but now it has been used in various other industries.
 Development of CAN bus started at 1983 but officially released in
1986 by Robert Bosch.

12
Why CAN?

13
Reason
 Standard UART(RS232, RS422/RS485) did not support
multi domain communications but CAN facilitates it.

14
 Every electronic device
(also known as the
node) which needs to
communicate using the
CAN protocol is
connected with each
other via a common
serial bus to transmit
and receive messages.

 CAN does not follow the master-slave architecture which means every
nodes has the access to read and write data on the CAN bus.
 When the node is ready to send data, it checks availability of the bus
and writes a CAN frame onto the network.
 All nodes on CAN receive the CAN frame and depending on ID on the node
CAN decides whether to accept it or not. (Watsapp group or turning on TV
and watching different channels).

15
CAN Architecture
 CAN protocol uses the lower two layers of OSI(Open Systems
Interconnection) model.

Google chrome/ Firefox or Gmail/Outlook

Translating to machine language


(Operating System)
Establishes communication/creates session
between devices.

Error free message delivery and without


loss.
Logical addressing, default gateway , etc

Messages are packaged to frames.

Frames to bits/voltage levels (RS232,


Ethenet, etc)

16
 For data exchange to
happen among the
nodes they must have
the necessary
hardware and the
software embedded
inside them.

17
18
 Every node has a Host controller also known as microcontroller
which is a small and low cost computer .Host controller implements
application layer of OSI model.

 Microcontroller gathers information from other electronic control


units like braking, steering, power windows etc. to communicate with
other nodes and transfers it to CAN controller.

 CAN controller incorporate logical link control and MAC medium


access control of data link layer.

 LLC allows filtering of messages by using unique ID on each


message then MAC sub layer frames the message.

 Once, framing is done it is followed by arbitration, error detection


and acknowledgement that all comes under MAC sub layer of data
link.

 The frame is transferred to CAN transreceiver, for encoding and


decoding.
19
Available CAN Interface

20
NI CAN Classification
It can be classified based on cable impedance, max baud rate, signal levels, etc.
The main classification is as follows:-

Type Rate Other Names Used


High Speed/FD CAN 2 Wire, 1MBit/s, High CAN C and ISO ABS,ECU, Emission
Speed upto 8MBit/s 11898-2 systems, etc
Low Speed/Fault 2 Wire, 125kBit/s CAN B and ISO Light turn on based
Tolerant CAN 11898-3 on opening and
closing of door ,
Brake lights

Single wire CAN 33.3kBit/s , High SAE-J2411, CAN A, Mirror and seat
Speed upto 88.3 and GMLAN adjusters
kBit/s

Software selectable Flexibility to choose any of the above 3 transceiver types through
CAN software.

21
High Speed/FD CAN

 For high-speed/FD CAN, both ends of the pair of signal wires


(CAN_H and CAN_L) must be terminated.
 This is because communication flows both ways on the CAN
bus.
 If you place multiple devices along the cable, only the devices
on the ends of the cable need termination resistors.
 NI also offers terminated and non-terminated CAN cables for
connecting NI high-speed/FD CAN interfaces.
22
Low Speed/Fault Tolerant CAN

 For low-speed/fault-tolerant CAN, each device on the network


needs a termination resistor for each data line: R(RTH) for CAN_H
and R(RTL) for CAN_L.
 Unlike the high-speed CAN termination, low-speed CAN requires the
termination to be on the transceiver rather than on the cable.
 The resistance of each resistor is calculated through several
formulas.
 Only non-terminated CAN cables are to be used.
23
Single wire CAN

 Single-wire CAN is primarily found in low cost applications.


 NI interfaces featuring single-wire CAN transceivers include a built-in
9.09 kΩ resistor, so no additional resistors are needed.
 Single-wire CAN transceivers are available only on NI-
XNET software-selectable PCI and PXI interfaces.
 Use only nonterminated CAN cables.

24
Required items to communicate with LabVIEW

CAN Database files


NI CAN Drivers
NI X-Net Drivers for CAN,LIN & FlexRay

25
CAN Database Files
 CAN database files are text files that contain scaling information for
CAN frames and signal definitions.
 National Instruments NI-XNET database editor software recognizes
FIBEX database files (.xml), Vector database files (*.dbc), and
National Instruments CAN database files (*.ncd).
 CAN database files may contain frame and signal definitions for an
entire vehicle. Every network has its own unique database file.
Additionally, these database files are vendor-specific and usually
confidential.
 By using a database file for many frames on the CAN network, many
CAN APIs (like NI-XNET) can automatically convert the frame
information directly to a real-world value. This simplifies application
development because you never need to worry about the raw frame
values.

26
For each signal, CAN databases define rules for conversion to engineering units.
The following data is stored in databases:
 Channel name
 Location (start bit) and size (number of bits) of the channel within a given message
 Byte order (Intel/Motorola)
 Data type (signed, unsigned, and IEEE float)
 Scaling and units string
 Range
 Default value
 Comment
You can use this information to easily convert the "raw" frame information (usually bytes) to a
"real world" value.

27
NI Software Drivers
The NI-CAN driver provides high-level, easy-to-use functions to help
you develop entire CAN applications quickly, saving you both time
and money.

NI X-Net Drivers
The NI-XNET platform combines a series of high-performance CAN,
LIN, and FlexRay interfaces with the NI-XNET API, a common set of
easy-to-use functions for reading and writing CAN, LIN, and FlexRay
frames and signals.

28
Benefits of CAN
• Low cost
• Reliable Because of excellent error detection and error
handling mechanisms used by CAN, it offers high reliability
transmission.
• Flexibility CAN Nodes can be easily connected / disconnected.
Also, the number of nodes is not limited by the protocol.
• Good Speed CAN supports data rate of 1 MBit/s @ 40m bus
length.
• Multi-master communication Any node can access the bus
• Fault Confinement Faulty nodes do not disturb the
communication.
• Broadcast capability Messages can be sent to one /many/all
nodes.

29
SOURCES

Google – CAN Basics


Wikipedia
NI White Papers
Other CAN Basics Websites

30
THANK YOU

31

You might also like