Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views7 pages

AI Exp 7

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 7

Experiment no.

07
Aim: Study and implementation of Controller Area Network (CAN) in ECU .
Theory:

Mechanical parts in the modern vehicles are gradually being replaced by electronic
and software components. In order to reduce the amount of the required cables a number of
Electronic Control Units (ECUs) are connected together and form In-vehicle networks.
Depending on the criticality of the transferred messages, different networks exist. Among
them, the Control Area Network (CAN) is an event-triggered bus system. The components of
engine management system and the Anti-Lock Braking System (ABS) communicate through
this bus. CAN also provides remote diagnostic of electrical parts.
The new technology has brought an explosion of new functionality into the vehicle’s
world. As becoming more computerized, contemporary vehicles rely on a number of ECUs
that enable services and functionality in order to increase the driver’s comfort. The
interconnection of these ECUs and buses forms the in-vehicle network. These networks are
connected through gateways. In order to control different parts of a vehicle mechanism,
there exists three principal types of in-vehicle networks: CAN, LIN and MOST.

Due to different required


reliability, previous automobile
control networks were
configured to
use multiple bus lines. This
resulted in a huge wire harness.
Because of cost and weight
aspects,
the amount of wire harnesses
aimed to be reduced.
In order to build an efficient
network of ECUs and to have
expandable and error resistance
nodes, CAN-bus was
developed. This leaded to
reasonable costs, short latency
in the transmission
of the messages between units
and high data rates. The figure
below shows the reduction o
What is CAN?
Due to different required reliability, previous automobile control networks were
configured to use multiple bus lines. This resulted in a huge wire harness. Because of cost
and weight aspects, the amount of wire harnesses aimed to be reduced. In order to build an
efficient network of ECUs and to have expandable and error resistance nodes, CAN-bus was
developed. This leaded to reasonable costs, short latency in the transmission of the messages
between units and high data rates. The figure below shows the reduction of wiring in CAN
network.
Figure 1. CAN networks significantly reduce wiring.

CAN is a serial communication protocol that allows ECUs to communicate with


each other in a network. Processors are used in an automobile to make it safer, reliable, and
easier to maintain. This increases the need of communication. Using a serial bus, CAN
system sends and receives messages between the individual nodes (processors) in the
network. The nodes are independent which means that if one of them fails, the others nodes
in the vehicle will continue to work properly. A node that needs to transmit a message has to
wait until the bus is free. Each message has an identifier, and every message is broadcasted in
the network so that it is available to every other node in the network. Nodes only select those
messages that are relevant for them and ignore the rest.

CAN Benefits

1. Low-Cost, Lightweight Network

CAN provides an inexpensive, durable network that helps multiple CAN devices
communicate with one another. An advantage to this is that electronic control units (ECUs)
can have a single CAN interface rather than analog and digital inputs to every device in the
system. This decreases overall cost and weight in automobiles.  

2. Broadcast Communication

Each of the devices on the network has a CAN controller chip and is therefore
intelligent. All devices on the network see all transmitted messages. Each device can decide if
a message is relevant or if it should be filtered.  This structure allows modifications to CAN
networks with minimal impact.  Additional non-transmitting nodes can be added without
modification to the network.

3. Priority
Every message has a priority, so if two nodes try to send messages simultaneously,
the one with the higher priority gets transmitted and the one with the lower priority gets
postponed.  This arbitration is non-destructive and results in non-interrupted transmission of
the highest priority message.  This also allows networks to meet deterministic timing
constraints.

4. Error Capabilities

The CAN specification includes a Cyclic Redundancy Code (CRC) to perform error
checking on each frame's contents.  Frames with errors are disregarded by all nodes, and an
error frame can be transmitted to signal the error to the network.  Global and local errors are
differentiated by the controller, and if too many errors are detected, individual nodes can stop
transmitting errors or disconnect itself from the network completely.

CAN Physical Layers

CAN has several different physical layers you can use. These physical layers classify
certain aspects of the CAN network, such as electrical levels, signaling schemes, cable
impedance, maximum baud rates, and more. The most common and widely used
physical layers are described below:

1. High-Speed/FD CAN 

High-speed CAN is by far the most common physical layer. High-speed CAN
networks are implemented with two wires and allow communication at transfer rates
up to 1 Mbit/s. Other names for high-speed CAN include CAN C and ISO 11898-2.
Typical high-speed CAN devices include antilock brake systems, engine control
modules, and emissions systems.  CAN with Flexible Data-Rate (CAN FD) is the next
generation of high-speed CAN communication with evolving standards for higher
data rates.  NI has enabled speeds up to 8 Mbit/s using the TJA1041 and TJA1043
transceivers through the NI-XNET driver.  As transceiver vendors complete
qualifications for CAN FD speeds, NI will update our documentation as necessary.

2. Low-Speed/Fault-Tolerant CAN Hardware

Low-speed/fault-tolerant CAN networks are also implemented with two wires,


can communicate with devices at rates up to 125 kbit/s, and offer transceivers with
fault-tolerant capabilities. Other names for low-speed/fault-tolerant CAN include
CAN B and ISO 11898-3. Typical low-speed/fault-tolerant devices in an automobile
include comfort devices. Wires that have to pass through the door of a vehicle are
low-speed/fault-tolerant in light of the stress that is inherent to opening and closing
a door. Also, in situations where an advanced level of security is desired, such as with
brake lights, low-speed/fault-tolerant CAN offers a solution.

3. Single-Wire CAN Hardware

Single-wire CAN interfaces can communicate with devices at rates up to 33.3


kbit/s (88.3 kbit/s in high-speed mode). Other names for single-wire CAN include
SAE-J2411, CAN A, and GMLAN. Typical single-wire devices within an automobile do
not require high performance. Common applications include comfort devices such as
seat and mirror adjusters.

CAN Protocol Terminology

CAN devices send data across the CAN network in packets called frames. A CAN
frame consists of the following sections.

 CAN Frame -- an entire CAN transmission: arbitration ID, data bytes,


acknowledge bit, and so on. Frames also are referred to as messages.

Figure.  The standard CAN frame format.

 SOF (start-of-frame) bit – indicates the beginning of a message with a


dominant (logic 0) bit.

 Arbitration ID – identifies the message and indicates the message's priority.
Frames come in two formats -- standard, which uses an 11-bit arbitration
ID, and extended, which uses a 29-bit arbitration ID.

 IDE (identifier
extension) bit – allows differentiation between standard and
extended frames.
 RTR (remote transmission request) bit – serves to differentiate a remote
frame from a data frame. A dominant (logic 0) RTR bit indicates a data
frame. A recessive (logic 1) RTR bit indicates a remote frame.

 DLC (data length code) – indicates the number of bytes the data field
contains.

 Data Field – contains 0 to 8 bytes of data.

 CRC(cyclic redundancy check) – contains 15-bit cyclic redundancy check


code and a recessive delimiter bit. The CRC field is used for error detection.

 ACK (ACKnowledgement) slot – any CAN controller that correctly receives


the message sends an ACK bit at the end of the message. The transmitting
node checks for the presence of the ACK bit on the bus and reattempts
transmission if no acknowledge is detected. National Instruments Series 2
CAN interfaces have the capability of listen-only mode. Herein, the
transmission of an ACK bit by the monitoring hardware is suppressed to
prevent it from affecting the behavior of the bus.

 CAN Signal – an individual piece of data contained within the CAN frame data
field. You also can refer to CAN signals as channels. Because the data field
can contain up to 8 bytes of data, a single CAN frame can contain 0 to 64
individual signals (for 64 channels, they would all be binary).  

How CAN communication works?

As stated earlier, CAN is a peer-to-peer network. This means that there is


no master that controls when individual nodes have access to read and write data
on the CAN bus. When a CAN node is ready to transmit data, it checks to see if the
bus is busy and then simply writes a CAN frame onto the network. The CAN frames
that are transmitted do not contain addresses of either the transmitting node or
any of the intended receiving node(s). Instead, an arbitration ID that is unique
throughout the network labels the frame. All nodes on the CAN network receive
the CAN frame, and, depending on the arbitration ID of that transmitted frame,
each CAN node on the network decides whether to accept the frame.

If multiple nodes try to transmit a message onto the CAN bus at the same time,
the node with the highest priority (lowest arbitration ID) automatically gets bus
access. Lower-priority nodes must wait until the bus becomes available before
trying to transmit again. In this way, you can implement CAN networks to ensure
deterministic communication among CAN nodes.
Automotive Applications of CAN

CAN technology began to appear in automobiles in 2003 and virtually every car since 2008
utilizes CAN. It decreases the complexity of wiring, provides improvements to the weight of the car –
which is significant in the design formula cars – and makes diagnostics less cumbersome. The
average car nowadays has dozens of electronic modules for tasks such as cruise control or engine
RPM monitoring. There are four main classes of serial data bus speeds (A, B, C, and D), with D being
the fastest. The architecture of a car usually has multiple buses operating at different speeds, with
the fastest bus being dedicated to the most critical components. Figure below shows an example of
a typical CAN automobile layout in a car displaying control, data acquisition tools, and even more
advanced systems such as a Global Positioning System. In addition to basic control and monitoring
functions, there are numerous other aspects of automobiles where CAN is applied, especially in the
way of safety features. This includes optimization of fuel consumption by switching between gas
and/or electric power and in what proportions, as well as tire pressure monitoring or electric seat
belt tensioners. The uses of CAN even extend to cutting edge concepts such as regenerative braking,
driver assistance or predictive driving, and even driver EKG monitoring. There are countless other
uses in use and in development, and it will only continue to proliferate.

Figure 1: Example of the Controller Area Network Automobile Layout

Conclusion:

You might also like