Hi Guy’s, I have a number of esp32 mini boards (www.amazon.co.uk/dp/B093GQGJCV?psc=1&ref=ppx_yo2ov_dt_b_product_details
), and was thinking of making a light sensor with them, but don’t seem to be much out there, about wiring up and configuring, any help much appreciated
Hello
any idea how accurate is that sensor? How long cable can be used between sensor and esphome board?
Thank you!
Google the specs yourself.
There are three types of measurement modes for BH1750. H-resolution mode2 takes 120ms for measurement and has an 0.5 lx of resolution. H-resolution mode also takes 120ms for measurement but its resolution is 1 lx. L- resolution takes 16ms for measurement and its resolution is 4 lx. H- resolution mode is more useful in darkness and it can also easily reject noise.
I²C was designed to be a bus between integrated circuits on a single PCB. However, it’s often used to communicate with devices on a different PCB over a cable distance reaching some feet. For the traces on the PCB, many design tools offer the possibility to calculate the trace capacitance. For standard ribbon cables, this value is typically given in the datasheet as a capacitance per foot of 10 to 15 pF. Additionally, having the bus travel over several feet of cable to different PCBs can result in a noisy signal caused by EMI, which can also lead to communication failure.
If you must use long cables for I2C, use untwisted cables. Twisted or shielded cables have significantly higher capacitance per foot than untwisted. Anything more than a couple of feet is into the experimental zone. It works for some, and not others.
Using an ESP32 for a single sensor like the BH1750 is sort of like buying a Ferrari to go to the local grocery store. Once a week. But it is not a bad board for learning to build your own sensor devices. (Personally I use the Wemos D1 Mini).
@stevemann thank you so much for your complex answer.
The reason behind is “simple”, i have rooms with 3.4m ceilings, and bunch of the aqara fp1 sensors for a movement.
I found out these sensors read lx only when there is a movement, but because they are placed mostly in the corners of my rooms the reading is i believe very inaccurate.
So my thinking was - lets create own light sensor that i can install into the bottom of the chandelier in room … ie center of the room; in the 1m above ceiling … so that might produce “accurate” reading.
To connect sensor with esphome board it will be around 5.5-7m.
Maybe my thinking was completely wrong and there is a better way how to do this.
thanks
7M would be “iffy”. Try it on the bench with the intended cable.
What are you trying to accomplish that accuracy is needed? Is there a reason the Lux sensor couldn’t be co-located with one of the motion sensors?
@stevemann
well the motion sensors are placed in corners and too high… so the light intensity is there different compare the rest of the room.
In that case there is no way properly measure light intensity somewhere in the middle of the room?
thanks
The light intensity will be different in every location in practically any room in any house. Why is accuracy so critical?
I am using a BH1750 in my attic to determine one thing- the lights are on or they are off.
@stevemann well i believe in the middle of the room; in 2.4m you can have some reference reading of the light in the room.
Based on the mentioned reading you can automate remaining … intensity/ type of the lights etc etc.
Motion sensors dont have precise reading … in case placed in the corner … far away from the windows , the reading is pointless.
Thanks
@stevemann any idea thanks!
What’s the question?
@stevemann was wondering if its fine if i place it somehwere in the middle of the room for a reference reading lets say refreshing reading each 5sec.
thx
I will repeat my earlier question:
Add to that, the light levels will change with weather, season and hour. It will rarely be the same intensity twice with any predictability.