Hello,
I have a I2C adress problem with my two I2C devices. When I use only my BH1750 light sensor the system working fine. I can read the light value and I can see the I2C adress of the light sensor. But when I add the BME/BMP 280 pressure sensor the value read for the two sensors is now 0 and when I look the I2C adress the screen look like this:
I think I have a I2C adress conflict.... if my understanding is good how can I change the I2C adress of my one or two I2C device ?
TIA
Pierre
Hello Angelo, It’s a win !!!! I just receveid a few minutes ago my first order for the BMP 280. I put the new sensor in my Arduino I2C scanner and read 0x76 adress. Yes. I carefully connect (in paranoiac mode) the sensor on the hat board and I read only one I2C device (0x76) in the i2C adress list. After that I go to setting and now I can read the value of the sensor. Wonderful. You are write the I2C adress was wipe out of the sensor. I will made the same test with the BH1750 but I’am pretty shure I will have the same result. I let you know. Thank you very much for support Pierre
Hello Angelo, I’am pretty shure the problem is with the two sensors. Your explanation make sens to me. In fact I have two setup. One in the greenhouse et one on my test bench. In the both case I have Raspberry pi 3 and your Automation Hat 10.4, 8 relays board and same brand sensor. Same config from a backup and same OS version. And finilay you guest it same result…. Here is a photo of my test setup on my bench and the arduino I2C scanner I use to test the I2C adress. Since I plug and un plug at least un million time my sensors is very possible that I sort the ground and the SDA pin and erase the I2C adress. When I will receive my new sensor I will take extra care to not short this 2 pin and I hope this will solve one for all my problem. I let you know Pierre
Hello Pierre, From the test, we can exclude a configuration problem, because both sensors are not able to provide their address. The BH1750 seems not answering anymore, the BME seems to short the SDA to negative.
https://raspberrypi.stackexchange.com/questions/32719/i2cdetect-shows-every-possible-address/32720#32720
We can assume this is an hardware problem, either on the I2C bus, which is made of 4 wires VCC,SDA,SCL,GND or the sensors have been fried. For the I2C bus it is important to check the wiring also on the board, sometimes some dirt can change the isolation between the wire lines. For the sensors, may them be broken due to wrong cabling? I know you should have checked the wiring hundreds of times by now. But can you send a picture of the sensor connected to the board. I just broken a bh1750 yesterday by wrongly connecting the pins.
Hello Angelo,
I tried your suggestion and... it's not working. Here is the steps I follow:
1) I taked a backup of my config
2) Unplug all the sensors except the board of 8 relays
3) In hardwaresetting select and apply the config temp+hum+8 water
4) Reboot
5) I cannot check the adress list because I had no I2C sensor connected and in this case the bouton Chow adress list not appear
6) I plug the BH1750 GY-302 (Brand Keen so piece number keensogkmyo0uzr).
7) check to see if I2C adress is prensent but the bouton Show device adress list won't show. Is not detect I2C device
7) I added in the hardwaresetting the setting for light according to your image. It's appear in setting and receiving the error message when I tried reading de value: Generic error BH1750. Also the BH1750 not appear int the show adress list. Bouton not present
8) Unplug the Bh1750 and reboot
9) Plus th BMP280 (GYBMEP brand IndustrielField piece number IF-modulen_11364)
10) the bouton Show device adress appear but with "all I2C adress in the world" :-)
11) I add in hardwaresetting the setting according to your image. The device appear in the setting list but read always 0 and now I also read 0 without generic error for the BH1750 (weird...), But in the Show adress device I had akways all the I2C adress in the world.
12) I rebbot again but nothing change
I will try with the new sensors next week when they arrive.
Pierre
Hello Angelo, I just received my new BME/BMP280and I have the same problem. I have two I2C cables. On for the BH1750 and one for the BME/BMP280. I can switch the BH1750 from one cable to the other cable whitout problem. The problem is not with my cables. But when I plug the BME/BMP280 the two sensors stop working. I think my problem is with the hardware setting of my BME/BMP280. Can you send me what is the hardware setting I must use in the hardware setting configuration page for the BME/BMP pressure. Here is my setup P.s. I Know my BME/BMP280 sensor is not connected in this photo… TIA Pierre
Hello, Well, the list of I2C addresses should include only the connected sensors, not all the possible I2C addresses. Agree is the sensor issue. I have the same sensor that you posted in the photo, the 5v or 3.3v I think is the same hardware anyway.
Hello, When only BH1760 is connected I see this image in Show devices adress First photo. When both devices or only BMP280 is connect I see not only two I2C device but many hundred adress of the devices including 0x76 and 0x77. See the next image. When the BMP280 in not connected I received the message Generic error BME280. I dont know why I have this error message. Maybe it’s because the system can reach the BMP280 chip since is not plug in. See the next image for the system message. In the Show devices adress I can see again the adress of the BH1760 device 0x23. Now here is the photo of my pressure device. Accordind tomthe data sheet this device is a 5 v dc device. I use your Hat board rev 10.4. What is the voltage the pressure sensor must use ? Pierre
Hello, Sound strange you can see both the addresses, normally it would be only one either 0x76 or 0x77. Can you post a picture of the sensor? Maybe it has a pin for the address selection that should be set to ground. Anyway in the Hardwaresetting you can use the address field to specify the address of the sensor, you can try to put 0x76 or 0x77. But First better to understand why you have two addresses for the same sensor. The sensor may be ok
Hello Angelo, Yes I see 0x76 and 0x77 in the list. When the two devices was connected On tje same bus I have no error message but I read 0 as value in the both device. My conclusion is that my brand new BM280 is the problem. I will order a new one and try again. What brand do you use ? This device must use 3.3 v or 5 volt dc ? The device I use is 5 v dc. Pierre
Hello, The configuration is ok. Is the Address still having problems? Do you see the address 0x76 in the address list? If the address is not working as you showed in the screenshot then all the I2C devices will not work because they share a common bus.
Hello Angelo Since your response I made some new tests. Your right when I connect only the BH1750 I can read the value without problem for the BH1750. The I2C adress is 0x23. I made the test with the two cable I use on each of the two I2C port and the BH1750 working fine. But when I look the port where the BMP is not connected I receive the following message Status: Error: I2C connection of the BME280 not able to start setting I think my hardware setting for the BME280 is the problem. Here is my setting. Is my setting is right ? Pierre
Hello,
sure there is something going on with the I2C addresses.
Anyway I do not think this is a address conflict, as the BMP should have the address 0x76 or 0x77 and the BH1750 should have 0x23. You can google it. In my house I have both of them working together without problem.
Sometimes it can be a wrong wiring or a bad sensor causing errors to the addresses.
I suggest to connect only the BME sensor and disconnect the BH1750 to see if the problem with the addresses persist.
If I remember correctly the BH1750 has the possibility to change the I2C address by connecting one of its pin to ground. Changing the I2C address is a feature that depends on the sensor.
Regards,
Angelo