Author Topic: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?  (Read 620 times)

0 Members and 1 Guest are viewing this topic.

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 60
  • Country: no
I have an I2C bus connected to ATMEGA MCU.
The I2C is "normal", 3,3v , using open-drain and 10k pull-up resistors.

The slave devices work on higher voltage (24v) and in case of a mechanical fault, pinched cable, etc, there is a chance of 24v getting to SCL/SDA of the ATMEGA, which would be catastrophic for the MCU.

How can I protect the MCU from 24v on SCL/SDA ?
 

Online squadchannel

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: jp
  • deepl translate user
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #1 on: August 01, 2024, 10:52:39 am »
in case of a mechanical fault, pinched cable, etc, there is a chance of 24v getting to SCL/SDA of the ATMEGA,

If you have mechanical concerns, does this mean that you are using I2C for communication between several control boxes?

Given that, using I2C is a bad idea; I2C is a standard designed in the first place to communicate over short distances. It is not designed to communicate over distances of many meters.

CAN bus or RS422RS485 bus is the best choice, but if it must be I2C, an isolator can be used. Galvanic isolation using capacitors is available, but a better choice is an isolator using an optocoupler.

https://www.ti.com/isolation/isolated-interfaces/i2c/overview.html
« Last Edit: August 01, 2024, 11:14:28 am by squadchannel »
 
The following users thanked this post: Smokey, T3sl4co1l

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 6651
  • Country: ca
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #2 on: August 01, 2024, 10:59:13 am »
i would use some i2c conversion  with an nearby mcu  ... to rs422 485  lan  etc  ...

as stated   i2c  is not for lengthy communications

you need galvanic isolation, tvs diodes  etc ...
 

Offline OddTopic starter

  • Regular Contributor
  • *
  • Posts: 60
  • Country: no
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #3 on: August 01, 2024, 11:02:49 am »
the device is used for modifying existing hardware, and so needs to use I2C , but the users can cock up the integration. Therefore CAN and other bus'es, or just "don't fck it up" is not really a solution :)  - the device is made to handle humans, but the I2C is a weak point . - because - as you know: if an engineer tries to make something more idiot-proof, then the nature will just make a better idiot.  :)
 

Online Terry Bites

  • Super Contributor
  • ***
  • Posts: 2517
  • Country: gb
  • Recovering Electrical Engineer
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #4 on: August 02, 2024, 09:15:19 am »
Yeah. Not a bus that should ever leave the Box.
Have a look at a MAX485 and its freinds. For a couple of $ each. Perfect.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4355
  • Country: nl
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #5 on: August 02, 2024, 09:46:13 am »
When I2C is a must your best bet is to use galvanic isolation like squadchannel wrote. Second best would be to use big enough TVS diodes with a 3.6V rating since your logic levels are stated to be 3.3V and add some small series resistors to reduce the possible current.

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #6 on: August 03, 2024, 02:24:12 pm »
https://www.ti.com/isolation/isolated-interfaces/i2c/overview.html

There is a category for I2C isolators. IIRC there are version of I2C with and without clock stretching.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3857
  • Country: nl
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #7 on: August 03, 2024, 03:06:57 pm »
I agree with the others here. I2C is not really fit for running over cables. A few meters may still work, it's not designed for this, and reliability will get reduced. Lowering bitrates helps a bit here, but it is still simply a faulty designed product.

But that said, if you have to make do with an existing product / project then you can use PPTC fuses in the data lines, combined with suitable (TVS) diodes.

The TVS diodes prevent over voltages from damaging the IC's, while the PPTC fuses protect the TVS diodes from hard injected power supply voltage and high current overload.
« Last Edit: August 03, 2024, 03:13:57 pm by Doctorandus_P »
 
The following users thanked this post: Smokey

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: how to protect I2C from higher voltage - maybe a dedicated chip/buffer?
« Reply #8 on: August 03, 2024, 04:55:56 pm »
For longer cables you can also use i2C accelerator. It provide active drive also for the low to high transition.

https://www.analog.com/en/products/ltc4311.html
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf