Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Voltage level translation

2009-04-08 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "Roy E. Burrage" <RBurrage@...> wrote:

> ... The intent was to address some
> of the issues brought forward by the
> occasional digital only folk who
> subscribe to this list.

OK, there are no other hot threads running right now, so let's chat about this.

I think the only logic level translation problem that doesn't have a number of straightforward solutions is the bi-directional, three-state one where there is no signal to explicitly give the direction of logic flow across the translation boundary.  This occurs, for example, if you want to connect two I2C busses running at different logic levels.

The generally proposed solution is a variation of the uni-directional translator using an N-Channel MOSFET in common-gate mode.  This has you connect the input to the MOSFET source, the gate of the MOSFET goes to the input side logic supply and the drain of the MOSFET has a pullup resistor to the output side logic supply and becomes the output.  A low level on the input (source) turns the MOSFET on (assuming you have a device with a sufficiently low threshold), which connects the output to the low input and there you are.  A high on the input puts the source and drain at the same voltage so the MOSFET turns off and the resistor pulls the output high.

In the bi-directional variation, "input" and "output" are replaced with "left" and "right".  The source also has a pullup to the "left" logic supply.  The gate has to be connected to whichever logic supply is lower.  The theory is now that if either side is pulled low, the MOSFET terminal connected to that side will act as the source, the other side will act as the drain and the MOSFET will turn on, connecting the undriven side to the low from the driven side.  If both sides are high, the MOSFET will be off and the pullup resistors will raise both sides to logic one.  So, you have a sort-of wired-AND arrangement, spanning two (or more) different logic levels.

My question for the non-"digital only" folk is this ... will just about any MOSFET (with an appropriate threshold) perform well in this circuit?  I understand that the beginner-level textbook structure of a MOSFET is symmetrical with respect to source and drain, but there must be some difference in practice with devices designed for specific purposes.  How should I choose a MOSFET for this application?  For example, the manufacturer tells me the gate-to-source threshold voltage and (as mentioned above) this is an important parameter here.  I have no idea what the threshold will be when the drain and source terminals are swapped, but this is just as important.

Graham.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.