# How is this circuit for level converting (5V<>3.3V) working?

Does anybody know, how is this circuit exactly working? It is level converter between 5V and 3.3V logic and it is bi-directional.

I have some theory, but I am not sure with it (I never worked with MOSFET before). And what is that diode for?

I take this image from SparkFun's datasheet (level converter).

• Sorry for this question. It was easy to google the answer. I found this document — Level shifting techniques in I2C-bus design (PDF) which describes this circuit in section 2.1.1, page 4. And it seems, I cannot answer my own question, because I have small reputation. Oct 1, 2011 at 15:20
• Check if you can answer your question now. You probably are able. I am trying to find that restriction in the list. Oct 1, 2011 at 16:26
• It say "users with less than 100 reputation can't answer their own question for 8 hours after asking". So I'll answer this question later. Oct 1, 2011 at 18:05
• Okay, A time delay I can understand for users that do not know the system yet. Please take the time to answer it when you can! Oct 1, 2011 at 18:28

## 1 Answer

When no device is pulling down the line, the "left side" (with lower voltage) is in high state by pull-up resistor. The voltage between the gate and the source is below the threshold voltage and MOSFET isn't conducting. So the "right side" (with higher voltage) is pulled up by pull-up resistor too.

When the "left side" pulls down the line to a low state, the voltage between the source and the gate rises above the threshold and MOSFET starts to conduct. So the "right side" is then pulled down to a low state via the conducting MOSFET.

When the "right side" pulls down the line, the diode between the drain and the gate connects the "left site" to low state, causing the MOSFET to conduct, so both sides are pulled low to the same voltage level.

More detailed description is in Level shifting techniques in I2C-bus design (PDF) in section 2.1.1, page 4.

If I made some mistakes, feel free to correct me.

• Can you summarize it here? Oct 3, 2011 at 19:40
• Done. I edited my answer. Oct 4, 2011 at 9:16