Communication connection between 5V powered CAN device and 3.3V powered MCU

Publisher:美好未来Latest update time:2023-01-19 Source: 川土微电子 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Most of the most commonly used CAN communication interface devices on the market currently use 5V power supply, while the power supply voltage of most MCUs has been reduced from 5V to 3.3V. This will cause problems when the 5V  CAN communication interface device  communicates with the 3.3V MCU. Regarding the problem of inconsistent interface levels, this article proposes several connection methods between 5V powered CAN devices and 3.3V powered MCUs for this application , and gives specific application cases of Sichuan Tu Microelectronics products.


CAN device overview and connection between MCU


The CAN device and MCU are connected through RXD and TXD. After the data sent by the MCU to the CAN device TXD, the CAN transceiver converts it into the recessive and dominant levels of CAN and sends it to the CAN bus. When receiving the data, The recessive and dominant levels on the CAN bus are converted into logic levels by the CAN transceiver and output to the MCU by RXD.


Taking Sichuan Tu Microelectronics ' CA-IF1051S/HS as an example, for a 5V powered CAN transceiver, the TXD input level range is usually VIH>2V, VIL<0.8V, and the 3.3V MCU output level can meet this requirement. , so, the 3.3V powered MCU TXD output can be directly connected to the 5V powered CAN TXD. However, the RXD output of the 5V powered CAN transceiver is usually VOH>4V, VOL<0.4V. The high-level output of 4V has exceeded the power supply voltage of the MCU, so it is usually necessary to process the RXD output of the CAN transceiver before summing it up. MCU to connect.


1. Direct connection, determined by the input pin characteristics of the MCU


For some MCUs with 3.3V power supply, their IO pins can withstand a voltage of 5V. In this case, the RXD output of the 5V CAN transceiver can be directly connected to the RXD pin of the MCU.


20.jpg


The above picture is the pin definition diagram of a commonly used MCU. It can be seen that when the CAN RXD and CAN TXD of the MCU are powered by 3.3V, the IO pin can withstand a voltage of 5V. When the MCU uses 3.3V power supply, it can support connection with a 5V power supply CAN transceiver.


2. Voltage dividing connection through resistors


If the MCU's pins cannot withstand voltages exceeding their own power supply, the voltage output by the CAN transceiver can be attenuated through two voltage divider resistors to meet the processor's input level requirements.


1673959595468083.png


For the selection of resistors R1 and R2, it is required that the high-level voltage connected to the MCU after voltage division does not exceed the processor supply voltage 3.3V and is higher than the processor VIH reception threshold. Usually R1 can choose 2kΩ-20kΩ, and R2 can choose 3.3kΩ-33kΩ. The advantage of this design is that the devices on both sides will not withstand overvoltage, and the design is relatively simple. The disadvantage is that the power consumption increases, because when the bus is idle, the output of RXD is high level, because the voltage divider resistor is connected to GND, so there is always current flowing through R1 and R2 when the bus is idle, causing increased power consumption.


3. Connect through current limiting resistor


For the IO pins of MCU, there are usually internal protection diodes. When the power supply voltage is exceeded, the internal diodes are turned on, and the IO pins can generally withstand several milliamps of current absorption. An external current-limiting resistor protects the pins from damage and limits the input voltage to no more than the processor's supply voltage.


1673959580325647.png


The requirements for the selection of the R1 resistor are low, and the power consumption can be reduced by selecting the resistor to limit the current flowing into the MCU to a very low level. The advantage of this design is that it is simpler to design and is also compatible with 3.3V CAN transceivers. External resistors can limit the current to lower values ​​to reduce power consumption when the bus is idle. The disadvantage is that the protection circuit inside the MCU pin works and absorbs a certain amount of current.


4. Level conversion through MOSFET


Since the power supply of the processor and the CAN transceiver are different, a level converter is used to achieve level conversion of different voltages to meet the requirements of both parties. Integrated level converters can be used. However, only one signal in this application requires level conversion, and level conversion can also be achieved through an external MOSFET.


23.png


You can choose 2N7002 N-MOSFET in this design. When the RXD output of the CAN transceiver is high, the MOSFET does not conduct. The RXD input of the MCU is kept high by a pull-up resistor. When the RXD output of the CAN transceiver is low, When the MOSFET body diode is turned on, the input terminal of the MCU is pulled low and the MOSFET is turned on, causing the RXD input terminal of the MCU to be low level. This design method can achieve the lowest power consumption and the MCU will not be subjected to overvoltage conditions. Compared with the previous solution, the cost of MOSFET will be slightly higher than that of resistor.


The CA-IF1051S CAN transceiver launched by Sichuan Tu Microelectronics uses 5V power supply. The device supports classic CAN 1Mbps and up to 5Mbps CAN-FD communication, with ±58V fault protection voltage and ±30V common mode input voltage. The internal explicit timeout protection function can support the lowest communication rate of 4kbps, ensuring the reliability of CAN communication. The communication connection with the 3.3V MCU can be achieved by using the above method. The CA-IF1051VS device has an IO power supply and can directly support the 3.3V interface power supply without adding additional devices to achieve level conversion.


1673959549795904.png


This article analyzes the logic level requirements for the input and output of the processor and CAN transceiver, provides 4 methods to realize the communication connection between 3.3V MCU and 5V CAN transceiver, and analyzes the advantages and disadvantages of each implementation scheme. For the design of option 3, it can be compatible with the connection of 3.3V CAN devices at the same time. Sichuan Tu Microelectronics' various CAN transceiver products can meet customers' different design requirements and achieve reliable CAN communication.


Reference address:Communication connection between 5V powered CAN device and 3.3V powered MCU

Previous article:Accelerating the domestic replacement of basic chips: starting with CANLIN transceivers
Next article:Apply the latest CAN bus enhancements for safe and reliable high-speed automotive communications

Latest Automotive Electronics 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号