Electrical – Cascaded i2c address translators

addressingi2c

I am trying to connect many (~80) ToF distance sensors VL53L0X onto a single i2c bus. They have the default i2c address 0x52, which is programmable, but not persistent. Thus I have a choice between selective turn on/off of sensors (via GPIO expansion on i2c etc) and reprogram each individual address at startup, or have the addresses translated on-the-fly in hardware. This is about the second option.

There would be the translator T (something like LTC4316, but preferably one without voltage dividers) always between the sensor S and the bus, like this, each translator set for a different address, of course:

master ---+---+---+---+
          T   T   T   T
          S   S   S   S

Now I would like to be able to connect another identical modules like this one after another, but to prevent address clashes, each module would have a translator N at the beginning:

(--  module 1 --)     (--  module 2 --)      (--  module 3 --)

M---+---+---+---+ === M---+---+---+---+  === M---+---+---+---+
    T   T   T   T         T   T   T   T         T   T   T   T
    S   S   S   S         S   S   S   S         S   S   S   S

Module 1 would be translated by M, module 2 by MM, module 3 by MMM and so on, for example like this (with sensor address 0 for simplicity, T adding 1, M adding 4)

global address        4  5  6  7     8  9 10 11   12 13 14 15
module-level address  0  1  2  3     0  1  2  3    0  1  2  3
sensor address        0  0  0  0     0  0  0  0    0  0  0  0

I would like to have a comment whether this is a good way forward logically, whether it makes sense electrically and perhaps even a suggestion for IC similar to the LTC4316, with translation address selectable by pulling pins high/low.

Best Answer

It sounds expensive and resource intensive to have one address translator for each sensor. Perhaps you could use an I2C controlled analog switch instead, and just switch the SCL to each of the sensors so that they don't see any commands when disconnected.

For example, the Linear Tech LTC1380 is an 8:1 I2C controlled analog mux that can also be disabled to have no analog connection.

You could just parallel two of the LTC1380s to split SCL into 16 different paths and then put another LTC1380 on each of the 16 paths to talk to 8 different sensors on each of the 16 clock paths.

Another possibility is to keep 7 mux channels on each board and pass one to the next board. The next through boards would also have 7 on board and one pass through. The ~100 ohm resistance of the analog switch would eventually cause problems, but you could probably get away with at 4 levels deep with 4.7K pullup resistors. After 4 levels you run out of addresses for the muxes anyway.

If you combined the two methods, you could have an 8:1 at the top level talking to 8 3 deep chains with 7 senors each, giving you 8 * 21 = 168 sensors.

To help with maintaining signal quality, you could perhaps combine the analog muxes with the LTC-4302, which is basically a programmable connection between two I2C busses that can have 32 different pin programmed addresses. It also has rise time acceleration, which could help with long busses.

No matter what you do, make sure that you do not exceed the I2C capacitive loading specs (~400pf). Splitting up the busses can help with that.