Dyethin
Cart Box
Member Centre

로그인

안녕하세요, Dyethin에 오신 것을 환영합니다

Member Centre 내 프로필 주문 상태 & 이력 문의 주소 관리
Table of Contents
Table of Contents

What is CAN bus? How to apply it?

September 29, 2023

CAN bus

What is CAN?

There are many ways to classify buses, such as external and internal buses, system buses and non-system buses, etc. No matter what they are, they are called "BUS" in English, which means "bus", which means that a bus is just like a bus. As long as you are on the running route of the bus, you can get on the bus. The boarding point is the bus stop. The same bus is connected and a node (device) is added. The node connection can put the data on the bus and transmit it to other nodes.


CAN bus working principle


The CAN bus is a broadcast type bus. This means that all nodes can listen to all transmitted messages. Messages cannot be sent individually to a given node; all nodes will always capture all messages. However, CAN hardware can provide local filtering functions, allowing each node to respond selectively to messages.


         Since the 1980s, there have been more and more automotive ECUs, such as ABS, electronically controlled doors and windows, and electronic fuel injection devices. If the conventional point-to-point wiring method is still used, that is, one end of the wire is connected to the switch and the other end is connected to the electrical equipment, it will lead to a sharp increase in the number of wires on the vehicle, resulting in redundant wiring harnesses and increased maintenance costs. This puts forward higher requirements for the wiring harness distribution and information communication of automobiles. Bus technology can realize real-time sharing of information and solve the problems of many wire bundles, difficult wiring, and high cost in traditional wiring methods. CAN (Controller Area Network) bus technology came into being.


Introduction to CAN bus

         The CAN bus was developed by BOSCH, a German company famous for R&D and produc

tion of automotive electronic products, and eventually became an international standard (ISO11519). It is one of the most widely used field buses in the world. The CAN bus is a multi-master bus system. Traditional bus systems such as USB or Ethernet realize the transmission of large amounts of data from node A to node B under the coordination of a bus controller. The messages of the CAN network are broadcast, that is, the data detected by all nodes on the network at the same time is consistent. It is a serial communication bus based on the message broadcast mode.


CAN bus application


The many advantages of the CAN bus have made it widely used, such as transmission speed up to 1Mbps, communication distance up to 10km, lossless bit arbitration mechanism, and multi-master structure.


CAN bus standard

The CAN bus standard stipulates the physical layer and data link layer, and the application layer needs to be customized by the user. Different CAN standards only differ in the physical layer. Physical layer and data link layer: ISO11898; Application layer: Different application fields use different application layer standards.


CAN physical layer

data link layer


CAN physical layer

CAN topology network

The device connected to the CAN bus is called a node device (CAN Node), and the topology of the CAN network is generally linear. The most commonly used wire harness is a twisted pair, and symmetrical differential level signals are transmitted on the wire. The figure below is a schematic diagram of the CAN bus network. The nodes mainly include Host, controller and transceiver. The Host is often integrated with a CAN controller, which is responsible for processing protocol-related functions to reduce the burden on the Host. CAN transceivers connect the controller to the transmission medium. Usually the controller and bus transceiver are isolated by optocoupler or magnetic coupling, so that even if overvoltage on the bus damages the transceiver, the controller and Host device can be protected.


When sending data, the CAN controller sends the binary code to be sent to the CAN transceiver through the CAN_Tx line, and then the transceiver converts this ordinary logic level signal into a differential signal, which is output to the CAN bus through the differential lines CAN_High and CAN_Low. network. The process of receiving data is the opposite. Using differential signals can achieve better electromagnetic compatibility results. Therefore, the CAN bus physical transmission medium only requires two wires.


CAN bus physical transmission medium


The maximum signal transmission rate of the high-speed CAN bus is 1Mbps and supports the longest distance of 40m. ISO11898-2 requires the installation of terminating resistors RL on both sections of the high-speed CAN bus (the terminating resistor is generally 120Ω, because the characteristic impedance of the cable is 120Ω, in order to simulate an infinite transmission line.) to eliminate reflections. The maximum speed of low-speed CAN is only 125Kbps, so ISO11898-3 has no termination requirements.


P6


Because the greater the transmission distance, the greater the signal delay. In order to ensure the correct sampling of messages, the signal rate on the bus must also decrease accordingly. The figure below shows the recommended relationship between signal rate and distance.


Relationship between signal rate and distance

CAN transceiver

The CAN bus is divided into high-speed CAN and low-speed CAN, and the transceiver is also divided into high-speed CAN transceiver (1Mbps) and low-speed CAN transceiver (125Kbps). Low-speed CAN is also called Fault


Tolerance CAN means that even if one line on the bus fails, the bus can still communicate. Just like the MAX3232 in the serial port is used for level conversion, the role of the CAN transceiver is to convert logic signals into differential signals.


CAN transceiver


Differential signals

         The CAN bus uses differential signal transmission, and usually only two signal lines are needed for normal communication. In differential signals, logic 0 and logic 1 are represented by the voltage difference between two differential signal lines. When it is at logic 1, when the voltage difference between CAN_High and CAN_Low is less than 0.5V, it is called the recessive level (Recessive); when it is at logic 0, the voltage difference between CAN_High and CAN_Low is greater than 0.9V, it is called the dominant level (Dominant) .

High speed CAN


P9

P10


Low-speed fault-tolerant CAN (Fault Tolerance CAN)

         The differential signal is actually obtained by subtracting CAN_LOW from CAN_HIGH. In the logic signal, 5V represents 1, 0V represents 0, and in the differential signal:


● 0V---------logic 1------invisible level

● 2.0V-------logic 0-----dominant level


Dominant levels have higher priority than invisible levels.


P11


The CAN bus follows the "wired AND" mechanism: the "dominant" bit can overwrite the "recessive" bit; the bus is in the "recessive" state only when all nodes send the "recessive" bit. This "wired AND" mechanism makes the CAN bus exhibit dominant priority characteristics.


6b39595f3422715b012af6cce7aa87e6.jpg

474a66fed8dc7e8b83b3bb5792be2746.jpg


CAN bus connector

CAN bus connector


Generally in embedded systems, the CAN interface of the processor MCU comes out with CAN TXD and CAN RXD, which are transmitted with one hand. However, a transceiver is required to actually connect to the CAN network. The transceiver outputs differential signals CANH and CANL, as shown in the figure below. shown


CAN closed loop bus communication network



Articles you may also like

Design of High Current H-Bridge Motor Drive Circuit

Use IR2104 and IRLR7843 to design a high-current H-bridge motor drive circuit, and analyze the working principle
Read More >

The working principle, key parameters, and selection of TVS

This article provides a detailed explanation of the working principle of TVS diodes, as well as the key parameters that need to be considered when selecting a suitable TVS diode, and provides examples for explanation.
Read More >

Understanding NAND Gate: The Universal Logic Gate in Digital Circuits

Learn everything about NAND gates, the universal building block of digital circuits. Discover their truth table, applications in computing, and why they are essential for modern electronics and AI processors.
Read More >

Gas Discharge Tube Symbols, Characteristics and Structure

This article introduces the definition, symbols, characteristics, working principle and structure of gas discharge tubes in detail, discusses the selection considerations of gas discharge tubes, their application in power supply circuits and related safety certification standards.
Read More >
Becky Boresen
Becky Boresen is a senior electronics engineer specializing in switching components such as transistors, capacitors and connectors. During her career, she has been involved in developing several electronic projects and has successfully driven several technological innovations. She is passionate about continually learning about the latest trends in electrical technology to stay competitive in the industry.
Related Parts
  • SN74LVC1G332DBVR

    texas-instruments

    IC GATE OR 1CH 3-INP SOT-23-6

  • M93C86-WMN6TP

    stmicroelectronics

    IC EEPROM 16KBIT 2MHZ 8SO

  • IS61LV25616AL-10TL

    issi-integrated-silicon-solution-inc

    IC SRAM 4MBIT 10NS 44TSOP

  • MCP1703T-3302E/CB

    microchip-technology

    IC REG LIN 3.3V 250MA SOT23A-3

  • STM32H743ZIT6

    stmicroelectronics

    16/32-BITS MICROS

  • AHES3191

    panasonic-electric-works

    General Purpose Relays DPST-NO (2 Form A) 35 A 12VDC

  • ADXL326BCPZ

    analog-devices-inc

    ACCELEROMETER 16G ANALOG 16LFCSP

  • TMS320TCI6487FZUN

    texas-instruments

    IC DSP FIXED POINT BGA-561

  • STM32G030K8T6

    stmicroelectronics

    ARM® Cortex®-M0+ STM32G0 Microcontroller IC 32-Bit Single-Core 64MHz 64KB (64K x 8) FLASH 32-LQFP (7x7)

인덱스: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z