Consider you have two devices designed to be I2C masters in same bus. However, only one of them is operational at a time and the other one is completely powered down. In my case the devices have internal pull-ups on SDA/SCL so when one device is powered off, it'll effectively kill the whole bus which is obviously not good.

It should be super simple to just severe powered down device's SDA and SCL lines from the bus when it's VCC is low, and re-attach them when it's VCC is high. Like a relay switch. But when I try to google for what I think I need, I get some big mains voltage relay stuff which (while I guess it could work) is a bit too dumb for my taste. My devices and I2C bus are 3v3.

There must be a word or technical term I'm missing here. What am I looking for and where to buy one piece of that component?

  • \$\begingroup\$ Would using external pullups not solve this problem? This would mean that your pullup is no longer tied to a specific device power state, and will be much simpler than trying to implement some kind of relay scheme. \$\endgroup\$
    – Platytude
    Feb 4, 2019 at 18:43
  • 1
    \$\begingroup\$ I think I2C Level Translator is the search term you want \$\endgroup\$
    – MarkU
    Feb 4, 2019 at 18:47
  • \$\begingroup\$ @Platytude Somehow in my mind forcing the line up while it has some dead device there as a drag sounds far more problematic. Is there really no "3v3 level relays" or something? 3v3 controlled 3v3 line switch? \$\endgroup\$ Feb 4, 2019 at 18:48
  • \$\begingroup\$ It's quite possible that this could happen, I2C was never designed with powered-down slaves/masters in mind. You may find that an I2C buffer or level shifter will work for you: ti.com/interface/i2c/level-shifters-buffers-and-hubs/… \$\endgroup\$
    – Platytude
    Feb 4, 2019 at 18:55
  • \$\begingroup\$ @MarkU Thanks. With that I found PCA9306 and with that this: banggood.com/… However, does "High Impedance between ports" basically mean that "severed line" I was looking for? If so I guess this would be my answer. \$\endgroup\$ Feb 4, 2019 at 19:00

2 Answers 2


I am not too convinced that using an external relay is a good solution, but to answer your question, the terms to look up are "low voltage signal relay"

Mouser has a few: https://no.mouser.com/Electromechanical/Relays/Low-Signal-Relays-PCB/_/N-5g38/

You have not specified a part number for the two masters, but I presume that they are a microcontroller of some kind. Most of these devices, usually allow to turn off the pullups, which means that all that you need to do is to have them externally.

Alternatvely, maybe something like a dual I2C bus buffer could help, or a level translator which can be enabled/disabled at will, might even work better.

  • \$\begingroup\$ Heh.. that Mouser's table is a bit scary for a dummy. I'm basically looking for some electronewbie -solution. Other one of the masters is Raspberry Pi Zero and then other one is Arduino Pro Mini. RPi without power completely kills the bus. I just tried to simplify my case. I'll take a look at those alternative suggestions and if i can find something presoldered. \$\endgroup\$ Feb 4, 2019 at 19:06
  • \$\begingroup\$ Ok, I now understand what it is happening there. The Atmega328p which is on the Arduino, has protection diodes internally, which means that when you remove power, the I2C bus will effectively try power up the Arduino through these diodes. Nothing you can do about it. Do you have to power it down? can't you put it to sleep instead? Here is a relay that would work in your case. no.mouser.com/datasheet/2/212/KEM_R7001_EA2_EB2-1103823.pdf \$\endgroup\$
    – Elmesito
    Feb 4, 2019 at 20:12
  • \$\begingroup\$ Actually arduino is always powered but it's the RPi that might not be. RPi has pull-ups which default states are high so when it has no power I guess it drags the lines down or something. My reasoning here might be completely off though. \$\endgroup\$ Feb 4, 2019 at 21:13
  • 2
    \$\begingroup\$ No, the issue is exactly the same with the RPi. All ICs have diodes to protect the internals from ESD strikes. IF you just need a simple solution, just use the relay. \$\endgroup\$
    – Elmesito
    Feb 4, 2019 at 21:50

Simple analog multiplexer can be used to isolate bus segment.


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.