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.