Electronic – Bidirectional level swiching 5V <-> 3.3V


I am looking to interface a 3.3V device with a 5V one. This will require the shifting of the logic levels between the two devices.

Doing this in one direction is a trivial matter, but I need to do it in both directions (reading and writing – it's a data bus).

I know there are bus drivers that can do this but I'm a skinflint, so I'm looking to see if I can do it with the discretes I have at my fingertips.

I came up with this circuit:

enter image description here

I don't know if it will actually do what I want, but from reading other sources (including Is it possible to drive TTL inputs from 3.3v microcontroller and Bi-Directional Step up and Step down (3.3v <-> 5, etc) [the latter mentions a sparkfun tutorial that no longer exists]) it might.

My thinking is, data from 5v to 3.3v goes through D2 and the series resistor R2 to drop the voltage. Data from 3.3v to 5v goes through D1 and gets pulled up by R1.

Would this work? Is it complete gibberish?


Ok, so we have agreed that circuit is total gibberish.

I have made some tweaks, and come up with this:

enter image description here

Playing around with my scope gives me levels of around 1V-4V on the +5V side, and 0V to 3V on the 3.3V side. Both sides default to a high level and connecting to ground on one side causes a low level on the other side.

The resistors are all 10KΩ, and I have had both ends feeding through 100KΩ resistors to simulate some form of load. The diodes are all Schottky.


Best Answer

I think the easiest circuit that does what you want would use a N channel MOSFET like the bss138 and two pull-ups, hooked in the following way:

5-3.3V level converter

Tell me if it doesnt fit your needs, and why.

Having said this, I have to recommend you to take a look at the MAX3000 series of level converters. I have used them before and they are great bidireccional converters that "simply work" (in apple terms).

Hope it helps.

edit: It seems like the image appears broken with some browsers, you can see it here

Related Topic