how to protect I2C  from higher voltage - maybe a dedicated chip/buffer? - Page 1
Forum section: electronics / projects

author: Odd
author_rank: Regular Contributor
timestamp: August 01, 2024, 08:54:25 am
content: 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 ?

author: squadchannel
author_rank: Frequent Contributor
timestamp: August 01, 2024, 10:52:39 am
content: Quote from: Odd on August 01, 2024, 08:54:25 amIf 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 orRS422RS485bus 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

author: coromonadalix
author_rank: Super Contributor
timestamp: August 01, 2024, 10:59:13 am
content: i would use some i2c conversion with an nearby mcu ... to rs422 485 lan etc ...as stated i2c is not for lengthy communicationsyou need galvanic isolation, tvs diodes etc ...

author: Odd
author_rank: Regular Contributor
timestamp: August 01, 2024, 11:02:49 am
content: 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.

author: Terry Bites
author_rank: Super Contributor
timestamp: August 02, 2024, 09:15:19 am
content: 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.

author: pcprogrammer
author_rank: Super Contributor
timestamp: August 02, 2024, 09:46:13 am
content: 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.

author: zapta
author_rank: Super Contributor
timestamp: August 03, 2024, 02:24:12 pm
content: https://www.ti.com/isolation/isolated-interfaces/i2c/overview.htmlThere is a category for I2C isolators. IIRC there are version of I2C with and without clock stretching.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 03, 2024, 03:06:57 pm
content: 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.

author: zapta
author_rank: Super Contributor
timestamp: August 03, 2024, 04:55:56 pm
content: 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