Company news

Your present location > Home page > Company news
How to use MOSFET for single and bidirectional level conversion?
time:2024-04-11
Number of views:9999
Back to previous page

How to use MOSFET for single and bidirectional level conversion?

What is level conversion?

Now, if there are two chips, one running at 5V and the other at 3.3V, to establish a connection and communication between them, level conversion is needed.

企业微信截图_17151364902689.png

Why is level conversion necessary?

When the supply voltages of two CPUs are different, mismatched levels can easily lead to signal transmission errors. If the voltage difference between them is too large, it can even damage the chips.

Level conversion mainly deals with communication conversion between two or more CPUs and can be divided into unidirectional and bidirectional conversion.

So, how do you use a single MOSFET for unidirectional and bidirectional conversion?

Here are two circuits found online.

Unidirectional level conversion circuit:

企业微信截图_17151365272498.png

  1. Data transmission direction: TXD-2 to RXD-1

When TXD-2 output is low, diode D1 conducts, pulling RXD-1 low.

When TXD-2 output is high at 5V, diode D1 cuts off, pulling RXD-1 up to 3.3V.

  1. Data transmission direction: TXD-1 to RXD-2

When TXD-1 is low, MOSFET Q1 conducts, pulling RXD-2 low.

When TXD-1 is high at 3.3V, MOSFET Q1 cuts off, pulling RXD-2 up to 5V.

Bidirectional level conversion circuit:

企业微信截图_17151365518234.png

  1. When SDA1 outputs a high level, MOSFET Q1's Vgs = 0, the MOSFET is off, and SDA2 is pulled up to 5V by resistor R3.

  2. When SDA1 outputs a low level: MOSFET Q1's Vgs = 3.3V, greater than the threshold voltage, Q1 conducts, pulling SDA2 low through Q1.

  3. When SDA2 outputs a high level: MOSFET Q1's Vgs remains unchanged, Q1 remains off, and SDA1 is pulled up to 3.3V by resistor R2.

  4. When SDA2 outputs a low level: MOSFET Q1 does not conduct, but due to the body diode of MOSFET Q1, SDA1 is pulled low. At this time, Vgs ≈ 3.3V, MOSFET Q1 conducts, further pulling down the voltage of SDA1.

Note:

We used 3.3V and 5V as examples. When using other voltage values, the MOSFET's Vgs threshold for turning on needs to be considered.

Additionally, here the high level is close to or equal to the supply voltage. Therefore, the high level of a 3.3V device will be close to or equal to 3.3V, and for a 5V device, it will be close to or equal to 5V.

The specific range needs to be determined based on the IC manual.

The purpose of the pull-up resistor: to pull up the voltage for IO port use and to limit the current flow.


Sample Req

Online

Telephone

400-655-8788

WeChat

Topping

Sample Req
Online
Telephone
WeChat