5
\$\begingroup\$

I'm quite new to this. I have just basic background in electronics. So I would appreciate an advice from someone more experienced.

I would like to connect an i2c display to my tp-link wr703n (ar9331) router gpios. Router is running linux and uses kernel module to simulate i2c interface using gpios. The display is hd44780 connected to the pcf8574 i2c expander.

The display operates at 5V while gpios are probably 2.5v+-10% tolerant. I checked the datasheet of ar9331 but not sure what is maximal voltage for high level. There some reports of people having gpio pin pulled up to 3.3V and running it just fine. So I'm not sure about the pullup voltage on the gpio.

But anyway I probably need some level shifter. I tought I could do something like this.

Vc1 2.5V? ---------------       ------------ Vc2 5V
                 |      |       |   
                 X      |       X   
            4k7R X      |  4k7R X      
                 X      |       X   
                 |      |       |   
 gpio-7 --------------[FET]------------------ pcf8574

same for gpio-29

I'm not sure which N-FET to use for this. Usually people use 2n7000 which has typical Vgs threshold 2.1V but maximum is 3V. So I guess this one could not work properly if the threshold of used FET would be 2.5V or more.

And is this good thing to do anyway?

EDIT2: I've added better picture of the circuit.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
7
  • \$\begingroup\$ ti.com/product/txb0102 \$\endgroup\$ Commented Nov 1, 2013 at 13:27
  • \$\begingroup\$ nxp.com/documents/application_note/AN10441.pdf assuming the proper fet is used seems all fine \$\endgroup\$
    – Gorloth
    Commented Nov 1, 2013 at 15:00
  • \$\begingroup\$ @Gorloth OPs asking for the proper fet to use for his voltage level... \$\endgroup\$
    – Passerby
    Commented Nov 1, 2013 at 15:22
  • \$\begingroup\$ You are right, this will not work if the threshold of the MOSFET is larger than one of the supplies, and it will not work 'optimally' unless the threshold voltage of the MOSFET is small, compared to the the smallest voltage level in your system. To find a suitable MOSFET for this application, electronics.stackexchange.com/questions/36529/… may help you. \$\endgroup\$
    – deadude
    Commented Nov 1, 2013 at 16:17
  • 1
    \$\begingroup\$ An older Philips AppNote lists the requirements against the FETs to be used: adafruit.com/datasheets/an97055.pdf I'd consider FDV301N or FDV303N for this task, BSS138 might as well work. \$\endgroup\$ Commented Nov 1, 2013 at 19:37

1 Answer 1

3
\$\begingroup\$

There are specialized ICs for I2C level translation. PCA9306 (down to 1.8V),TCA9517 (down to 0.9V), FXMA2102 (down to 1.65V). IC level shifter would be my choice.

@Laszlo had mentioned AN97055 by Philips (now NXP).
Excerpt from that app note (p.13).

3. CHARACTERISTICS OF THE MOS-FET’S.

The requirements for the most important characteristics of the MOS-FET’s, used as bi-directional level shifter in an I2C-bus system with max. 6V and min. 2.7V levels, are listed below. The values are intended as an indication and may be adapted for other supply voltages, other logic levels and/or other applications.

Type : N-channel enhancement mode MOS-FET.
Gate threshold voltage : VGS(th) min. 0.1V max. 2V
On resistance : RDS(on) max. 100 Ohm @ ID = 3mA, VGS = 2.5V
Input capacitance : Ciss max. 100 pF @ VDS = 1V, VGS = 0V
Switching times : ton toff max. 50 ns.
Allowed drain current : ID 10 mA or higher.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.