EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Psi on March 21, 2024, 10:57:08 pm

Title: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: Psi on March 21, 2024, 10:57:08 pm
Has anyone seen a I2C RGB light sensor where its i2c address can be configured with 3 of it's i/o pins?

I want to put 6x SMT i2C light sensors on a little PCB in a row as part of a test jig to verify the 6 LED on the DUT are working and are the right color, which means all need different i2C addresses.  I've been through looking at RGB light sensors datasheet but none had reconfigurable addresses for operation on the same bus.
Title: Re: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: mikeselectricstuff on March 21, 2024, 11:25:48 pm
How about routing all  LEDs with an optical fibre or light guide into one sensor and lighting one at a time?
Title: Re: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: PCB.Wiz on March 21, 2024, 11:57:26 pm
The OPT4060 shows 4 address choices, and you could try the swapped SCL/SDA trick to double the parts on a i2c bus ?
Title: Re: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: MarkT on March 23, 2024, 09:42:27 am
Not heard of that trick - does it always work?
Title: Re: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: fchk on March 23, 2024, 09:52:49 am
Has anyone seen a I2C RGB light sensor where its i2c address can be configured with 3 of it's i/o pins?

I want to put 6x SMT i2C light sensors on a little PCB in a row as part of a test jig to verify the 6 LED on the DUT are working and are the right color, which means all need different i2C addresses.  I've been through looking at RGB light sensors datasheet but none had reconfigurable addresses for operation on the same bus.

Use a PCA9547 I2C Multiplexer. This splits out one I2C bus into eight subbusses where only one is active at a time. This allow you to have 8 devices with the same address - each on a single subbus. Selecting a subbus is also done by I2C, so no extra IOs are needed.

https://www.nxp.com/docs/en/data-sheet/PCA9547.pdf (https://www.nxp.com/docs/en/data-sheet/PCA9547.pdf)
Title: Re: I2C RGB light sensor that supports at least 6 configurable device addresses
Post by: Psi on March 23, 2024, 01:35:02 pm
How about routing all  LEDs with an optical fibre or light guide into one sensor and lighting one at a time?

Thinking outside the box. I like it.

Use a PCA9547 I2C Multiplexer. This splits out one I2C bus into eight subbusses where only one is active at a time.

Cool, i might use that