How to Diagnose a Controller Area Network (CAN)

Apr 29, 2022 9:00:00 AM / by Gary Marrs posted in CAN networks, CAN protocol, CANbus, PCAN

0 Comments

In 1991, the Mercedes-Benz W140 was the first production vehicle to feature a CAN (Controller Area Network) based wiring system. By 2008 almost all passenger cars and light trucks sold in the U.S. used CAN bus networks.


CAN Bus

CAN-bus-intro-tutorial-controller-area-network

 courtesy of CSS Electronics

 

 

Before CAN bus gained popularity, vehicle wiring harnesses could contain miles of copper wire which significantly added to the cost and weight of the vehicle. CAN bus was originally designed to minimize copper wiring in automobiles by multiplexing electrical signals over a simple two wire network. By using a high-speed twisted pair cable, the amount of wire necessary to allow sensors, actuators and controllers to communicate was greatly reduced.

When people talk about CAN, there are really 2 main but distinct areas that make up a CAN bus network.

  • The lower-level CAN bus network
  • The CAN Protocol used to pass messages


The lower-level CAN bus

The lower-level CAN bus is a two-wire, half duplex, high-speed network system. The CAN standard defines the lower-level details (the physical layer) of the CAN bus. The physical layer is responsible for bit timing and synchronization, message framing, arbitration, acknowledgement, error detection and signaling, and fault confinement. 1

There are basically 2 versions of the CAN standard that cover the lower layers, CAN 2.0 and CAN FD.

CAN 2.0 was published in 1991. This specification has two parts (Referred to CAN 2.0A and 2.0B);

  • part A is for the standard format with an 11-bit identifier
  • part B is for the extended format with a 29-bit identifier

The CAN FD protocol was released in 2012 and increases the effective data-rate by allowing longer data fields (up to 64 bytes per frame compared to the 8 bytes of CAN 2.0).

Think of the lower layer of CAN bus as bits transmitted at defined speeds on the wire itself.

 

The CAN Protocols

While the CAN standard defines the physical layer a higher layer protocol is required to manage the communication messages on the CAN bus. The higher layer protocol handles details such as node addresses, flow control, fragmentation of data messages larger than 8-bytes, and establishment of communication among other things. Think of the higher layer protocol as the way the messages (data) are formatted, transmitted and received.

Currently, there are many higher layer protocols for the CAN bus. The most common ones are listed below:

CANopen - Industrial automation
  • IEC 61375-3-3 (use of CANopen in rail vehicles)
  • DeviceNet Industrial automation
  • EnergyBus - battery–charger communication
  • ISOBUS - Agriculture
  • NMEA 2000 - Marine industry
  • SAE J1939 - In-vehicle network for buses and trucks

All of these CAN protocols communicate over the CAN bus.

 

CAN Bus Diagnostics

Diagnosing CAN bus problems can be challenging. Even so, with a little practice you don’t have to be highly technical to perform basic diagnostics on a CAN bus network. Grid Connect sells a wide variety of tools from Peak Systems to help analyze and troubleshoot CAN networks.

 

Troubleshooting a CAN Bus network

Here are some of the most common CAN bus failures: 2

  • Device configuration settings
  • Missing termination resistors
  • CAN Hi and CAN Low wired backwards
  • Damaged CAN port due to lightning or welding

It is possible to manually troubleshoot the lower-level CAN bus. This can be done using a little vigilance and a multimeter to test and verify. All modules on a CAN bus network need four things to function properly: power, ground, a CAN data connection, and a proper device configuration.

Here are some simple things to investigate:

  • Check the CAN Device configuration. Make sure the baud rate of the CAN communications is the same as all other devices on the CAN bus.
  • Check the CAN bus termination resistance. A CAN bus has to be terminated on both ends with a 120-ohm resistor to prevent reflections from interfering with the data transmissions. In some cases, the termination resistor may be located inside the CAN device.
    • Turn Power off
    • Measure resistance between CAN Hi and CAN Low. Should be around 60 ohms.

  • Check the CAN bus voltages and ground connection.
    • Disconnect all CAN devices from the CAN bus except for the device being tested.
    • Power on the CAN device to be tested.
    • Measure voltage between CAN HI and Ground. The voltage should be between 2.5 and 3.0Vdc.
    • Measure voltage between CAN LOW and Ground. The voltage should be between 2.5 and 2.0Vdc

  • Check / Verify ground connection
    • Turn Power off
    • With the meter on the lowest resistance scale, measure the ground wire to earth ground. The meter should read less than the minimum 0.1 ohm that most meters can read.

  • CAN Transceiver Resistance Test – you can test the CAN port on a device to see if it is damaged by measuring resistance to ground. Damage from lightning or transients typically causes a short to ground on one or both CAN lines.
    • To test, disconnect the device (under test) from the CAN bus.
    • Make sure power is off to the CAN device under test.
    • Measure resistance from CAN HI to Ground and from CAN LOW to Ground. The result should be Mega ohms or open. If it is lower than this range, the CAN transceiver is probably faulty.


Troubleshooting the CAN Protocol

For troubleshooting the CAN protocol and communication message issues it gets more complicated. There are software and diagnostic tools that range from free software with basic functionality to expensive tools that provide very detailed data and analysis.

To start out, a simple solution is to use a USB to CAN bus adapter to connect to the bus and Windows based software tool to monitor CAN traffic. In this example, we use the Peak System PCAN-USB adapter with their free Windows software for displaying CAN and CAN FD messages (called PCAN-View). 3

pcan usb diag 2

 

pcan view1

 

pcan view2

 

For this example, we use the following equipment and devices.

  • Laptop running PCAN View (free download)
  • PCAN-USB adapter to connect to and monitor a CAN bus network
  • At least one CAN device talking on a CAN bus Network, in this example we used an Arduino board with a CAN-BUS Shield V2 from Seeed Studios. (Recommended that CAN bus be terminated with 120-ohm resistors on each end).

The PCAN-USB plugs into a USB port on the laptop. You need to download and install the USB driver from Peak. 

One minor limitation of this method is that the data rate of the CAN network must be known and the PCAN-USB has to be configured with this information. The Peak PCAN-Diag 2 can be used to determine the data rate on the CAN bus. (see below for an overview of the PCAN-Diag 2)

To start the connection to the CAN bus, click on the link icon in the top left of the window. 

PCAN view 7

This will bring up the configuration page.

 

PCAN view 4

 

 

To set the CAN bus data rate, click on the dropdown box and select the correct bit rate. In this case, we selected 125 kbps.

 

PCAN view 5

Then select the OK button. You should start to see packets arriving.

 

PCAN view 6

Here, we are seeing some packets from CAN ID 0x01. With PCAN-View there is quite a lot of functionality that can assist with monitoring and troubleshooting a CAN Bus. Here are some of its monitoring and diagnostic capabilities:

  • Displays all received CAN messages with ID, Data Length, and data bytes in a list.
  • Data messages or Remote Request frames can be transmitted on the CAN bus. These messages can either be transmitted manually, automatically in fixed time intervals, or as answers to received Remote Request frames.
  • Error Frames on the CAN bus are detected and shown.
  • Contains a Tracer (data logger) that can be used to record and store the data communications on a CAN bus.

 

 

download full CAN Diagnostics Guide

 

Handheld CAN Bus Diagnostics Unit

For more powerful trouble shooting there are hand held units that provide a lot more information that is very helpful when diagnosing a problem on the CAN bus. 

 

PCAN-Diag2_Catalog2011-1 PCAN-MiniDiag FD_Banner PCAN-Diag-FD_Manual-Title
PCAN DIAG 2 - Handheld Diagnostic Tool

SKU :  GC-CAN-DIAG2
MPN :  IPEH-002069-V2

PCAN MiniDIAG FD - Handheld Diagnostic Tool 

SKU : GC-CAN-MINIDIAG-FD
MPN : IPEH-003070

PCAN DIAG FD - Handheld Diagnostic Tool for CAN FD Networks

SKU : GC-CAN-DIAG-FD
MPN : IPEH-003069

 

An integrated handheld CAN diagnostics unit can provide a wide range of functions to allow investigation of a CAN bus, such as:

  • Auto detection of the CAN bit rate
  • Bus load measurements displayed by a time diagram, including a switchable display of error frames

Diag screen 1

  • The termination resistance measurement even while the system is running. Also measures Voltage for all pins on the CAN Bus (connected to handheld unit)
  • Receives and displays the CAN messages on the network

Diag screen 2

  • Send / transmit either individual messages or entire sequences of them to the network. In addition, the internal memory card allows tracing and playback of the CAN traffic.
  • The integrated two-channel oscilloscope enables visualization of CAN signals.

Diag screen 3

 

  • The CAN frames can be decoded from the recorded packets to help detect errors in the frame.

One of the biggest benefits of a handheld tool is that it can analyze the CAN bus network at both the lower-level physical layer as well as the protocol level. This saves time and helps to get to the source of the error quickly.

 

 

Download PDF version

 

 

Download CAN Diagnostics Guide

Reference

  1.   Wikipedia, https://en.wikipedia.org/wiki/CAN_bus#Data_transmission
  2.   CAN BUS Troubleshooting Guide (with Video), Enovation Controls. https://support.enovationcontrols.com/hc/en-us/articles/360038856494-CAN-BUS-Troubleshooting-Guide-with-Video-
  3.   Peak System PCAN-View softwarehttps://www.peak-system.com/PCAN-View.242.0.html?&L=1
  4.   Peak System PCAN-USB module, https://www.gridconnect.com/products/can-usb-adapter-pcan-usb
Read More

CAN FD product launches and roadmaps

Mar 1, 2016 12:52:26 PM / by Brittney Borowicz posted in CAN, CAN FD, Cypress, Flexible Data Rate, General, Microchip, networks, PCAN, PCAN USB, PCAN USB FD adapter, PEAK, Renesas

0 Comments

CAN FD (Flexible Data-rate) is becoming a more prominent feature in many new and upcoming products. STMicroelectronics created a CAN FD starter kit and there was better performance in terms of screen content and speed in comparison to the classical CAN. In addition to this, Cypress, Microchip, and Renesas have also created operational CAN FD networks. The demand for micro-controllers with on-chip CAN FD modules is high; they are currently in development and should be available in about a year. Peak has developed CAN FD interface units, which include PCAN-USB FD adapter. Grid Connect has made a deal with Peak to distribute the CAN FD interface units in the USA. Grid Connect has joined Peak in being one of the early adapters to utilize CAN FD.

Read more: http://can-newsletter.org/hardware/semiconductors/160301_can-fd-product-launches-and-roadmap-annoucements/

Read More

Candid about our CANbus Solutions

May 4, 2015 3:08:29 PM / by Brittney Borowicz posted in CAN, CAN Adapter, CAN Interface Adapter, CANbus, DeviceNet, DeviceNet Detective, General, Grid Connect, I/O modules, PCAN, PCAN Diag 2, PCAN Hardware, PCAN Software, PCAN USB, Products, troubleshoot

0 Comments

PCAN

Grid Connect provides deep technical expertise in CANbus solutions. We offer the industry leading PCAN USB Adapter as well as a wide selection of other PCAN products.

CAN Adapters
Whether you are need a CAN interface for USB, RS232, PCI, PC/104, PCI-Express and many more. Grid Connect has the CAN Adapter to meet your needs.

PCAN Software
Own a Peak-System CAN USB or other CAN Interface Adapter (PCI, PC/104, Dongle, etc)? We provide a complete offering of PCAN Software to compliment your PCAN Hardware.

PCAN Explorer 5 is the industry-leading solution for monitoring CANBUS traffic.

Looking to develop software for PCAN Hardware? We have both free and premium PCAN developer software packages.

Interested in a 30 day trial of PCAN Explorer 5? Request a Trial Here!

Diagnostic Tools
Check out our newest diagnostic tool, DeviceNet Detective 2. A must have for any DeviceNet network.

Grid Connect has the CAN Diagnostic Tools to help you troubleshoot your CANBUS issues. We offer the PCAN Diag 2, an invaluable handheld diagnostic tool as well as other hardware and software solutions for investigating your CANbus.

PCAN Cables & Terminators
Need a CAN cable, converter or terminator? Grid Connect keeps all your CAN accessory needs in stock and ready to ship!

PCAN I/O Modules
Grid Connect provides a complete line of CAN I/O Modules to meet your application requirements. These fully programmable I/O modules allow for a wide variety of configuration options for a powerful and cost effective solution.

For more information and to view all CAN products designed to fit your needs, click here or call the Grid Connect office at +1 (630) 245-1445.

Read More

Subscribe to Email Updates

Lists by Topic

see all