Multiple Sensors

Hi, i want to know if i can connect 100 proximity sensors, like for example the AP3216 using the I2C Bus protocol. For what ive been searching the sensor has a default adress, and if i want to multiplex the sensors with the TCA9548A, i only have a maximum of 64 possible sensors do the (0x70-0x77) possible board adresses.

Thank you.

Ive been thinking about if its possible using regular mux´s like CD74HC4067.

you could use an Arduino with two I2C devices (e.g. Arduino Due) and a pair of TCA9548A

Thanks but im limited to work with what i have (a mega 2560)

you could try the Software I2C for the second TCA9548A

im thinking of using an analog mux/demux to switch the SDA pins of the sensors, while keeping SCL common to all.

prokiller1800:
im thinking of using an analog mux/demux to switch the SDA pins of the sensors, while keeping SCL common to all.

I think you will be asking for trouble in the long run using an analog multiplexer for digital signals. Sure it may work, but will it work well. There are many size digital multiplexers out here, Fairchild MM82C19 is 16:1.

what type of adversities will ocur with that. I intend to work with a clock of 1kHz since speed wont be a matter for me and have around 5 kohm pull up resistors in the lines so that parasitic capacitance wont affect the communication very much

I want to ask if there is any problem running 3.3 V I2c Sensors without any level shifter, since the arduino mega uses 5 V i2c communication

prokiller1800:
I want to ask if there is any problem running 3.3 V I2c Sensors without any level shifter, since the arduino mega uses 5 V i2c communication

You may have one of two issues.

  1. The 5V Mega may not detect 3.3V as a logic '1' (you would have to read the datasheet).
  2. The I2C may blow up when the 5V signal reaches the 3.3V sensor if the pins are not 5V tolerant. Again, you will have to read the datasheet for the maximum allowable input voltages.

If you find a 3.3V mutiplexer, you would only need one level shifter. Place the level shifter between the Mega and the multiplexer. The multiplexer and your 100 sensors would all be on the 3.3V side.