Level translation 3.xV <=> 5V

Go To Last Post
53 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can also use a BSS138 or similar Low Gate Threshold Voltage N-channel MOSFET, instead of a NPN BJT. 2N7002 has been suggested earlier in this topic, it has a a maximum Gate Threshold Voltage of 2.5V, so it could become an issue to turn it on by pulling down the the gate through the internal diode from the 5V side. (Vtreshold + Vforward: 2.5V + 0.7V = 3.2V)
BS138 has a maximum Gate Threshold Voltage of 1.5V and is therefore easier to turn on by pulling down the the gate through the internal diode from the 5V side.
Philips recommends to use a MOSFET with a threshold voltage of about 1 Volt below the lowest VDD1. So for 3.3V the maximum threhold voltage should be 2.3V, which is not met by 2N7002.
BSS138 datasheet: http://www.fairchildsemi.com/ds/...
2N7002 datasheet: http://www.fairchildsemi.com/ds/...
Using a MOSFET will also make it possible to use for bi-directional signals instead of just unidirectional. Philips/NXP recommends this as level conversion for the bi-directional I²C-bus in AN97055.
But if use for bi-directional singnals both outputs should be open colletor to avoid one port pulling the signal high while the other pulling it low.
But for unidirectinal signals lines like in SPI that wont be a probelm as only one end controls the signal level.

http://www.sparkfun.com/commerce...

NXP AN97055 Bi-directional level shifter for I²C-bus and other systems http://www.standardics.nxp.com/s...

Quote:
2.3.1 Description of the level shift operation.

For the level shift operation three states has to be considered:

    • State 1. No device is pulling down the bus line and the bus line of the “Lower voltage” section is pulled up by its pull-up resistors Rp to 3.3 V. The gate and the source of the MOS-FET are both at 3.3 V, so its VGS is below the threshold voltage and the MOS-FET is not conducting. This allows that the bus line at the “Higher voltage” section is pulled up by its pull-up resistor Rp to 5V. So the bus lines of both sections are HIGH, but at a different voltage level.

    • State 2. A 3.3 V device pulls down the bus line to a LOW level. The source of the MOS-FET becomes also LOW, while the gate stay at 3.3 V. The VGS rises above the threshold and the MOS-FET becomes conducting. Now the bus line of the “Higher voltage” section is also pulled down to a LOW level by the 3.3 V device via the conducting MOS-FET. So the bus lines of both sections become LOW at the same voltage level.

    • State 3. A 5 V device pulls down the bus line to a LOW level. Via the drain-substrate diode of the MOSFET the “Lower voltage” section is in first instance pulled down until VGS passes the threshold and the MOS-FET becomes conducting. Now the bus line of the “Lower voltage” section is further pulled down to a LOW level by the 5 V device via the conducting MOS-FET. So the bus lines of both sections become LOW at the same voltage level.

The three states show that the logic levels are transferred in both directions of the bus system, independent of the driving section. State 2 and state 3 perform the “wired AND” function between the bus lines of both sections as required by the I²C-bus specification.
Other supply voltages than 3.3V for VDD1 and 5V for VDD2 can be applied, e.g. 2V for VDD1 and 10V for VDD2 is feasible. In normal operation VDD2 must be equal to or higher than VDD1.
The MOS-FET’s allow that VDD2 is lower than VDD1 during switching power on/off, of course the bus system is not operational during that time.
The maximum VDD2 is not critical as long as the drain of the MOS-FET can withstand this voltage. At a higher VDD2 a slower falling edge for both bus sections has to be taken in account, both in state 2 and state 3, because it takes more discharge time of the bus line.
The lowest possible supply voltage VDD1 depends on the threshold voltage VGS(th) of the MOS-FET’s. With a threshold voltage of about 1 Volt below the lowest VDD1, the level shifter circuit will operate properly. If for example the lowest VDD1 is 3 Volt, a threshold voltage VGS(th) of maximum 2 Volt is allowed.

Sparkfun sell a tiny PCB with the Philips/NXP AN97055 MOSFET type level converters:
http://www.sparkfun.com/commerce...
http://www.sparkfun.com/datashee...

Another application note about level conversion: http://www.maxim-ic.com/appnotes...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AndersAnd wrote:
You can also use a BSS138 or similar Low Gate Threshold Voltage N-channel MOSFET, instead of a NPN BJT.
After some research into different kinds of converter chips, I decided to use the BSS138 MOSFET solution for a future project. In all I need level converters for 16 different signals including ISP, JTAG, TX/RX, and SPI.

I plan to use the BSS138DW (dual mosfet) which comes in a very small SOT363 (SC70-6) package ($0.41 for 10) along with a 4x0603 resistor array (< 1 cent each). For 16 signals this requires 8 mosfet chips and 8 resistor arrays.

--Mike

Pages