Addressing 4 BH1750 Light Sensor

Hello guys! :slight_smile:

I'm having a new project with 4 BH1750 Light Sensors in an arduino.
In the discussion in this site: How can I set I2C adress? 路 Issue #7 路 claws/BH1750 路 GitHub, BH1750 only supports 2 addresses (0x23 & 0x5C). As I need to have reading from 4 BH1750, I probably should do some readdressing, in which I don't know how. Is there any way to do this?

I also have other idea which is to utilize the I2C bus and have another arduino read the other 2 sensors, acting as a slave. But I only have one arduino and probably can't afford to buy another. Thank you for the answer to my question above.

Is the "addr" pin of the chip exposed on your bh1750 module?
s-l300 (15).jpg

If so, you can use this pin to change one module to have one address and the other 3 have the other address. The Arduino sketch would only use the address with one sensor. To read each sensor, use 4 Arduino pins to control the address of each sensor. If you don't have 4 Arduino pins spare, use a pcf8574 chip or similar.

If the addr pin is not useable on your modules, you could use an "i2c bus multiplexer".

s-l300 (15).jpg

Yes the addr pin is visible. Thank you for the suggestion. I will try to do it but pcf8574 might be hard to find here in the philippines. Though, there are available on I2C lcds which I might try to desolder. Haha. :grin:

If you can get bh1750, you should be able to get pcf8574. They are very common. Lots of vendors on eBay, for the bare chips or modules.