brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kolia999
New user
Posts: 9
Joined: 15 Sep 2023, 09:04

brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

#1 Post by kolia999 » 24 Oct 2023, 16:40

The I2C scan shows a different address than the one on the device itself.
The sensor disables itself automatically.
Is there an error with my configuration (screenshots attached)?
Build: ESP_Easy_mega_20230822_normal_ESP8266_4M1M Aug 22 2023
Attachments
2023-10-24 16_35_36-Clipboard.png
2023-10-24 16_35_36-Clipboard.png (12.14 KiB) Viewed 1435 times
2023-10-24 16_35_03-Clipboard.png
2023-10-24 16_35_03-Clipboard.png (13.1 KiB) Viewed 1435 times
2023-10-24 16_32_42-Clipboard.png
2023-10-24 16_32_42-Clipboard.png (8.81 KiB) Viewed 1435 times

User avatar
Ath
Normal user
Posts: 3522
Joined: 10 Jun 2018, 12:06
Location: NL

Re: brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

#2 Post by Ath » 24 Oct 2023, 17:18

How is your wiring connected?
Preferably short wires, and proper termination resistors installed? (also not too low value, default should be 10kOhm each).
What is the Slow I2C speed set to, the default value 100000 Hz? (that's what it should be.)

Hmm, the Devices list shows the I2C address according to the driver and doesn't actually do a detection, except during initialization, and then it seems to fail, so the task is disabled.
Seems your hardware is something different (or not properly connected), at least that's what the I2C Scanner is showing, a BH1750 should be detected at 0x23, as it has a fixed I2C address (AFAIK).
/Ton (PayPal.me)

Ton_vN
Normal user
Posts: 303
Joined: 21 Oct 2016, 15:20
Location: Hengelo (Ov)/ NL
Contact:

Re: brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

#3 Post by Ton_vN » 24 Oct 2023, 22:44

(How) did you connect the ADDR-line of the Breakout?
Because the ADDR-pin actively sets the I2C-address to be found by the I2C-scanner of ESPEasy.

Readout for 2*BH1750 should be something like
0x23 BH1750 Lux Sensor
0x5c

User avatar
Ath
Normal user
Posts: 3522
Joined: 10 Jun 2018, 12:06
Location: NL

Re: brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

#4 Post by Ath » 24 Oct 2023, 23:29

Thanks Ton, for pointing out the secondary address of this sensor, slipped my mind and I didn't look in the sources for that.

But that doesn't explain why address 0x39 is shown, so let's see what the OP replies to our questions ;)
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: brightness sensor BH1750 is displayed with incorrect I2C address and is automatically disabled

#5 Post by TD-er » 25 Oct 2023, 12:10

The only reason I can think of why the I2C scanner could report 0x39 is that there is another I2C device connected to the I2C bus.
And the BH1750 is either not wired up correctly, not powered or not a BH1750.

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests