Marcio Cunha

How to Diagnose CAN Bus Faults with an Oscilloscope

Learn how to use oscilloscopes and protocol analyzers to identify framing errors, collisions, and signal reflections in embedded CAN networks.

Marcio Cunha•5 min
Also available in:PortuguêsEspañol
Summary
  • CAN networks require precise resistive termination at both ends to prevent destructive signal reflections.
  • Framing errors and bit stuffing corrupt the bus when electrical noise exceeds the noise immunity margin.
  • The oscilloscope reveals physical waveform distortions while the protocol analyzer decodes logical traffic.
  • Short circuits on CAN_H and CAN_L pins paralyze communication and trigger excessive retransmission loops.
  • Proper isolation and shielded cabling prevent data corruption in noisy industrial environments.

How the CAN Bus Works in Practice

The Controller Area Network bus, commonly known as the CAN network, serves as the central nervous system for modern vehicles, agricultural machinery, and industrial equipment. In practice, it operates like a group conversation where multiple devices share a single pair of wires to exchange critical commands without a central coordinator. When something goes wrong in this conversation, sensors stop responding and electronic control units enter fail-safe modes. To investigate these issues on the workbench, we must look beyond the code and examine the electricity flowing through the conductors.

Communication relies on differential signals across two wires named CAN_H and CAN_L. The dominant logical state occurs when the circuit drives a differential voltage of about two volts, while the recessive state leaves the voltage resting near zero. This differential logic ensures that external electromagnetic interference affects both wires equally, canceling out noise at the destination. However, if there are flaws in the physical topology or cabling, the system suffers collapses that are hard to trace using ordinary diagnostic software alone. Before inspecting signals, it is worth remembering the importance of keeping linear power supplies properly shielded against electromagnetic noise, as noisy supplies directly undermine CAN transceiver stability.

When a message is corrupted, the node detecting the error immediately transmits an error frame onto the bus, forcing all other devices to discard that packet. If a single node develops an internal fault, it can monopolize the bus with continuous error flags, crashing the entire network. This chaotic scenario is precisely where the oscilloscope and protocol analyzer become indispensable investigation tools. While software only shows that a message failed, hardware reveals the exact physical reason behind the failure.

Setting Up the Oscilloscope to Capture CAN Signals

Configuring an oscilloscope to capture CAN buses requires careful attention to channels and probes. Because signals are differential, the best approach is to use a dedicated differential probe or use two standard channels subtracting the CAN_H signal from the CAN_L signal mathematically. In practice, this means you will visualize the rising and falling edges of the square wave representing data bits traveling at hundreds of kilobits per second.

The first critical parameter to adjust is the sampling rate and time base. If the network operates at five hundred kilobits per second, each bit lasts two microseconds. The oscilloscope must collect enough points per bit to display clean rising and falling edges without aliasing or distortions caused by insufficient bandwidth. Additionally, triggering should be configured to capture specific error frames or transmission starts, preventing the screen from getting cluttered with irrelevant data during extended monitoring.

When connecting probes, verify that the workbench grounding does not create ground loops that introduce ghost noise into the readings. In industrial or automotive environments connected to variable frequency drives and heavy motors, proper galvanic isolation protects both the measurement equipment and the operator. With the screen displaying sharp waveforms, we can move on to identifying the most common physical defects affecting signal integrity.

Identifying Signal Reflections and Termination Issues

One of the most recurring physical faults in CAN networks is the absence or incorrect sizing of termination resistors. The bus requires exactly two one-hundred-and-twenty-ohm resistors, one at each physical end of the cable, to absorb the energy of electrical pulses and prevent them from bouncing back as echoes. In practice, if you connect the oscilloscope and notice sharp ringing, exaggerated overshoot, or deformed bit edges, there is a strong chance the signal is suffering from reflections due to impedance mismatch.

When signals reflect off cable ends due to improper termination, they mix with newly transmitted bits, altering the voltage levels that receivers see. This confuses the decision circuit, causing recessive bits to be randomly interpreted as dominant. The practical result is intermittent errors that seem to vanish when the vehicle or machine is stationary, but reappear under vibration or temperature variations in the wiring harness.

To fix this issue, use a multimeter with the network powered down to measure resistance between CAN_H and CAN_L, which should read approximately sixty ohms. If the reading shows one hundred twenty ohms, a resistor is missing; if it shows under forty ohms, there are extra resistors or partial shorts in the line. Fine-tuning with the oscilloscope will confirm the disappearance of reflections after physically correcting the terminators.

Detecting Collisions, Framing Errors, and Bit Stuffing

Beyond physical signal problems, CAN networks face protocol faults that affect node synchronization. The CAN arbitration mechanism ensures higher-priority messages go first, but framing errors occur when the fixed bit pattern required by the protocol is violated by external interference or clock drift in microcontrollers. On the oscilloscope, a framing error often appears as a violation in the polarity or timing of a frame's final bits.

Another fundamental concept is bit stuffing, a technique where the transmitter inserts an extra bit of opposite polarity whenever five consecutive identical bits appear, ensuring receivers maintain internal clock synchronization. If severe noise hits the bus, the stuffing mechanism can fail, generating errors that disrupt communication for that specific device. Using a logical protocol analyzer simultaneously helps translate these corrupted packets into readable messages on a computer screen.

The analyzer deconstructs the frame into identifier, data, and CRC, pinpointing exactly which byte failed the cyclic redundancy check. By cross-referencing the logical data from the analyzer with the analog waveform from the oscilloscope, the engineer discovers whether the error originated from an external electrical noise spike or an internal transmission firmware issue in the embedded device.

Final Thoughts on Bus Diagnostics

Diagnosing faults in CAN networks requires a methodical approach that unites the analog electronics of the oscilloscope with digital protocol analysis. Understanding the interaction between physical waveforms and logical packet structures prevents the unnecessary replacement of electronic control units and drastically reduces downtime for machinery and vehicles. With practice and proper tools, any engineer or technician can isolate noise, reflections, and framing errors with surgical precision.

Keeping network topology documentation up to date and performing preventive maintenance on cables and connectors ensures the longevity and reliability of critical embedded systems. Investing time in correctly interpreting differential signals turns a complex, invisible problem into a clear and solvable diagnosis on the test bench.