I'm trying to solve the following problem:
"How to connect 3 to 8 I2C sensors with the same address over 16-20 metres in a daisy-chain with 1 cable without having to deal with address clashes or wire length limitations? RS485 is not an option."
Steps:
1. One-cable requirement was easy to fulfill using CAT5e with RJ45 connectors:
2. To deal with the cable length, I plan to use PCA9615 I2C buffer for differential I2C over CAT5e, allowing ~50m of cable length. According to its datasheet, PCA9615 is completely transparent to all I2C devices on the bus, and requires no data overhead.
3. To handle address clashes, I'll add TCA95462 I2c Switch with 8 pin-selectable I2C addresses (using A0,1,2 pins)
The preliminary design comes up as such:
- PCA9615 I2C buffer for differential I2C over CAT5e, allowing ~50m of cable length.
- TCA95462 I2c Switch with 8 pin-selectable I2C addresses (using A0,1,2 pins) to allow "changing" of I2C address for devices that have only one available hardcoded address.
- HTU21D temperature sensor as the test I2C device. Address 0x40, hardwired.
Red, black and blue wires are CAT5 connector pins.The diagram does not include pull-up resistors for clarity.
My understanding of its operation is :
MCU sends "Enable" command signal to the device 0x00 (example). PCA9615 carries signal over long wires to the TCA95462 switch that has the address 0x00 (left). TCA95462 now opens its channel 0 where HTU21D (address 0x40) is connected, effectively connecting it with the master. TCA95462 switch with the address 0x01 (right) will not react, and effectively physically isolates the second HTU21D (address 0x40) from being interacted with by the master.
Could anyone who has ever used these chips, or faced the similar problem provide feedback on the feasibility of this design, my understanding and its current implementation? Thank you.
P.S: Please excuse the lousy circuit diagram, I was on a work laptop.