What is the proper way to isolate the I2C lines of two devices where one is powered on and the other can be powered down? I'm not 100% sure if isolation is even necessary, but I suspect it is.

Here is a simplified explanation of what I am doing: I have a MCU and an RTC connected to each other via I2C. The MCU can be powered down while the RTC continues to be powered (the same 5v supply). The MCU and the RTC remain connected via I2C. Here is a rough diagram:

MCU and RTC connected via I2C

The first thought that came to mind was that I could use a MOSFET on each I2C line so that when the power is cut to the MCU, it severs the connection on SCL/SDA. Then I googled a bit and discovered TCA4311 which looks like it is basically built for this purpose. TCA4311 looks pretty interesting. I think pulling the EN pin to ground on the TCA4311 is all that is needed to sever the I2C lines.

I was hoping to get some feedback since I am a newbie. Does the TCA4311 sound like a good strategy? Or am I way off? Thanks in advance!

  • \$\begingroup\$ wouldn't an MCU that integrates the RTC be wiser here? And: what specifically are you trying to counter with this? you could then simply turn off everything but the RTC, and don't have to deal with a separate RTC? Also, doesn't your RTC need a power source on VBAT? \$\endgroup\$ – Marcus Müller Sep 16 '20 at 7:04
  • \$\begingroup\$ I'm using the RTC alarm to power on the MCU via a MOSFET. Resetting the alarm will cause the MCU to be shut down. I want the MCU to actually lose power and not just sleep. The RTC is connected to a 3v battery via the VBAT pin -- I was trying to eliminate noise in the diagram since I'm interested to learn more about the isolation aspect. I could imagine this scenario coming up with other devices. The MCU + RTC is just my use case. \$\endgroup\$ – kr4sh Sep 16 '20 at 7:15
  • \$\begingroup\$ again, MCUs with integrated RTCs exist and can be completely powered down but for the RTC part. And honestly, if power efficiency is any criterion, Arduino is the wrong platform, from start to finish. \$\endgroup\$ – Marcus Müller Sep 16 '20 at 7:28
  • \$\begingroup\$ RTC is supplied with lithium coin battery, no need to complicate things. It would be better to use a low power MCU, with supercap or tiny lipo battery with sleep mode, for example MSP430 or similar MCU. \$\endgroup\$ – Marko Buršič Sep 16 '20 at 7:34
  • \$\begingroup\$ Have a look: ti.com/tool/MSP-EXP430FR5994 board with supercap, you would have to add only a diode to have charge/use. The demo program sleeps, wakes, logs temperture in FRAM (ferroelctric RAM) and sleeps again. It covers all you needs. \$\endgroup\$ – Marko Buršič Sep 16 '20 at 7:52

What is the proper way to isolate the I2C lines of two devices where one is powered on and the other can be powered down? I'm not 100% sure if isolation is even necessary, but I suspect it is.

It usually isn't. You'd keep the MCU powered, but put it into "STOP" mode or similar, at which point it consumes no power (but for some nA or less for static leakage, just as your MOSFET would have some leakage).

But: you're using an Arduino, and neither is that even remotely a power-efficient platform, nor does the Arduino UNO specifically support much different power modi.

The main problem is that the arduino can't be "powered off" in the strict sense of the word: there's regulators wasting power as long as it's connected to supply voltage.

The solution on how to build a energy-saving circuit hence is, sadly, dropping your central component, the arduino, and replacing it with something that isn't as bad as an Arduino UNO for this.

While doing that: you could drop the separate RTC and just buy a microcontroller with a built-in RTC. It's really just the same: you connect a coin cell to the VBAT pin of the MCU and that's what you need to power the RTC when there's no main VCC. Modern MCUs use really little current in STOP modes, and quite possible negligibly little even in SLEEP modes¹, so the problems you're trying to solve here simply don't exist. Waking up the MCU from standby mode is something that the RTC can do without any special connections, and thus saves you space, components, probably power and almost certainly cost.

For example, my STM32F030xx here uses about 3 µA in sleep mode, which is about 1/50 of your RTC's standby current usage. You're really barking up the wrong power saving tree as long as you're using an Arduino.

  • \$\begingroup\$ Everything you said makes sense. I'm just getting started on my EE journey so I only have experience with the mainstream hobby MCUs like arduino + esp32 (so many great resources). I will be sure to checkout the STM32F030xx. I'm still curious how one would accomplish isolating the I2C lines in my poor-design situation. I think the answer from @Justme is what I was looking for. Thank you for the detailed responses and bigger picture view. \$\endgroup\$ – kr4sh Sep 17 '20 at 21:20
  • \$\begingroup\$ you can; there's bidirectional analog switch ICs, but really, that comes with its own problems (and power usage), and you don't have that problem. \$\endgroup\$ – Marcus Müller Sep 17 '20 at 21:24

The 10k pullup resistors must be on the switched 5V side, so when MCU is powered down, the bus will go to 0V too, and the pull-ups do not back-feed the MCU via the I2C bus.

Now, since it is not in the diagram but you say you have a battery on RTC VBAT, you can ask youself if it makes any sense to leave 5V always on at the RTC VCC so maybe all the 5V can be switched.

  • \$\begingroup\$ Thank you for pointing this out. I feel stupid for not realizing that the I2C pullups should be connected to the switched 5V side. This basically makes my question moot! The battery that is connected to VBAT is a 3v coin cell used as backup power for when the main 5v is disconnected. \$\endgroup\$ – kr4sh Sep 17 '20 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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