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.
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.
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:
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!