Page 2 of 3

Re: BH1750FVI Ambient Light Sensor

Posted: Sun Nov 13, 2022 6:24 pm
by jgu1
Thank´s Martin look forward to hear :D

Jorgen

Re: BH1750FVI Ambient Light Sensor

Posted: Mon Nov 14, 2022 7:17 pm
by jgu1
If long delivertime I can send one for you Martin :D

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 9:27 am
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

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 2:41 pm
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

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 4:18 pm
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.

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 4:37 pm
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

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 4:54 pm
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

Re: BH1750FVI Ambient Light Sensor

Posted: Tue Nov 15, 2022 7:34 pm
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.

Re: BH1750FVI Ambient Light Sensor

Posted: Wed Nov 16, 2022 6:58 am
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.

Re: BH1750FVI Ambient Light Sensor

Posted: Wed Nov 16, 2022 8:01 am
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.