Author Topic: i2c bus isolation for un-powered AVR [SOLVED]  (Read 9535 times)

0 Members and 1 Guest are viewing this topic.

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
i2c bus isolation for un-powered AVR [SOLVED]
« on: February 14, 2015, 11:24:08 pm »
Hi all, I have a challenge that I have not been able to solve. Hopefully someone has seen and solved this before.

I have a system with multiple AVR MCUs on a few different PCBs. All of them communicate with TWI (i2c). One of the PCBs could be intentionally shut down as part of a safety response. The problem is when that AVR is shutdown, the i2c bus (SDA and SCL) is pulled low by the internal IO pin diodes.

I am trying to figure out a simple circuit with FETs that will block the i2c signals from entering the AVR when powered down. I added two N-Fets to the SDA/SCL pins oriented with the SOURCE to the AVR and the DRAIN on the i2c side of the FET. The GATE is driven HIGH by a 10v Zener circuit connected to the main power bus 17v.

The goal is that the when the 17v bus is on, the AVR powers up and the FETs bi-directionally pass the i2c data. If the 17v goes off, the FET's turn off and block the SDA/SCL from being grounded by the AVR. The question I have, is whether the SOURCE of the FET being tied to the AVR pin will be sufficiently grounded to where it will turn on with the gate being charged to 10v will actually create a Vgs of around 10v minus the diode drop.

ADD:
This is an I2C slave only. 5v.
R29 discharges the GATE when 17v is OFF
C13 is just a bypass cap.
Z1 is a simple limiter since 17v is close to the limits of the FETs and could go over.
« Last Edit: February 15, 2015, 09:04:15 pm by rx8pilot »
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2272
  • Country: gb
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: i2c bus isolation for un-powered AVR
« Reply #2 on: February 15, 2015, 12:27:18 am »
That seems to be a sure solve. Only downside is cost, but at least DigiKey stocks them at $4.70/100. I was looking at another pre-engineered low-cost isolator but availability was marginal.

Do you think the FET approach could work? If so, it a $.50 solution. No need for hot-swap, just need the i2c pins to be Hi-Z when the AVR is off. In the end, these will be produced in 1000's so if a reasonable low-cost option exists, I am motivated to find it.
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: i2c bus isolation for un-powered AVR
« Reply #3 on: February 15, 2015, 03:36:06 pm »
I'm not clear about how your multi-party situation works and how many devices among the set have independent power domains so you'll have to figure out if you need multiple IOFF specified isolators installed within each of the devices & power domains that can lose power or whether you can just isolate the unreliably powered network/party at a gateway location between it and the rest of the network which will continue to be powered or what.

If you can have multiple potentially independently powered / unpowered devices then you'll also need to supply the bus pull-ups from one of the powered on nodes regardless of the unpowered ones somehow.

There is one i2c MASTER that will always have power with 5 slaves. The PCB that could be shutdown, has an AVR slave and two special purpose slaves. The special purpose slaves go Hi-Z while not powered so they have no impact on the i2c bus. Only the AVR pulls the bus low when it does not have power.

FWIW I was looking at using the 2N7002 type N-CH ENH MOSFET  for my similar I2C switching with +8V VGS, I assume they may be rated to run off the ~+10V VG with 0V or 5V VS potential, but check if you're going to use them. No particular reason other than they're smal, cheap, generic, widely available, and just about OK for the purpose.  The VGSTH may be a little marginal at +4.5..+5VGS maybe not, I think it is "just ok", though there are some manufacturer specific differences that are significant as to the VGSTH and RON at VGS=+4.5V so you should check that if you qualify a particular part for the application.  There are more sensitive gate "logic level" FETs if needed.

Make sure your zener series resistor is low enough to pass enough current that the zener is beyond the "knee" of its increasing current with a flatter IV curve and more flat voltage beyond that current level, otherwise you'll have a more variable (may be higher or closer to 10V) gate voltage than the 10V you intend.  Maybe closer to 1mA.  Check the data sheet.

It appears the 2N7002 has been replaced by the DMN65D8LDW. I still have some of the 7002's, and they seem to be the same - at least for this purpose. The Vgs cn go up to 20v. Maybe I should use a 15v Zener so that I always have 10v above the +5 state. My biggest question is this: when the AVR is powered up and the TWI/i2c bus is configured, those pins should go Hi-Z. If this is the case, the Vgs would not matter becuase the SOURCE pin is effectively floating. Does that sound right?

Maybe put weak pull-ups between the source and the AVR like this to ensure the FET will actually turn on.



 
Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3231
  • Country: gb
Re: i2c bus isolation for un-powered AVR
« Reply #4 on: February 15, 2015, 07:36:13 pm »
Have a look for I2C hot swap buffers such as the NXP PCA951x (x=1,2,3,4)
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: i2c bus isolation for un-powered AVR
« Reply #5 on: February 15, 2015, 09:02:29 pm »
Have a look for I2C hot swap buffers such as the NXP PCA951x (x=1,2,3,4)

"hot swap buffers" is the critical key-word, finally got that. thanks.

Looks like TI, Linear, NXP are the most well known, but there are a bunch of options for these components. The TI is under $1 which is appealing and it will work far better than what I have so far. They all seem to be in relatively huge SOIC-8 packages, but I can deal with that.

Choice for prototype: TI TCA4311ADR

Solved. Thank you for the help.

Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3231
  • Country: gb
Re: i2c bus isolation for un-powered AVR [SOLVED]
« Reply #6 on: February 17, 2015, 01:31:30 pm »
No problem, glad I could help.  As an aside, some of these buffers have built in logic that will attempt to automatically clear a stuck bus.
 

Offline rx8pilotTopic starter

  • Super Contributor
  • ***
  • Posts: 3634
  • Country: us
  • If you want more money, be more valuable.
Re: i2c bus isolation for un-powered AVR [SOLVED]
« Reply #7 on: May 08, 2015, 05:39:44 pm »
Just an update on this topic. The TI solution worked perfect through prototyping and will continue on into production. Does a great job keeping the TWI/I2C bus clear until the MCU is ready for it.

Factory400 - the worlds smallest factory. https://www.youtube.com/c/Factory400
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26682
  • Country: nl
    • NCT Developments
Re: i2c bus isolation for un-powered AVR [SOLVED]
« Reply #8 on: May 10, 2015, 03:57:45 pm »
Hi all, I have a challenge that I have not been able to solve. Hopefully someone has seen and solved this before.

I have a system with multiple AVR MCUs on a few different PCBs. All of them communicate with TWI (i2c). One of the PCBs could be intentionally shut down as part of a safety response. The problem is when that AVR is shutdown, the i2c bus (SDA and SCL) is pulled low by the internal IO pin diodes.
If this is bit-banged I2C be aware that Vih and Vil levels can be terrible (for I2C) on Atmel devices which results in EMC problems with longer I2C busses. Better use a microcontroller which has real I2C pins and doesn't load the bus when powered off.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf