跳至主要内容

The Advantages and Disadvantages of 6 Level Conversion Methods

As a hardware engineer in electronic design, level conversion is a topic everyone must face. The main chip pins use 1.2V, 1.8V, 3.3V, etc., and the external interface chip uses 1.8V, 3.3V. , 5V, etc. Because the level does not match, level conversion is necessary. Every engineer has his own set of conversion schemes. Today we will summarize the six level conversion methods, and summarize various advantages and disadvantages to avoid unnecessary troubles in the design process.

Note: All links in the text are pages or posts explaining related knowledge. Hope you don't mind! and don't miss the great content! All of them are from an excellent website called Apogeeweb which can be very helpful for learning about electronics and semiconductors.

Level conversion method

Below we will evaluate from the five dimensions of speed, drive capability, leakage current, cost, and the number of channels.

1) Transistor level conversion method;

2) Dedicated level conversion chip;

3) Current-limiting resistor level conversion method;

4) Resistance divider level conversion method;

5) Diode level conversion method

6) Use DIALOG GREENPAK chip

1. Use transistors for level shifting

As shown in the figure below, two NPN transistors are used to convert the input signal level VL and the output level VH. The purpose of using two transistors is to make the input and output signals in phase. If the reverse phase is acceptable, a single transistor can also be used.

Use transistors for level shifting

Advantage:

1) Cheap: The triode is easy to be common and easy to purchase, and the price is low (a few cents per batch).

2) Strong driving capability: The driving capability depends on the transistor, which can achieve tens of mA;

3) Low leakage current: The leakage current between I, and OUT is small (uA level), almost negligible.

Disadvantage:

1) Speed: The two-stage transistor is a current-driven type. With the circuit and parasitic capacitance, the converted waveform is not very ideal. Generally only used for signal conversion within 100K.

2) Multiple devices: In-phase conversion requires 2 transistors and matching resistors, which takes up more space when multiplexing.

2. Use a dedicated level chip

As shown in the figure below, a dedicated level conversion chip is used to provide different voltages for the input and output signals. The conversion is completed inside the chip, such as MCP2551/3221. Dedicated chip is the most reliable level conversion solution, 4 out of 5 advantages, except cost.

Dedicated level conversion chip

Advantage:

1) Strong driving ability: The output of the dedicated chip generally uses CMOS technology, and the output drive is 10mA.

2) Leakage current is almost 0: There are a series of amplifiers and comparators inside, and the input impedance is very high, generally reaching hundreds of K. The leakage current is basically nA level.

3) More channels: dedicated chips are available for different applications, ranging from 2 channels to dozens of channels, and are very suitable for occasions with high area requirements.

4) High speed: The dedicated chip can be made at frequencies ranging from hundreds of K to hundreds of M due to higher integration and higher technology.

Disadvantages:

Cost: The dedicated chip has many advantages, but the cost is the biggest disadvantage. An ordinary 4-channel level conversion chip with a speed of hundreds of K costs at least 70 cents or more. If using a transistor, the cost will be no more than 15 cents.

3. Use resistor divider

As shown in the figure below, R2 and R3 form a voltage divider. In the figure below, Vgprs=3.3*5.6K/(1K+5.6K)=2.8V. Since the TX of the GPRS module is at the transmitting end and 2.8V is within the receiving range on the right, there is no need to divide the voltage and only need to add a resistor to limit the current.

Resistance divider method for level conversion

Advantage:

1) Cheap: Cheap is the biggest advantage, 2 resistors are less than a cent;

2) Easy to realize: easy to purchase resistors and small footprint.

Disadvantages:

1) Speed: In order to reduce power consumption, the voltage divider method uses resistors above K level, plus the distribution and parasitic capacitance of circuits and devices. It is difficult to increase the speed. Generally, it can only be applied to frequencies within 100K.

2) Drive capacity: Due to the use of large resistance resistors, the drive capacity is strictly controlled, which is not suitable for occasions that require high drive capacity, such as LED lights, etc.

3) Leakage: Leakage is the biggest shortcoming of this scheme. Because of the direct connection through the resistor, the voltage on the left and right ends will flow, which will affect each other. For example, the RS232 interface adopts this scheme, and the peripheral device provides the main chip with a level of 2.8V at the moment of power-on. In the light of the time sequence, the main chip cannot be started, and in the worst case, the main chip is latched and the chip is burned.

4. Switch Level by limiting current with a resistor

Some highly skilled and bold engineers sometimes use a resistor to limit the current to achieve the conversion between two different levels. The specific practical principle is to use the input current of the chip not to exceed a certain value. For example, the input current value of the 74HC series chip cannot exceed 20mA, which can be considered safe. If it is 5V to 3.3V, as long as the resistance> (5-3.3 V)/20mA=85Ω, choose a 1K resistance, it is considered safe. Because the inside of the chip can be equivalent to a load resistance RL, which forms a partial pressure relationship with R1.

Resistance current limiting method for level conversion

5. Use diode clamp to switch level

Some engineers often use the diode clamp method to perform level conversion. The left side of the figure below is from 3.3V to 5V. When the 3.3V level is high, the 5V output voltage = 3.3V+Vd=3.3+0.7≈4V. The 5V high level threshold. When the 3.3V level output is low, the 5V level output voltage is about =Vd≈0.7V, which is within the low level threshold range.

As shown in the figure below, the right is 5V to 3.3V, when the input is high level, 3.3Vout=3.3V+Vd≈4V, when the 5V level input is low, 3.3Vout=0V.

 

3.3V to 5V (left), 5V to 3.3V (right)

Advantage:

1) Low leakage current: Since the leakage current of the diode is very small (uA level), it can prevent the power supply from backflow in one direction and prevent the 3.3V from backflowing to 5V.

2) Easy to realize: Diodes and resistors are easy to purchase and occupy a small area.

Disadvantages:

1) Large level error: The main reason is that the forward voltage drop of the diode is large, which easily exceeds the operating voltage range of the chip.

2) One-way backflow prevention: Only one-way backflow prevention can be used, but no two-way backflow prevention.

3) Unsatisfactory speed and driving capability: Due to resistance current limiting, the driving speed and capability are unsatisfactory and can only be applied to frequencies within 100K.

4) More devices are required.

6. Use DIALOG GREENPAK chip

DIALOG's GREENPAK chip is a programmable logic chip. It has powerful functions and is widely used. Level conversion is a very simple application in GREENPAK. Any GREENPAK chip with dual voltage rails can easily implement level conversion. For example, SLG46826V (https://www.dialog-semiconductor.com/SLG46826-datasheet)

In system-level design, it is necessary to combine signals from two different levels. For example, the analog voltage rail works at 5V, and the digital voltage rail works at 3.3V. Many GreenPAKs solve this problem by using dual voltage rails. Signals from different levels can be input to GreenPAK, processed, and then output from any voltage rail. When using a device with dual voltage rails to start a design, you need to input the voltage ranges of the two voltage rails as shown in the figure below. The working ranges of the two voltage rails vary with different devices, but VDD The rail is always the higher voltage rail.

Summary

The above six level conversion methods are relatively common methods. The level conversion mainly considers the following dimensions:

1) Level matching: This is the most important, the converted level needs to be within the range that the other party can withstand.

2) Leakage current: Not only must the levels match between the two, but the leakage currents also cannot affect each other. This is the most common mistake. The author has seen that some engineers use diode level conversion for RS485 output. As a result, the leakage current of the external device affects the startup of their own equipment, and their own equipment outputs a bunch of garbled codes when it starts, which affects the normal operation of the other party.

3) Drive capability: Drive capability must be considered after level conversion. For example, after I2C level conversion, the drive capability needs to be considered when multiple I2C devices are mounted.

4) Speed: In theory, all level conversions are sacrificed in terms of speed. The best speed scheme is a dedicated level conversion chip, followed by a triode scheme, and the worst is a resistor divider scheme.

5) Cost: Let the product manager consider the factor of cost.

6) The number of channels: Too complicated conversion scheme is not suitable for multiple channels and will occupy too much area of ​​the board. For example, a 4bit SD card signal from 1.8V to 3.3V is not suitable for the triode solution.

 

评论

How to read datasheet?

Temperature Rise of PCB Leads

I read two articles today that I found enlightening and cross-referenced to find some information on the subject, most of which give straightforward data, as shown below: The unit of line width: Inch Data source: MIL-STD-275 Printed Wiring for Electronic Equipment Related Tool: Calculator for  PCB Trace Width After reading the article on Temperature Rise in PCB Trace carefully, I have gained a lot, and now I am picking out the important part to better understand the current-carrying capacity of PCB board wire paths.  We know that the PCB board on the wire current load capacity is limited, and we generally define the maximum load current that a wire of a certain width and thickness can withstand within the specified wire temperature rise under certain environmental conditions. Here we also need to subdivide them into two types of current, continuous current and instantaneous inrush current (continuous current refers to the continuous flow of current through the wire...

Pspice Tutorial-RC time constant

Schematic RC time constant: 1K * 1u = 1ms, Vc = V1 * [1 – exp(-t/RC)] When t = 1RC, Vc = 0.63V1 = 3.15V; When t = 2RC, Vc = 0.86V1 = 4.30V; When t = 3RC, Vc = 0.95V1 = 4.75V; Recommendation: A tool for calculating time constant Device information: Device Model Element Signal source V1 VPULSE/ SOURCE Resistor R1 R/ ANALOG Capacitor C1 C/ ANALOG GND 0   Signal source description: V1: Starting voltage V2: Pulse voltage TD: Delay time, set 1ms here for easy observation TR: Rise time, set 0.5us here TF: Fall time, no need to set PW: Pulse width, no need to set, that is, the pulse width is unlimited PER: Pulse period, no need to set Simulation Results Simulation settings: Add Trace: Add Toggle Curse, Mark Label, Text Label: It can be seen that one time constant corresponds to a voltage of 3.1612V; two time constants correspond to a voltage of 4.3232V; three time constants correspond to a voltage of 4.7510V, which is similar to the theoretical calculation.