AI Exp 7
AI Exp 7
AI Exp 7
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.
CAN Benefits
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 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.
CAN devices send data across the CAN network in packets called frames. A CAN
frame consists of the following sections.
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.
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).
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.
Conclusion: