3

I have three light sensors TSL2591, of signal I2C, that I need to connect (together) to an Arduino Mega. However, I'm not very sure of how share the SDA and SCL pins of the three sensors and I don't know how to change their address for the Arduino to read and show the data of each sensor.

I have already read sensor's datasheet but there is not much information about this.

1
  • 1
    ` there is not much information` ... what information is there? ... also, please add a link to the data sheet to your question (do not put the link into comments)
    – jsotola
    Jul 3, 2018 at 1:27

1 Answer 1

5

Looking at the datasheet, the TSL2591 does not appear to have a comfigurable address mechanism, therefore you are most likely obliged to use an I2C Multiplexer.

One example of such a device is the TCA9545A, Low Voltage 4-channel I2C and SMbus Switch With Interrupt Logic and Reset Functions, that can split one I2C line into 4 buses.

TCA9545A pinout

They are very easy to use and the pinout (and datasheet) are self explanatory.

Don't forget that you will need 3k3 Ω resistors on the INT, RESET, SDA and SCL lines from the Arduino and on each of the INTx, SDx, and SCx lines from the TCA9545A:

TCA9545A Typical Application Schematic

1
  • 1
    Adafruit has a module with the TCA9548A. The advantage is that these multiplexer chips will also do level shifting for sda and scl. That is needed because the arduino mega is a 5v board and the sensor is a 3.3v sensor. An arduino mega has 10k pullup resistors. Pullup resistors for all the sensors should still be added if they are not on the tsl2591 module.
    – Jot
    Jul 3, 2018 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.