Check the continuity of your DuPont cables. Maybe you have a bad one?
Everything else you have is correct.
Check the continuity of your DuPont cables. Maybe you have a bad one?
Everything else you have is correct.
Continuity is good.
It’s a mystery…
Try a different i2c clock frequency, 100kHz, 200kHz or 400kHz.
Nope, same error!
Anything else you can think of?
Could I have some dodgy GY-302s?
I bought three off aliexpress at the same time.
Nope. I’m completely out of ideas.
Without an oscilloscope to check the i2c clock and data lines I cant think of anything else you can do.
Ok, thanks anyway for your help.
As you can probably tell that is way above my level
Maybe I’ll some more. Are they generic or if not perhaps someone could tell me exactly what they are using (and where it came from)?
I ordered mine so long ago that the order no longer appears on my Aliexpress account.
In the meantime there is another BH1750 sensor arrived from AliExpress which is also very nice and works great
@tom_l I have a question about the power cable to the board. What is your advice about the correct cable to use? The cable will be from the casing with the board and sensor to the inside of the roller shutter box and will then go to the inside of the house.
And more important how thick should those 2 wires be? 0.5 mm2 each wire? Or could it be much thinner? I think the total length of this power cable will be 4 meter.
This will be in total connected:
The BH1750 uses next to no current at all (190uA max) so the cable can be very thin without dropping any voltage over a couple of meters.
A good cable to use would be rated for outdoor use like 2 pair outdoor telephone cable (as long as it is secured against vibration as it has solid conductors). It’s very cheap, e.g. 2 Pair External Telephone Cable per mtr | MJS Electrical Supplies
Okay so you don’t advice me to buy this kind of wires? (It is very thin and don’t have protection on the 2 wires)
And the reason to choose for that telephone cable is that you have also the data cables inside instead of only the power? So you could easy program the board from the inside of the house (when you don’t use ESPHOME but your own c++ sketch).
Can you explain me what the difference is between this signal cable and the telephone cable?
I will cut a standard micro usb cable. So the cable (signal/telephone) will be soldered on those 2 plugs (micro usb and USB-A) and the power will be like this (5v 1A):
I installed one and it worked perfectly!
Here is my code:
i2c:
sda: GPIO4
scl: GPIO5
scan: True
# Example configuration entry
sensor:
- platform: bh1750
name: "BH1750 Illuminance"
address: 0x23
update_interval: 10s
Note D1 is GPIO5 and D2 is GPIO4.
I’m going to also make a version with a transparent front and the BH1750 sensor.
But I was wondering how you have installed the BH1750 sensor in the case? Do you have glue it on the back of the front lid or on a different way?
@tom_l Do you have a picture how you have installed it in the case?
can you show this box in place? I have this box and Pg7 glands which I think are large for this, while you are using GN12 glands.
There’s a picture here:
I’m 5000km from home so can’t take a better one.
you are using Fresnel lens for this sensor.
Yes. I swapped over to that version a year or so ago when I rebuilt it.
how did make this setup water proof?
Silicone sealant around the fresnel lens onto an ip65 box and gland.
used this version of bh1750?
Yes a very similar model from Aliexpress.