Our Latest News

Serial communication technology between MCUs with different level signals

Today we will talk about the following “level shift” circuit, which is pleasant to understand. Circuit design can actually be fun. First, let’s talk about the purpose of this circuit: when two MCUs work at different operating voltages (e.g. MCU1 works at 5V; MCU2 works at 3.3V), how can MCU1 and MCU2 communicate with each other through the serial port? It is obvious that the corresponding TX, RX pins can not be directly connected, otherwise the test may cause lower operating voltage MCU burn! The following “bi-directional level conversion circuit” can realize the serial communication between MCU with different VDD (chip operating voltage).

This image has an empty alt attribute; its file name is image-137.png

deeec3d2-8c4d-11ed-bfe3-dac502259ad0.png

The core of the circuit is the MOS field effect tube (2N7002) in the circuit. He is very similar to the function of the triode, can be used as a switch, that is, to control the circuit on and off. However, compared to the triode, MOS tube has quite a few advantages, which will be discussed in detail later. Below is a 3D picture of the MOS tube and circuit diagram. Simply put, to make him as a switch, just let Vgs (on voltage) to a certain value, the pins D, S will be on, Vgs does not reach this value will be cut off.

def73a3a-8c4d-11ed-bfe3-dac502259ad0.png

So how can the 2N7002 be applied to the above circuit, and what role does it play? Let’s analyze it below.

defe8db2-8c4d-11ed-bfe3-dac502259ad0.png

If the circuit is cut along the two lines a and b. Then the TX pin of MCU1 is pulled up to 5V and the RX pin of MCU2 is also pulled up to 3.3V. The cutoff of S and D pins of 2N7002 (corresponding to pins 2 and 3 in the figure) is equivalent to the two lines a and b, which cut off the circuit. In other words, this circuit is doable when the 2N7002 is cut off, delivering the corresponding operating voltage to the two MCU pins.

df074de4-8c4d-11ed-bfe3-dac502259ad0.png
  1. MCU1 TX sends high level (5V), MCU2 RX is configured as serial receive pin, at this time, S and D pins of 2N7002 (corresponding to pins 2 and 3 in the diagram) are cut off, and the diode 3–>2 direction inside 2N7002 is not available. Then MCU2 RX is pulled up to 3.3V by VCC2.
  2. MCU1 TX sends low (0V), at this time the S and D pins of 2N7002 still cut off, but the diode inside 2N7002 2->3 direction pass, that is, VCC2, R2, the diode in 2N7002, MCU1 TX form a loop. 2N7002 pin 2 is pulled low, at this time MCU2 RX is 0V. the circuit from MCU1 to MCU2 direction, data transfer, the effect of level conversion is achieved.

Next analysis Data transfer direction MCU2–>MCU1

df10fb32-8c4d-11ed-bfe3-dac502259ad0.png
  1. MCU2 TX sends high level (3.3V), at this time Vgs (the voltage difference between pins 1 and 2 in the diagram) voltage difference is about equal to 0, 2N7002 cutoff, 2N7002 inside the diode 3 –> 2 direction is not available, at this time MCU1 RX pin is pulled up to 5V by VCC1.
  2. MCU2 TX sends low (0V), at this time Vgs (the voltage difference between pins 1 and 2 in the figure) voltage difference is equal to 3.3V, 2N7002 on, 2N7002 inside the diode 3 –> 2 direction is not available, VCC1, R1, 2N7002 diode, MCU2 TX form a loop. 2N7002 pin 3 is pulled low, at this time MCU1 RX is 0V.

This circuit achieves level conversion by transferring data from MCU2 to MCU1 direction.

At this point, the circuit is analyzed, which is a bidirectional serial port level conversion circuit.

The advantages of MOS.

1, the source S, gate G, drain D of the field-effect tube corresponds to the emitter e, base b, collector c of the transistor, their role is similar, Figure 1 shows the N-channel MOS tube and NPN-type crystal transistor pins, Figure 2 shows the P-channel MOS tube and PNP-type crystal transistor pins correspond to the diagram.

df17b81e-8c4d-11ed-bfe3-dac502259ad0.png

2, field effect tube is a voltage control current device, by VGS control ID, ordinary crystal transistor is a current control current device, by IB control IC. MOS pipe amplification factor is (trans-conductance gm) when the gate voltage change a volt can cause the drain current change how many amps. Crystal transistor is the current amplification coefficient (beta β) when the base current change of one milliampere can cause the collector current change how much.

3, field effect tube gate and other electrodes are insulated, do not produce current; and triode work when the base current IB determine the collector current IC. Therefore, the input resistance of the field effect tube is much higher than the input resistance of the triode.

4, the field effect tube only most carriers involved in conducting; triode has most carriers and a few carriers two carriers involved in conducting, because the concentration of a few carriers by temperature, radiation and other factors have a greater impact, so the field effect tube than the temperature stability of the triode.

5, the field effect tube in the source is not connected to the substrate, the source and drain can be used interchangeably, and the characteristics of the change is not significant, while the collector and emitter of the triode interchangeable use, the characteristics of the difference is very large, b value will be reduced by a lot.

6, the noise coefficient of the field effect tube is very small, in the low-noise amplifier circuit input stage and the requirement of high signal-to-noise ratio of the circuit to use the field effect tube.

7, field effect tubes and ordinary transistors can be composed of a variety of amplification circuits and switching circuits, but the field effect tube manufacturing process is simple, and has an ordinary crystal transistor can not be compared to the excellent characteristics of various circuits and applications are gradually replacing the ordinary crystal transistor, the current large-scale and ultra-large-scale integrated circuits, has been widely used in the field effect tube.

8, high input impedance, drive power is small: as between the grid source is silicon dioxide (SiO2) insulation layer, the DC resistance between the grid source is basically the SiO2 insulation resistance, generally up to about 100MΩ, AC input impedance is basically the capacitive resistance of the input capacitor. Due to the high input impedance, the excitation signal will not produce a voltage drop, there is a voltage can be driven, so the drive power is very small (high sensitivity). The general crystal transistor must have the base voltage Vb, and then generate the base current Ib, in order to drive the collector current generation. Crystal transistor drive is required for power (Vb × Ib).

9, switching speed: MOSFET switching speed and input capacitive characteristics of a great relationship, due to the presence of input capacitive characteristics, so that the speed of the switch slows down, but in the use of as a switch, can reduce the drive circuit resistance, speed up the switching speed (the input is used after the “perfusion circuit” drive, speed up the capacitive charging and discharging time). MOSFETs only rely on multiple subconductors, there is no less sub-storage effect, so the shutdown process is very fast, the switching time between 10-100ns, operating frequency of up to 100kHz or more, ordinary crystal transistors due to the storage effect of a few carriers, so that the switch always hysteresis, affecting the switching speed (currently using MOS tube switching power supply its operating frequency can easily do 100K / S ~ 150K / S, which is unimaginable for the ordinary high-power transistors).

10, no secondary breakdown: As ordinary power transistors have when the temperature rises will lead to collector current rise (positive temperature ~ current characteristics) of the phenomenon, and the rise of the collector current will lead to a further rise in temperature, the temperature rises further, further leading to a vicious circle of collector current rise. MOS tube has the opposite temperature to current characteristics of ordinary crystal transistors, namely When the tube temperature (or ambient temperature) rises, the channel current IDS instead of falling. For example; an IDS = 10A MOS FET switching tube, when the VGS control voltage remains unchanged, at 250C temperature IDS = 3A, when the chip temperature rises to 1000C, IDS reduced to 2A, this negative temperature current characteristics due to the temperature rise and lead to a decrease in channel current IDS, so that it does not produce a vicious circle and thermal breakdown. That is, there is no secondary breakdown of the MOS tube phenomenon, it can be seen that the use of MOS tubes as a switch, the switch damage rate is significantly reduced, the last two years of television switching power supply using MOS tubes instead of ordinary crystal transistors in the past, the switch damage rate is greatly reduced is also an excellent proof.

11, MOS tube conduction after its conduction characteristics are pure resistance: ordinary crystal transistor in saturation conduction is, almost straight, there is an extremely low voltage drop, called the saturation voltage drop, since there is a voltage drop, then that is; ordinary crystal transistor in saturation conduction after the equivalent is a resistance value of very small resistance, but this equivalent resistance is a non-linear resistance (resistance on the voltage and flow of current can not (in line with Ohm’s law), and MOS tube as a switching application, in the saturation of the conductor is also a resistance value of very small resistance, but this resistance is equivalent to a linear resistance, the resistance value of the resistance and the voltage drop across the ends and the flow of current in line with Ohm’s law relationship, the current is large voltage drop is large, the current is small voltage drop is small, after the conductor since the equivalent is a linear component, linear components can be applied in parallel, when such When two resistors are connected in parallel, there is an automatic current balancing effect, so MOS tubes in a tube power is not enough, you can apply multiple tubes in parallel, and do not need to add additional balancing measures (non-linear devices are not directly parallel applications).

    GET A FREE QUOTE

    FPGA IC & FULL BOM LIST

    We'd love to

    hear from you

    Highlight multiple sections with this eye-catching call to action style.

      Contact Us

      Exhibition Bay South Squre, Fuhai Bao’an Shenzhen China

      • Sales@ebics.com
      • +86.755.27389663