CAN Bus Measurements
CAN is short for Controller Area Network. It is a serial digital bus used to connect different electronic control units found in motor vehicles. These electronic control units monitor thousands of embedded sensors in key components: engines, transmissions, anti-lock brakes, power steering, etc.
CAN bus is found in most modern cars, light trucks, off-highway, and heavy trucks. Some modern vehicles have up to 70 electronic control units. Signals are exchanged between the different components to help optimize fuel economy, ensure safe driving via traction control, etc.
When performing analog noise, vibration, or durability measurements, it is useful to also record the digitized signals of the embedded sensors present on the CAN bus simultaneously with other analog channels:
With each passing year, the CAN networks of modern vehicles grow in size, and more signals are broadcast.
This article covers:
History of CAN Bus
CAN bus was developed by Robert Bosch corporation during the 1980s. It was formally introduced at the Society of Automotive Engineers (SAE) Congress In February of 1986.
At that time, electronic controls of various components were becoming popular in motor vehicles. Before CAN bus, the communication between different electronic components in motor vehicles was carried over a wiring harness, as shown in Figure 1.
Every signal that was being passed back and forth required a dedicated wire and connectors. As electronic controls became more popular, wiring harnesses grew in size, with many wires carrying the signals. This was adding significant weight to vehicles, and also created reliability issues as the number of connections multiplied.
By switching from a wiring harness to CAN bus (Figure 2), the reliability of communication between electronic controllers was greatly improved: multiple digital signals shared a common wire, reducing the number of connectors and wires used in the electronic communications within vehicles.
Significant weight savings were also realized. In the late 80s, vehicles that switched from wiring harnesses to CAN bus communication had weight savings on the order of 110 lbs (50 kg) in subsequent models.
Performing CAN Bus Measurements
In many vehicles, there is an OnBoard Diagnostic (OBD) connector. This connector is used to read electronic error codes during vehicle maintenance. Quite often, the OBD connector is also connected to the CAN bus. Not only error codes can be read, but all the CAN signals as well.
When acquiring data over the CAN bus, a DBC file (*.dbc) is used to decode the signals. The DBC file (Figure 3) contains:
A DBC file is specific to particular vehicle model year and powertrain. It is an ASCII file that can be edited with tools like Notepad. An example of a DBC file’s content is shown in Figure 3.
On a typical motor vehicle, there are over 1000 signals broadcast on the CAN bus between the 70 or so Electronic Control Units. Examples of Electronic Control Units include Engine Control Modules (ECMs), Powertrain Control Modules (PCMs), and Transmission Control Modules (TCMs).
Instructions on how to acquire CAN bus signals with LMS Test.Lab measurements are included at the end of this article.
The function of CAN bus has also expanded since its inception. CAN bus is used in diagnostics, emissions management, and calibration of ECUs.
Legislated OBD Signals
Due to worldwide standards for emissions, there are several legislated signals that are available on most vehicles. These are accessible thru the On-Board Diagnostic (OBD) connection, the same connection that CAN bus signals are typically accessed over.
These legislated OBD signals differ from the CAN bus signals in the following ways:
To utilize the OBD diagnostic messages, see the Knowledge Base article “No more tach! Use OBD to get Engine and Vehicle Speed”.
CAN bus Calibration Protocol (CCP)
There are many embedded sensor signals that are not broadcast on CAN bus. Some signals are kept internal to particular electronic control unit as shown in Figure 4.
For example, consider a transmission. Some embedded sensor signals are broadcast, some signals are known only to the transmission:
Over a CAN bus connection, these internal only signals can be requested and recorded using the CAN bus Calibration Protocol (CCP). In this protocol, an ECU is addressed directly to read or write internal signals over the CAN bus. The address requests are on top of all the existing CAN bus traffic. If enough additional signals are requested, the bus could become overloaded. ISO 22000 contains documentation on how the CCP protocol works.
To request and access signals over CAN bus with the CCP protocol, an A2L (*.a2l) file is required. An A2L file is specific to model year, powertrain configuration, and electronic firmware version of the vehicle.
To utilize CCP with LMS Test.Lab, a gateway device is used to translate the CCP signals to standard CAN bus signals.
FlexRay and CAN FD
Flexray and CAN FD are both successors to the original CAN bus that was developed in the 1980s.
Flexray was developed starting in 2000. It was designed to be faster and more reliable than CAN bus, but is more expensive to incorporate in a vehicle design:
Flexray is supported by LMS Test.Lab and SCADAS. A specific Flexray input card is required for the SCADAS.
CAN FD is also a successor to CAN bus, started around 2012:
CAN bus in LMS Test.Lab
First connect the SCADAS to the CAN bus. All SCADAS units equipped with CAN bus have either a direct 9-pin connector or 9-pin adaptor cable as shown in Figure 5.
The SCADAS then needs to be connected to the vehicle via an Onboard Diagnostics (OBD) connector cable. The OBD connector is located beneath the dashboard on many vehicles. To connect to the 9 pin connector of the SCADAS, an OBD to 9 pin cable is needed. Cables and OBD location are pictured in Figure 6.
To acquire CAN bus based signals simultaneously with analog measurements, turn on “Vehicle Bus” add-in of LMS Test.Lab Signature as shown in Figure 7. The add-in menu is located under “Tools -> Add-ins” from the main LMS Test.Lab menu.
Go to the ‘Channel Setup’ worksheet. In the upper right corner, select ’CAN Settings’ from the drop down menu (Figure 8).
In the CAN settings menu, select a DBC file by clicking on the “DB Path” cell as shown in Figure 9. This makes the CAN channel information available inside of LMS Test.Lab for selection. Later, if the DBC file is changed or modified, it needs to be reselected thru the DB path menu.
After selecting the DBC file, change the baud rate, CAN device, and CAN Acknowledge mode (Figure 10).
The following should be selected:
Individual channels can be selected for viewing and recording from the CAN bus DBC file as shown in Figure 11.
To view and record individual CAN channels:
After pressing “Apply”, the CAN channels should be listed in the Channel Setup (Figure 12). Switch to the channel setup view by using the toggle in the upper right of the worksheet.
In the Channel setup mode, do the following:
In the ‘Measure’ worksheet, the CAN bus channels can be displayed while measuring as shown in Figure 13.
To display CAN bus data in the Measure worksheet:
Comparison of CAN and Analog Measurements
How does the RPM from CAN bus compare to an analog measured rpm? A comparison of a tachometer and CAN based rpm is shown in Figure 14.
Reading the engine rpm from CAN bus directly can save the time of instrumenting a tachometer.
Any CAN based signal can be used for tracking in LMS Test.Lab Signature. For example, an engine runup can be tracked versus the engine rpm from CAN as shown in Figure 15.
In the ‘Tracking Setup’ worksheet, set ‘Tracking Method’ to ‘Static’ to use the CAN bus channel for tracking rather than the tachometer.
Questions? Contact us!
CAN and its various evolutions started with industry consortiums, and then evolved into ISO standards: