BH1750FVI Ambient Light Sensor

For general Flowcode discussion that does not belong in the other sections.
jgu1
Posts: 797
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: BH1750FVI Ambient Light Sensor

Post by jgu1 »

Thank´s Martin look forward to hear :D

Jorgen

jgu1
Posts: 797
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: BH1750FVI Ambient Light Sensor

Post by jgu1 »

If long delivertime I can send one for you Martin :D

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: BH1750FVI Ambient Light Sensor

Post by medelec35 »

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
Martin

jgu1
Posts: 797
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: BH1750FVI Ambient Light Sensor

Post by jgu1 »

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

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: BH1750FVI Ambient Light Sensor

Post by medelec35 »

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.
Martin

jgu1
Posts: 797
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: BH1750FVI Ambient Light Sensor

Post by jgu1 »

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 :D
Attachments
Change port.fcfx
(10.87 KiB) Downloaded 384 times
One time.fcfx
(12.43 KiB) Downloaded 400 times

chipfryer27
Valued Contributor
Posts: 1614
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: BH1750FVI Ambient Light Sensor

Post by chipfryer27 »

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

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: BH1750FVI Ambient Light Sensor

Post by medelec35 »

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.
Attachments
Change port v2.fcfx
(11.46 KiB) Downloaded 411 times
One time v2.fcfx
(11.95 KiB) Downloaded 368 times
Martin

jgu1
Posts: 797
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: BH1750FVI Ambient Light Sensor

Post by jgu1 »

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.

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: BH1750FVI Ambient Light Sensor

Post by medelec35 »

Hi Jorgen.
I2C devices with different addresses connected to the same pins should not conflict.
jgu1 wrote:
Wed Nov 16, 2022 6:58 am
but I can probably not give you an answer until late evening today or tomorrow.
Not a problem at all.
Martin

Post Reply