Electronic – arduino – Is a N-Channel Mosfet save/reliable for level shifting UART from 3V3 to 5V

arduinolevel-shiftingraspberry pitransistorsuart

I am busy with a design that needs to connect a Raspberry Pi to an Arduino via UART.
Previously I have designed a circuit that worked okay.

Prev Design
(source: protoneer.co.nz)

But now I want start using SMD components and is planing on using the following component: BSS138BKS + 10k Resistor Bank.

I am not an expert at these things and I am usually use designs from other circuits in my new designs.

My question is, will the BSS138BKS used like in the original setup with the 2N7000 be able to run continuously without issues.

And is this the right way to do level shifting between the two devices? (I don't want to damaging the boards).

Edit: Updated circuit
enter image description here

Best Answer

The BSS138 should work just fine in your level shifter circuit. Just make sure to connect it's G, D, and S pins up in the same method that you used for the other FET. For a level shifter like this it is essential that the D (drain) pin be connected to the side that has the 5V levels so that the body diode in the FET does not go into continuous forward BIAS.

This type of level shifter actually supports bi-directional signalling but will work just as well with the unidirectional signalling of your UART ports.

When you build it up with the BSS138 parts you may want to check the rise time of the signals passing through the level translator. If they are too slow for the baud rate you intend to use you may need to lower the value of the pullup resistors on one or both sides of the translator FETs.

Related Topic