Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My goal is to replace a DPST on pullup resistors with something simple, cheap and very small that can be activated with the I2C bus voltage. I thought that this might be a common enough requirement that I would find a simple IC for this task, but after hours searching through datasheets I am not finding a solution as ideal as my gut suggests should exist.

The question on how to Use GPIO for switchable Pullups of I2C has the basics of the thing I am trying to achieve on a very small PCB. I don't necessarily want to use a GPIO to turn the pullups on and off, my goal is flexibility of the design so the pullups could be turned on by a single jumper or a GPIO.


simulate this circuit – Schematic created using CircuitLab

Inspired by the Bus Pirate which does something similar using a CD4066BC, quad bilateral switch I found the TC7W66F, dual bilateral switch which vaguely fits my price and space goals but I imagined something similar to a SOT-23 package.

The question mentioned above has an answer suggesting using FETs and I did find some dual FET packages with source already tied together that seemed like they might work but I'm primarily a software guy and have to admit not feeling 100% comfortable using something like this without further advice, or if it would require further components killing my space desires?

share|improve this question
Is there any reason why you have to use the switch at all and couldn't just connect the 'top' of each resistor to your I2C-PU point? – brhans Jan 20 at 0:48
@brhans, that works fine when you want the pullup, when you don't then you effectively have R1+R2 across your SDA and SCL lines which is not exactly desirable. – DanSut Jan 20 at 0:53
Why do you sometimes not want the pull-ups connected? I2C is pretty much designed around the pull-ups always being there. – The Photon Jan 20 at 1:00
@ThePhoton the PCB contains a couple of I2C components and can be plugged into other boards (where MCU and/or other I2C stuff live) that may or may not already be providing I2C pullup – DanSut Jan 20 at 1:03
@DanSut You would still have a problem when several breakout boards are plugged in and each has got pull-up resistors that are not under your control. Here's a write-up about this very issue. – Nick Alexeev Jan 20 at 1:08
up vote 12 down vote accepted

I would suggest "prebiased" BJTs

Dual MOSFETs tend to have a lot of Drain-Source capacitance which will affect the rise time of your I2C bus. BJT switching transistors tend to have less. For example, these ones have Cob of only 3pF typically at 10V (it will be 2-3 times higher at low voltage, which they don't tell you and you're supposed to know) but that's still pretty modest. Add the pullup resistors to the collectors, the emitters to Vdd, and connect the bases to your /enable line and you're done (one part plus the resistors, and the package is only 2.0 x 2.1mm). Very cheap in volume, and not much worry about ESD.

enter image description here


simulate this circuit – Schematic created using CircuitLab

So why not MOSFETs?

They're lower resistance, right? Well the saturated BJTs will drop 50~100mV most likely at the currents you'll be using them (compares well with 4066 switches), and compare the output capacitance of an FDS6312P MOSFET (Coss)- typically several hundred pF near 0V, which is nearly as high as the 400pF maximum for all devices on the bus itself.

enter image description here

share|improve this answer
+1 for comparing the FET output capacitance to the I2C bus maximum. Well done. – bitsmack Jan 20 at 3:10
+1 Interesting comparison. Definitely worth considering over the MOSFETs. Given they have pretty much identical size/pinout you could do one design and have an easy choice as to which best suits the requirements. This approach would also eliminate any necessary pull-up resistor reducing the circuit down to just one component – Tom Carpenter Jan 20 at 3:21
I never even considered the capacitance factor so this answer is much appreciated in educating me. The CBT3306 switches I was looking at don't graph capacitance like this, so do I assume as they are built using FETs that I they will see the same issue in the way I'd be using them? – DanSut Jan 21 at 13:26
@DanSut Actually they don't look terrible at all 6.45pF typical at 3V, so still should be tolerable at low voltage (maybe ~20pF). Very low series impedance (5 ohms), but that's irrelevant here- not so if the switch is in series. The problem is that many dual MOSFETs are designed to have very low Rds(on) and to carry amperes of current, so they're ill-suited. It's not so much that MOSFETs are used (4066 are MOSFETs too) it's that they are big MOSFETs. You can think of them as scores of little MOSFETs in parallel so the resistance decreases with 1/n and the capacitance is proportional to n. – Spehro Pefhany Jan 21 at 15:28

One option is two P-Channel MOSFETS. These can be connected as follows:


simulate this circuit – Schematic created using CircuitLab

Basically, if you use logic level MOSFETS you can feed the EN_n (not-enable) signal with +V volts to disable the pull-up resistors, and 0V to enable them. When disabled the resistors will essentially not be there. You will have body diodes from the I2C lines to V+, but those shouldn't cause any issue.

As @bitsmack points out, you could also add an optional pull-up resistor (R3) on the EN_n pin which would keep the MOSFETS disabled if the pin is left floating. This would allow the input to be open drain - simply short to ground to enable, or leave floating to disable.

It is possible to get very small (SOT23-6 or SOT23-5) packages which contain two P-Ch MOSFETS (e.g. this) which can then be wired up as shown above - usually they are arranged in ways which make routing quite simple. You can basically join the gates together and sources together making a very small essentially 4-pin package. Even if you throw in the pull-up resistor as say an 0603, the whole circuit would probably be smaller than a 2x2pin 0.1" jumper.

share|improve this answer
@dansut If you do this, I suggest putting a pullup resistor from each MOSFET's gate to V+... This way the I2C pullups won't turn on before your EN_n signal is asserted (i.e. before the microcontroller configures and asserts its pin state) – bitsmack Jan 20 at 2:16
@bitsmack one would do as the gates would be directly connected. I'll add it in to the circuit as it would mean that the whole thing could be controlled in an open drain kind of a way. – Tom Carpenter Jan 20 at 2:18
Yes, very true :) – bitsmack Jan 20 at 2:20

Practical approach

All the breakout boards I'm plugging together are under my control [...]

Keep it simple. Rip out the I2C pull-up resistors from every breakout board that you have. Install pull-up resistors with reasonable values on the microcontroller board.

my basic desire is to be able to turn-on the PU where I want it with a single jumper rather than 2

Trying to reduce the number of jumpers from 2 to one is lots of do beyond diminishing returns, if I may say so myself.

If a practical approach does not appeal

You can do something along the lines of active constant-current pull-up circuit.

active constant-current I2C pull-up



Any general-purpose small-signal PNP transistor would do.

share|improve this answer
In the back of my mind I knew that I would probably get an answer like your practical one - I appreciate your answer and reasoning and it may be the direction I eventually take. Thanks also for providing the alternative, investigating this will undoubtably improve my knowledge in this area. – DanSut Jan 20 at 13:21

How about just using an I2C bus accelerator with an enable, like the LTC4300A-1 enter image description here

This can isolate parts of the bus, and is meant to do so. The downside is that you need your pullups on both sides. The upside is you wouldn't have to wonder!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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