Jorgen
BH1750FVI Ambient Light Sensor
-
jgu1
- Posts: 844
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 738 times
- Been thanked: 186 times
-
medelec35
- Matrix Staff
- Posts: 2148
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 725 times
Re: BH1750FVI Ambient Light Sensor
Hi guys.
Thanks for the offer Jorgen.
I have got these devices and worked the first time and every time using Arduino UNO.
For me, there is not an issue with the component.
Next time you have an issue, have you got a logic analyzer so you can check the I2C data?
It might also be worth measuring the voltage on the address line to make sure it is either 5V or 0V
Thanks for the offer Jorgen.
I have got these devices and worked the first time and every time using Arduino UNO.
For me, there is not an issue with the component.
Next time you have an issue, have you got a logic analyzer so you can check the I2C data?
It might also be worth measuring the voltage on the address line to make sure it is either 5V or 0V
Martin
-
jgu1
- Posts: 844
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 738 times
- Been thanked: 186 times
Re: BH1750FVI Ambient Light Sensor
Hi Martin!
That Sound strange? I bougth this one : https://www.ebay.de/itm/252725768417 should they be similar? Also strange it work with one time measure.
And as Chipfreyer Said it work with pic devices.
I already have test the 5v But I Will check an Extra time.
Jorgen
That Sound strange? I bougth this one : https://www.ebay.de/itm/252725768417 should they be similar? Also strange it work with one time measure.
And as Chipfreyer Said it work with pic devices.
I already have test the 5v But I Will check an Extra time.
Jorgen
-
medelec35
- Matrix Staff
- Posts: 2148
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 725 times
Re: BH1750FVI Ambient Light Sensor
If you would like to post your flowchart that has the issue, I can test it with my sensor.
I have tested in both continuous and one-time modes on ESP32 with no issues.
I have tested in both continuous and one-time modes on ESP32 with no issues.
Martin
-
jgu1
- Posts: 844
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 738 times
- Been thanked: 186 times
Re: BH1750FVI Ambient Light Sensor
Of course Martin Herby.
I added reset after one time Measurement then at least I see it change value but display always show 0 and the value 0 and value.
Maybe you will share yours
I added reset after one time Measurement then at least I see it change value but display always show 0 and the value 0 and value.
Maybe you will share yours
- Attachments
-
- Change port.fcfx
- (10.87 KiB) Downloaded 416 times
-
- One time.fcfx
- (12.43 KiB) Downloaded 423 times
-
chipfryer27
- Valued Contributor
- Posts: 1757
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 387 times
- Been thanked: 598 times
Re: BH1750FVI Ambient Light Sensor
Hi
My initial testing was done on a PIC and is documented elsewhere along with Martin's assistance.
As per previous above, on a Nano it would only really work with OneTimeMeasurement. I didn't bother with analysers as I had put it down to a potential Arduino related bug.
When I get a chance I'll either scope the pins or connect an analyser. I've found my Uno too so will document PIC/Nano/Uno.
Regards
My initial testing was done on a PIC and is documented elsewhere along with Martin's assistance.
As per previous above, on a Nano it would only really work with OneTimeMeasurement. I didn't bother with analysers as I had put it down to a potential Arduino related bug.
When I get a chance I'll either scope the pins or connect an analyser. I've found my Uno too so will document PIC/Nano/Uno.
Regards
-
medelec35
- Matrix Staff
- Posts: 2148
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 725 times
Re: BH1750FVI Ambient Light Sensor
Hi Jorgen.
Thanks for your project files.
I have made some modifications for you.
Just a couple of observations.
You are using the LCD in software mode.
You can connect the LCD to the same pins and the BH1750FVI and use in channel1 mode.
You have one project file with the address set to low, and the other with the address set to high.
If the hardware does not match the component properties, then the results will always be 0.
Thanks for your project files.
I have made some modifications for you.
Just a couple of observations.
You are using the LCD in software mode.
You can connect the LCD to the same pins and the BH1750FVI and use in channel1 mode.
You have one project file with the address set to low, and the other with the address set to high.
If the hardware does not match the component properties, then the results will always be 0.
- Attachments
-
- Change port v2.fcfx
- (11.46 KiB) Downloaded 444 times
-
- One time v2.fcfx
- (11.95 KiB) Downloaded 395 times
Martin
-
jgu1
- Posts: 844
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 738 times
- Been thanked: 186 times
Re: BH1750FVI Ambient Light Sensor
Hi Martin!
Thank you. When I start test the sensor I also have display and sensor on channel 1. To be sure that nothing conflict I change the display to software
and other input.
Just seen your post now and I have a looooong workday today and maybe not home before tomorrow. I will definitely test the program with the changes you have made and look forward to it, but I can probably not give you an answer until late evening today or tomorrow.
Br Jorgen.
Thank you. When I start test the sensor I also have display and sensor on channel 1. To be sure that nothing conflict I change the display to software
and other input.
Just seen your post now and I have a looooong workday today and maybe not home before tomorrow. I will definitely test the program with the changes you have made and look forward to it, but I can probably not give you an answer until late evening today or tomorrow.
Br Jorgen.
-
medelec35
- Matrix Staff
- Posts: 2148
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 725 times
Re: BH1750FVI Ambient Light Sensor
Hi Jorgen.
I2C devices with different addresses connected to the same pins should not conflict.
I2C devices with different addresses connected to the same pins should not conflict.
Not a problem at all.
Martin