The BH 1750 ambient light sensor operates on the S2C protocol which much be setup before using this device. Review this section for setup.
While the Pi is powered down, connect the sensor like the following diagram:
Once you’ve connected the device and booted, now proceed to add the sensor from Light Sensor → BH1750
Note that the Address and Bus are separate entries. Be sure that you select the proper address as displayed in the graph. If you are not sure, you can run the i2i2cdetect command and see what the graph says:
i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
In our example it is 23 on bus 1.
Once added, the client will display how many Lux the sensor is being exposed too:
In some cases the BH1750 sensor might not receive enough power from the breakout board or ribbon cables. i2cdetect will show devices if they are receiving enough power, however if none is shown, or you get an entry of 00 someplace in the matrix, your device might not have enough power to run.
Here is a small chart from Wikipedia that provides some reference for the Lux unit.
Source: Wikipedia (https://en.wikipedia.org/wiki/Lux)
Illuminance (lux) | Surfaces illuminated by |
---|---|
0.0001 | Moonless, overcast night sky (starlight) |
0.002 | Moonless clear night sky with airglow |
0.05–0.3 | Full moon on a clear night |
3.4 | Dark limit of civil twilight under a clear sky |
20–50 | Public areas with dark surroundings |
50 | Family living room lights |
80 | Office building hallway/toilet lighting |
100 | Very dark overcast day |
150 | Train station platforms |
320–500 | Office lighting |
400 | Sunrise or sunset on a clear day |
1000 | Overcast day, typical TV studio lighting |
10,000–25,000 | Full daylight (not direct sun) |
32,000–100,000 | Direct sunlight |