Electronic – Do high and low side labels on bidirectional logic level converters matter

battery-operatedlogic-level

Logic level converters like this one from Sparkfun have high side and low side labels on them. Now i have an application where I think I need to shift logic levels but the high side and the low side are likely to swap at some point due to changes in battery voltage over time.

Bidirectional Converter Circuit

This is intended for a battery powered project with an expected runtime of a year where an ATTiny85 that can natively work between 2.6V and 6V and is directly connected to the battery will be talking to an ESP that is behind a 3.3V regulator because it can not handle more than +-0.5V deviation from 3.3v on any of the pins. The ESP (regulator) will brownout much earlier but that is OK.

I started reading the BSS138's Datasheet and could not find any mention for or against swapping sides.

So I built a very minimalistic simulation of the circuit. According to the simulation the source-drain is passed in either direction in "normal" operation while sticking to the high and low side labels.

Falstad Simulation

Further simulations swapping the high/low sides and even having them the same voltage did seem to work.

Is there any downside to swapping the high/low sides with a logic level converter based on a BSS138?

Thank you Dave for your answer.

Now I see that the sides do matter and swapping them would lead to failure.
Here is the sideswapped state with both sides pulled high which would lead to failure:

Failure

The left side is pulled down to 4.1V (should be 5V) and the right side is pulled up to 3.8V (should be 3V) potentially destroying the ESP, definitely destroying the ESP if the battery was at 6V and connected to the converter's low side!

Best Answer

Yes, they matter. See that body diode on the MOSFET? It must be reverse-biased when both signal lines are being pulled high.

Otherwise, the HV side is trying to pull the LV side higher than the LV supply voltage. If that wasn't a problem, you wouldn't need the level shifter in the first place.


If you can find a MOSFET that doesn't have its substrate internally shorted to the source pin (i.e., it is brought out to a fourth pin), then you can do what you want. Connect the substrate to ground (the most negative point in your circuit), and then you can use the source and drain terminals interchangeably.