As an example, the Nintendo Switch used I2C over a ~2m cable to communicate between the controller and nunchuck. Worked fine even in noisy household settings with wifi and microwaves and whatnot.
At work we've used sensors for data logging that communicate using I2C over distances more than 20 meters, using plain Cat5 cable.
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.
https://www.latticesemi.com/what-is-serdes
Someone else mentioned the PCA9615 which looks like it'd to the job.
https://learn.adafruit.com/adafruit-wii-nunchuck-breakout-ad...
Some thoughts:
- Agreed with not using I2C, I2C has been identified as a root cause in several cubesat mission failures: https://pure.tudelft.nl/ws/portalfiles/portal/10531886/art_3... and https://webapps.unsworks.library.unsw.edu.au/fapi/datastream... (yes clock stretching is evil). I2C should be banned for multi board communication
- Classic CAN have very small 8 byte MTU with frame preemption, which is actually useful for its intended purpose of time critical automotive data transfer. If that 4 byte brake packet is blocked by a 1500 byte packet then your car will crash and explode. But the tradeoff is that this makes it very slow for bulk data transfer