Thinking triggered by a MOS level conversion circuit can avoid more pits

1. Background

1.1 MOS level conversion circuit

MOS-based level conversion circuits are well known to everyone. You can find many on the Internet. The basic model is as follows:

 

1.2 Basic Principles

1. From A to B

When A is at a high level, B is used as an input, at this time it is in a high-impedance state, the MOS tube is turned off, and the B terminal is pulled up to output a high level;

When A is low level, the body diode in the MOS tube is turned on, so that the S pole of the MOS tube is pulled down. Considering the voltage drop of the body diode is generally 0.7V, Vgs=3.3V-0.7V=2.6V, when Vgs=2.6 V>Vgs(th), the MOS transistor is turned on, the B terminal is pulled low, and the output is low; (the conduction threshold voltage of the MOS transistor must be less than 2.6V)

When A is in a high-impedance state, the MOS tube is turned off, and the B terminal is pulled up to output a high level.

2. From B to A

When B is at a high level, the MOS tube is turned off, and the A terminal is pulled up to output a high level;

When B is low level, Vgs=3.3V>Vgs(th), the MOS tube is turned on, the A terminal is pulled low, and the output is low level;

When B is in a high-impedance state, the MOS tube is turned off, and the A terminal is pulled up to output a high level.

2. Practical application

2.1 Problems in the actual circuit

Design a circuit as follows, the basic idea is shown in the figure below, at first glance there is no problem.

During the actual test, when the A terminal of the module is configured as a high-impedance state, it is found that the low levels of the A and B terminals of the module are abnormal. The measured values ​​are: the A terminal level is 0.7V, and the B terminal level is 0.5V. Module A is configured as an output, the output is low, why is it abnormal?

2.2 Analysis

(1) Disconnect module A, and measure the voltages at terminals 2 and 3 of the MOS tube: 0.68V and 0.49V respectively. This result is consistent with the above test phenomenon

(2) Disconnect module B again, and measure the voltages at terminals 2 and 3 of the MOS tube: 1.8V and 3.3V, respectively. This result is the same as the result of theoretical analysis.

(3) Connect module A, disconnect module A, and measure the voltages at terminals 2 and 3 of the MOS tube: 1.8V and 3.3V respectively, and the problem in section 2.1 is not there.

Analysis : The root cause of the problem in section 2.1 is caused by module B. As shown below:

a Module B has current input, and the voltage at terminal 3 is 0.5V, then the current of R1047 is 0.28mA; at this time, the MOS tube Vgs=1.3V, check the manual, the threshold of the opening voltage is 0.8V~1.4V; at this time, the Vds The voltage is 0.2V, Vds<Vgs-Vgs(th), at this time, the MOS is in the variable resistance area.

b At this time, the calculation of Ron resistance can not refer to the calculation in the manual, but can be calculated according to the following formula

 You can also refer to the diagram in the manual, and it is estimated that the Ron value is about 20Ω and the current is about 10mA.

 c According to the above description, there must be an internal pull-down at module B, and the inflow current is 0.28+10 =10.28mA; therefore, the pull-down resistance of module B is: Rpd = 0.5V/10.28mA = 48.6Ω. Therefore, due to the existence of this pull-down resistor, when the module A terminal is in a high-impedance state, the power supply of the module B terminal is 0.5V.

3. Summary

 

(1) When module A is in a high-impedance state, the state of module B cannot be determined, and it is not the imagined high level, but related to the pull-up and pull-down of module B. Avoid high-impedance of module A or module B during design. Impedance state, causing the level output to be abnormal, especially the reset signal, which requires special attention.

(2) When the module B is at low level, the voltage difference between the 2-terminal and 3-terminal of the MOS tube is very small, and the voltage drop is very small. There will be no current flowing into the B-terminal at the 3-terminal, and the voltage drop is 48.6Ωx0.28mA = 13mV , Measured 17mV, consistent with the analysis.

Guess you like

Origin blog.csdn.net/m0_52850847/article/details/124397467