CAN Bus Explained - A Simple Intro (2023) - CSS Electronics
CAN Bus Explained - A Simple Intro (2023) - CSS Electronics
Products Software
Case Studies Docs
Guides Contact
▶a simple intro to
CAN
Need a simple, practical intro to CAN bus?
In this tutorial we explain the Controller Area Network (CAN bus) 'for dummies' incl.
message interpretation, CAN logging - and the link to OBD2, J1939 and CANopen.
Read on to learn why this has become the #1 guide on CAN bus.
You can also view our CAN protocol intro above or get the PDF.
In this article
1. What is CAN bus?
2. Top 4 benefits of the CAN protocol
3. CAN history & future
4. What is a CAN frame?
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 1/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Download as PDF
CAN High
CAN Low
The Controller Area Network (CAN bus) is the nervous system, enabling
communication.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 2/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
In turn, 'nodes' or 'electronic control units' (ECUs) are like parts of the body,
interconnected via the CAN bus. Information sensed by one part can be shared with
another.
So what is an ECU?
In an automotive CAN bus system, ECUs can e.g. be the engine control unit, airbags,
audio system etc. A modern car may have up to 70 ECUs - and each of them may
have information that needs to be shared with other parts of the network.
CAN Low
CAN High
The CAN bus system enables each ECU to communicate with all other ECUs - without
complex dedicated wiring.
Specifically, an ECU can prepare and broadcast information (e.g. sensor data) via the
CAN bus (consisting of two wires, CAN low and CAN high). The broadcasted data is
accepted by all other ECUs on the CAN network - and each ECU can then check the
data and decide whether to receive or ignore it.
The CAN bus physical layer defines things like cable types, electrical signal levels, node
requirements, cable impedance etc. For example, ISO 11898-2 dictates a number of
things, including below:
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 3/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Baud rate: CAN nodes must be connected via a two wire bus with baud rates up to 1
Mbit/s (Classical CAN) or 5 Mbit/s (CAN FD)
Cable length: Maximal CAN cable lengths should be between 500 meters (125 kbit/s)
and 40 meters (1 Mbit/s)
Termination: The CAN bus must be properly terminated using a 120 Ohms CAN bus
termination resistor at each end of the bus
Application
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 4/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Easy access
The CAN bus provides 'one point-of-entry' to communicate with all network ECUs -
enabling central diagnostics, data logging and configuration
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 5/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Extremely robust
The system is robust towards electric disturbances and electromagnetic interference
- ideal for safety critical applications (e.g. vehicles)
Efficient
CAN frames are prioritized by ID so that top priority data gets immediate bus access,
without causing interruption of other frames or CAN errors
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 6/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
1991: Bosch published CAN 2.0 (CAN 2.0A: 11 bit, 2.0B: 29 bit)
1993: CAN is adopted as international standard (ISO 11898)
2003: ISO 11898 becomes a standard series
2012: Bosch released the CAN FD 1.0 (flexible data rate)
2015: The CAN FD protocol is standardized (ISO 11898-1)
2016: The physical CAN layer for data-rates up to 5 Mbit/s standardized in ISO
11898-2
Today, CAN is standard in automotives (cars, trucks, buses, tractors, ...), ships,
planes, EV batteries, machinery and more.
CAN ISO
11898 CAN FD ISO
11898-1 CAN XL
1986 1993 2015 2018
Bosch publishes CAN 2.0 Separation of data link Physical CAN layer for
(CAN 2.0A, CAN2.0B) and physical layer data-rates up to 5 Mbit/s
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 7/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
In particular, the rise in connected vehicles (V2X) and cloud will lead to a rapid
growth in vehicle telematics and IoT CAN loggers.
In turn, bringing the CAN bus network 'online' also exposes vehicles to security risks
- and may require a shift to new CAN protocols like CAN FD.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 8/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Below is a standard CAN frame with 11 bits identifier (CAN 2.0A), which is the type
used in most cars. The extended 29-bit identifier frame (CAN 2.0B) is identical except
the longer ID. It is e.g. used in the J1939 protocol for heavy-duty vehicles.
Note that the CAN ID and Data are highlighted - these are important when recording
CAN bus data, as we'll see below.
1 11 1 6 0-64 16 2 7
#bits
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 9/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
OBD2 data from cars can e.g. be used to reduce fuel costs, improve driving, test
prototype parts and insurance
obd2 logging →
j1939 telematics →
Predictive maintenance
Vehicles and machinery can be monitored via IoT CAN loggers in the cloud to predict
and avoid breakdowns
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 10/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
predictive maintenance →
Vehicle/machine blackbox
A CAN logger can serve as a 'blackbox' for vehicles or equipment, providing data for
e.g. disputes or diagnostics
Do you have a CAN logging use case? Reach out for free sparring!
contact us →
To record CAN data you need a CAN logger. This lets you log timestamped CAN data
to an SD card. In some cases, you need a CAN interface to stream data to a PC - e.g.
for car hacking.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 11/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
Further, the CANedge2 (WiFi) and CANedge3 (3G/4G) let you push data to your own
server - and update devices over-the-air.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 12/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
To interpret it, you need to decode the CAN frames into scaled engineering values
aka physical values (km/h, degC, ...).
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 13/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
For example, the CAN standard does not specify how to handle messages larger than 8
bytes - or how to decode the raw data. Therefore a set of standardized protocols exist
to further specify how data is communicated between CAN nodes of a given network.
Some of the most common standards include SAE J1939, OBD2 and CANopen. Further,
these higher-layer protocols will increasingly be based on the 'next generation' of CAN,
CAN FD (e.g. CANopen FD and J1939-17/22).
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 14/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
a simple intro to
J1939
SAE J1939
J1939 is the standard in-vehicle network for heavy-duty vehicles (e.g. trucks & buses).
J1939 parameters (e.g. RPM, speed, ...) are identified by a suspect parameter number
(SPN), which are grouped in parameter groups identified by a PG number (PGN).
j1939 intro →
j1939 telematics →
a simple intro to
OBD2
OBD2
On-board diagnostics (OBD, ISO 15765) is a self-diagnostic and reporting capability
that e.g. mechanics use to identify car issues. OBD2 specifies diagnostic trouble
codes (DTCs) and real-time data (e.g. speed, RPM), which can be recorded via OBD2
loggers.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 15/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
obd2 intro →
obd2 logging →
a simple intro to
CANopen
CANopen
CANopen is used widely in embedded control applications, incl. e.g. industrial
automation. It is based on CAN, meaning that a CAN bus data logger is also able to
log CANopen data. This is key in e.g. machine diagnostics or optimizing production.
canopen intro →
canopen logger →
a simple intro to
CAN FD
CAN FD
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 16/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
CAN bus with flexible data-rate (CAN FD) is an extension of the Classical CAN data
link layer. It increases the payload from 8 to 64 bytes and allows for a higher data bit
rate, dependent on the CAN transceiver. This enables increasingly data-intensive use
cases like EVs.
can fd intro →
can fd logger →
For more intros, see our guides section - or download the 'Ultimate Guide' PDF.
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 17/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
J1939
logger
CANedge
OBD2
logger
CANedge/CLX000
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 18/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
CANopen
logger
CANedge
Contact
[email protected]
+45 91 25 25 63
Terms of Service
Returns and Refunds
Privacy Policy
About Us
Newsletter
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 19/20
8/27/23, 10:26 PM CAN Bus Explained - A Simple Intro [2023] – CSS Electronics
https://www.csselectronics.com/pages/can-bus-simple-intro-tutorial 20/20