6

enter image description here

In the image above, could someone please tell me what the MOSFET is doing? From what I gather, it is there for switching between the VCC_in and the regulated voltage, in conjunction with the SDA and SCL lines. However, if all the components are receiving the regulated 3.3V from the voltage regulator (IC1) then why is the MOSFET needed? Is it if you were to be using a microcontroller which runs off 5V, and thus the SDA/SCL lines are also at 5V? Thus they need to be switched down to 3.3V?

I'm trying to recreate this design, but the input voltage is already regulated to 3.3V as the PIC I'm using is powered and needs 3.3V anyway. I've taken the regulator out I'm wondering if I can take the MOSFET out too.

ritchie888
  • 490
  • 2
  • 13

2 Answers2

5

They're bidirectional level shifters. You can remove them only if the 3V3 pins are 5V-tolerant and if the 5V pins can accept 3V3 signals properly.

Ignacio Vazquez-Abrams
  • 48,282
  • 4
  • 73
  • 102
  • Thanks for your response. All components run off 3.3V, as does my PIC and everything else in my circuit. Where does 5V come into this? The schematic picture I posted allows an input for up to 16V, which explains the MOSFET and regulator, but in my adaptation everything is 3.3V. That being said, the TDO and TCK pins on the PIC are 5V tolerant. – ritchie888 Jun 10 '13 at 16:25
  • 2
    Possibly from your `EX_S*` pins, which I presume go off to some external circuit which may run at a different level. – Ignacio Vazquez-Abrams Jun 10 '13 at 16:28
  • Here's an [application note](http://www.adafruit.com/datasheets/an97055.pdf) that gives the theory behind this technique. There is even one which can be powered down on one side, without disturbing the rest. – D.J.W. Jul 08 '14 at 18:35
3

It appears to be a level shifter, to support external I2C components with a voltage different from the internal 3V3. If everything is 3V3 you don't need them, just keep one of the 4K7 resistors in each line since those are open-drain.

fceconel
  • 2,659
  • 22
  • 19
  • Thank you! I have removed all of the MOSFET now; I already had external 5.6K pullup resistors on the SDA and SCL for the open-drain. – ritchie888 Jun 10 '13 at 16:32
  • 1
    If you're going to run I2C at 400 kHz or 1 MHz, you'll want significantly lower pull-up resistances. 2.2 kOhm or even 1.5 kOhm would give you a cleaner signal at higher frequencies. (Check with a scope) – Jon Watte Jun 10 '13 at 17:38
  • Thank you, I've changed them to 1.5K as I'm running at 400Mhz. – ritchie888 Jun 14 '13 at 10:22