Re:Show HN: We Made The World's Smallest and Cheapest Networ...
by TaylorAlexander on Sunday June 16, 2024 @04:40AM
(#40695618)
Thanks for this! I recently designed a sensor board that connects to our main board with I2C, and in chatting with an EE about it she mentioned I2C is not intended for intra-board use. I just put a scope on the signals yesterday and they seem okay. The cable is only 15cm long, and it connects to a multi-use port which would be difficult to make work with differential signals in addition to the other things that port can do. I’ll keep an eye on it but maybe it’s okay.
[ Parent
| on HN ]
Re:Show HN: We Made The World's Smallest and Cheapest Networ...
by kenz0r on Sunday June 16, 2024 @05:19AM
(#40695759)
If you _must_ use I2C, then look at SMBUS if its an option for the parts. I2C's biggest failing is that there is no protocol level timeout, so one stuck device can block your entire bus unless you have a reset line for all the peripherals on it.
https://www.analog.com/en/resources/design-notes/guide-to-co...
Re:Show HN: We Made The World's Smallest and Cheapest Networ...
by fl7305 on Sunday June 16, 2024 @09:39AM
(#40696983)
Classic I2C problem. After your CPU resets, at least clock out a bunch of cycles onto I2C to get interrupted I2C transactions to finish.
Re:Show HN: We Made The World's Smallest and Cheapest Networ...
by TaylorAlexander on Sunday June 16, 2024 @02:43PM
(#40699134)
Ooh this is great to know thank you!
Re:Show HN: We Made The World's Smallest and Cheapest Networ...
by crote on Sunday June 16, 2024 @10:19AM
(#40697264)
I2C doesn't really care about cable length all that much. The thing to keep in mind is the interplay between bus capacitance, pullup strength, and drive strength.
A longer cable means more bus capacitance, which means with the same pullup resistor the signal rise time will be higher, which means you need to reduce the bus speed. A stronger pullup will reduce the rise time (allowing a higher bus speed), but each chip's driver has to be able to overpower the pullup too. If the pullup is too strong for the drivers, you end up being unable to send a zero.
In practice your cables can be quite long, you just have to run it at a lower speed. If you really want to push it, there's always transceivers like the PCA9615 which turn it into a differential bus.