FET level shifter for serial does not work with inline resistor for safety

level-shiftingserial

For a voltage change on a serial line I'm using a common level shifter design which uses a FET (BSS138 in this case) as so:

enter image description here

I have two of these – one for RX and one for TX. I should add that I'm using this because I have an I2C line pair as well and you can get 4 of these circuits on one little board from Adafruit.

As I was hooking this up to someone else's device and the usual caveat about "RX from which point of view?" applies, I added the 1K resistor on the right so that that miswiring would be less likely to cause shorting issues.

On a proper push pull output this should be fine, especially at 9600 baud. However, with the FETs this does not work. I thought – maybe when the 3.3V side pulls down the body diode is ineffective in clamping. But I had a GPS TX on the 3.3V side sending to the 1.8V RX side and that seemed to work fine, which isn't what I'd expect. Comms with a PIC micro failed though, probably on the TX (1.8V to 3.3V direction) side. When the 1.8V side pulled low, the 3.3V side seemed to pull only half way.

Removing the 1k resistors cured the problem and the circuit translated the serial comms correctly. But I'm confused as to why the 1K caused the problem – what are the dynamics of the issue?

Edit: To explain why I'm considering continuing to use this system – I'd gladly replace the whole thing with a TXS0108 which does push-pull and open-drain level shifting for 8 lines in one device. But that device does not appear to give Vcc isolation (if either 1.8 or 3.3 is turned off for example), unlike the TXB0108 which explicity says it does in the datasheet. Thus I wanted to use two of the FET circuits "back-to-back" to give the isolation.

Best Answer

When the 1.8V side pulled low, the 3.3V side seemed to pull only half way.

Chances are the FET you used did not turn on very well with only 1.8V gate-source drive - choose a FET with a low \$V_{GS(Threshold)}\$ typically under 1V.

The other way round the circuit works because you are using the substrate diode in the FET and that drops about 0.7 to 1 volt.

Related Topic