I2C conflict w/TCS34725 & TSL2591

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ibucky
 
Posts: 112
Joined: Wed Jan 11, 2012 10:40 pm

I2C conflict w/TCS34725 & TSL2591

Post by ibucky »

I'm using the TCS34725 (Color Sensor), TSL2591 (LUX sensor), and SI1145 (UV sensor) on the same Arduino. I've verified each work and are wired correctly. The TCS34725 and SI1145 work on the same Arduino. But the TCS34725 isn't found when I put the TSL2591 on the circuit.

All of the sensors have SDA connected to UNO A4, SCL on A5, v5 and ground

The SI1145 has a fixed I2C address (0x60).
The TSL2591 has a default I2C address of 0x29 and cannot be changed!
I cannot find the I2C default address of the TCS34725 - where would I find it? (

Code: Select all

https://learn.adafruit.com/adafruit-color-sensors/assembly-and-wiring
)

I'm assuming the TSL2591 (Lux) and the TCS34725 (color) have the same I2C address, which is causing the conflict. The TSL2591 cannot be changed, per the Adafruit docs (https://learn.adafruit.com/adafruit-tsl ... g-and-test). So where do I find the TCS34725 I2C address and how to change the I2C address of a sensor.

Or is this even my conflict issue?

Thank you

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: I2C conflict w/TCS34725 & TSL2591

Post by adafruit_support_rick »

The TCS34725 I2C address is listed on the product page under Technical Details:
This board/chip uses I2C 7-bit address 0x29.
Unfortunately, it can't be changed, either.

So, yes, you have an address conflict.

User avatar
ibucky
 
Posts: 112
Joined: Wed Jan 11, 2012 10:40 pm

Re: I2C conflict w/TCS34725 & TSL2591

Post by ibucky »

Thanks Rick

Are there any options? I'm ultimately going to be switching to a Mega, but if I remember there is only one set of SDA/SCL on the Mega also?

Otherwise, I cannot use a TCS34725 and TSL2591 on the same Arduino - correct?
Sorry for being dense, if that is the end answer, this just changes the project a good bit. Thus why I'm wondering out loud if there are any other options.

User avatar
ibucky
 
Posts: 112
Joined: Wed Jan 11, 2012 10:40 pm

Re: I2C conflict w/TCS34725 & TSL2591

Post by ibucky »

Ohhhh seems I picked the wrong Lux Sensor. The TSL2561 I2C address can be changed! Darn it, Live and Learn....

https://learn.adafruit.com/tsl2561/wiring
"The ADDR pin can be used if you have an i2c address conflict, to change the address. Connect it to ground to set the address to 0x29, connect it to 3.3V (vcc) to set the address to 0x49 or leave it floating (unconnected) to use address 0x39."

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: I2C conflict w/TCS34725 & TSL2591

Post by adafruit_support_rick »

You can look for a software I2C library. That way, you can establish a second I2C bus on a different set of pins. There is no other option.

There's this one:
http://playground.arduino.cc/Main/SoftwareI2CLibrary

User avatar
ibucky
 
Posts: 112
Joined: Wed Jan 11, 2012 10:40 pm

Re: I2C conflict w/TCS34725 & TSL2591

Post by ibucky »

Thank you Rick - while that looks like an option. I'm not sure it is an option for my skill set. Bit too muddy for my knowledge.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: I2C conflict w/TCS34725 & TSL2591

Post by adafruit_support_rick »

Actually, it just occurred to me that the Arduino Due has two I2C buses...

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: I2C conflict w/TCS34725 & TSL2591

Post by adafruit_support_rick »

Cool. Thanks for posting that!
@iBucky - does this help?

User avatar
ibucky
 
Posts: 112
Joined: Wed Jan 11, 2012 10:40 pm

Re: I2C conflict w/TCS34725 & TSL2591

Post by ibucky »

<<Just curious, what's your project? >>
My daughter's Science project. Recording Lux, UV, Temp/Humidity, and color samples of Algae growing in sample jars in an aquarium, using a relay switch to cycle lights on/off @12/hrs and taking sample pictures every 15mins with a pair of TTL camera. One with a Blue Filter (Instagram.org) hoping to take photos of the plants photosynthesis (disconnected the IR sensor/IR LED ring), second camera is taking non-filtered photos.

After writing my reply on 11/07/14 I realized my older daughter had a TSL2561 on her 'stalled' project. So we stole it - I mean borough it. Yup younger sister took older sisters stuff - the cycle goes on... But it's fair game as the older sister still hasn't noticed...

So she was able to finish the electronic part of the project and start recording data.

<<Attached is the Adafruit example sketch and library modified to use the SoftwareI2CLibrary for a tsl2591 attached to Analog2/3 for SDA/SCL.>>
Wow thank you for the example post! That was very kind. I will keep that for any changes. I've noticed the TSL2561 isn't as good as the TSL2591. But school science projects have tight deadlines and she doesn't have time to change it now. But again Thank you very much @ductsoup

User avatar
kevinagnes
 
Posts: 1
Joined: Fri Feb 05, 2016 5:42 am

Re: I2C conflict w/TCS34725 & TSL2591

Post by kevinagnes »

Recently the TSL2591 library was updated, so the TSL2591soft was outdated.
I've just updated the TSL2591soft Library. Now it's possible to use the TCS34725 using the A5 and A4 and a TSL2591 using the A3 and A2.

Cheers,
Attachments
tsl2591Soft.zip
TSL2591Soft_updated
(11.49 KiB) Downloaded 157 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”