How to use an oscilloscope to detect signals on the CAN bus

Publisher:幸福之路Latest update time:2024-11-13 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

CAN bus (Controller Area Network) is a communication protocol used in the automotive and industrial fields, and is widely used for data exchange between various electronic control units (ECUs). An oscilloscope is an electronic measuring instrument used to observe and analyze voltage waveforms. This article will detail how to use an oscilloscope to detect signals on the CAN bus.

  1. introduction

CAN bus is a multi-master communication protocol with high real-time performance and reliability. In the automotive and industrial fields, CAN bus is widely used for data exchange between various electronic control units. Oscilloscope is an electronic measuring instrument used to observe and analyze voltage waveforms. By using an oscilloscope to detect signals on the CAN bus, fault diagnosis and performance analysis of the CAN bus can be performed.

  1. Basic principles of CAN bus

2.1 CAN bus communication principle

CAN bus communication uses a time-based multi-master communication mechanism. Each node can send data at the same time, but only one node can successfully send at the same time. CAN bus uses a non-destructive arbitration mechanism, that is, when a conflict occurs, the node with a lower priority will actively stop sending, allowing the node with a higher priority to continue sending.

2.2 CAN bus data frame structure

The CAN bus data frame includes frame start, arbitration field, control field, data field, CRC check field, response field and frame end. Among them, the arbitration field is used to determine the priority of the transmitted data, the control field includes the data length and the remote transmission request flag, the data field is used to transmit the actual data, and the CRC check field is used for data verification.

  1. Oscilloscope Basics

3.1 Oscilloscope Function

An oscilloscope is an electronic measuring instrument used to observe and analyze voltage waveforms. An oscilloscope can display a waveform graph of voltage changes over time, helping engineers analyze circuit performance and failures.

3.2 Main parameters of oscilloscope

The main parameters of an oscilloscope include bandwidth, sampling rate, memory depth and trigger mode. Bandwidth determines the highest frequency that the oscilloscope can measure, sampling rate determines the number of samples that the oscilloscope can collect per second, memory depth determines the number of samples that the oscilloscope can store, and trigger mode determines when the oscilloscope starts collecting data.

  1. Prepare tools and equipment

4.1 Oscilloscope

Select an oscilloscope with sufficient bandwidth and sampling rate to meet the measurement needs of the CAN bus signal.

4.2 Probe

Choose a probe suitable for measuring CAN bus signals, such as a differential probe or a high-impedance probe.

4.3 Terminal resistance

Connect a 120Ω terminal resistor at both ends of the CAN bus to reduce signal reflection.

4.4 Signal Source

Prepare a CAN bus signal source to generate a test signal.

  1. Oscilloscope Setup

5.1 Channel Settings

Connect the probe to Channel 1 and Channel 2 of the oscilloscope to measure the differential signal of the CAN bus.

5.2 Vertical Settings

According to the voltage range of the CAN bus signal, adjust the vertical scale of the oscilloscope to cover the peak and valley values ​​of the signal.

5.3 Horizontal Settings

Depending on the baud rate of the CAN bus signal, adjust the horizontal scale of the oscilloscope so that it covers one or more data frames.

5.4 Trigger Settings

Set the trigger mode of the oscilloscope to edge trigger, and the trigger level to near the middle level of the CAN bus signal.

  1. Measuring CAN bus signals

6.1 Observe the signal waveform

Turn on the signal source and observe the CAN bus signal waveform displayed on the oscilloscope. Pay attention to the start, arbitration, control, data, CRC check and end of the signal.

6.2 Analyzing signal quality

Check the integrity and stability of the signal, and analyze signal parameters such as amplitude, phase and frequency.

6.3 Measurement signal parameters

Use the measurement function of the oscilloscope to measure parameters such as voltage, time, frequency, and period of the CAN bus signal.

  1. Troubleshooting

7.1 Signal Loss

If no CAN bus signal is displayed on the oscilloscope, there may be a signal source failure, a probe connection problem, or a CAN bus failure.

7.2 Signal Interference

If the signal waveform is abnormal, it may be due to electromagnetic interference or poor contact of the signal line.

7.3 Signal Delay

If the start and end times of the signal are not as expected, the signal line may be too long or the terminal resistor may be faulty.

  1. Performance Analysis

8.1 Baud rate test

By changing the baud rate of the CAN bus and observing the changes in the signal waveform, the performance of the CAN bus can be analyzed.

8.2 Load Testing

By increasing the number of nodes on the CAN bus, observe the changes in signal waveform and communication performance.

8.3 Error rate test

By simulating error conditions on the CAN bus, such as signal interference, signal loss, etc., the fault tolerance of the CAN bus is analyzed.

  1. in conclusion

By using an oscilloscope to detect the signals on the CAN bus, fault diagnosis and performance analysis of the CAN bus can be performed.


Reference address:How to use an oscilloscope to detect signals on the CAN bus

Previous article:What are the fault waveforms of the CAN bus?
Next article:What are the common faults of CAN bus?

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号