Fork me on GitHub

Project Notes

#133 Bi-directional Level Shifter

Test a basic bi-directional 5/3.3V level shifter circuit



Voltage level-shifting is commonly accomplished with this n-channel MOSFET trick. It is the basis of level-modules and interface circuits. Here I’m interfacing 3.3V and 5V circuits.

Sparkfun have a great page describing the technique, and Philips Application Note AN97055 goes into the mechanics.

This is essentially how the bi-directional switching of voltage levels occurs:

  • When neither side is pulling down the input, the gate voltage is pulled up to the low-side voltage .. 3.3V in this case. The FET is not conducting, since gate and source voltages are equal. So both source and rain are at their respective high voltages: source: 3.3V, drain: 5V.
  • When low-side (source) is pulled down low, the source voltage is less than the gate so the FET turns on, and so high-side drain is also pulled low.
  • When high-side (drain) is pulled down low, the drain-substrate diode causes the source to also pull low.

Note that “high” voltages are only nominally the 3.3V/5V rails … these change as soon as other circuit elements are connected. Buffer circuits could be included to isolate and preserve full rail-to-rail swings on either side.

This circuit is a simple demonstration of a switch in the 5V circuit controlling a load (LED + resistor) in the 3.3V circuit. The circuit could be mirrored to demonstrate the bi-directional switching.



The Schematic

The Build

Credits and References

Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects. Two main themes have emerged in recent years, sometimes combined:

  • electronics - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting
  • scale modelling - I caught the bug after deciding to build a Harrier during covid to demonstrate an electronic jet engine simulation. Let the fun begin..
To be honest, I haven't quite figured out if these two interests belong in the same GitHub repo or not. But for now - they are all here!

Projects are often inspired by things found wild on the net, or ideas from the many great electronics and scale modelling podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.