hello
i'm working on a greenhouse project and i need to 'measure' the sunlight intensity, so that for a given intensity (too bright) i can activate the shadow system.
how to get this done? using LDR, solar cell or BH1750FVI? or other option.
i will be using the esp32.
I use the MAX44009.
If you do not need to measure the intensity of the sunlight accurately in lux, but only test if it is above or below an adjustable threshold, then an ldr is fine.
Whatever sensor you use, you will need to build some hysteresis and damping into the circuit, using either hardware or software, to prevent constant triggering of your shadow system on partly cloudy days.
That MAX44009 seems a very good sensor, it can measure up to 188000 lux, which is an enormous amount of bright light.
However, they call such sensors "ambient" light sensors for a reason. They are not meant to measure the strength of sunlight.
Only a solar cell can be used in direct sunlight. It is an easy and simple solution.
Use its output via a protection resistor (1k to 10k) to an analog input.
If you want to measure the lux, then you need a sensor under a grey dome-shaped filter and keep the sensor cool.
The MAX44009 does not get damaged by direct sunlight according to the datasheet. It has an operation temperature up to 85 °C. That is very high for a sensor, but I still suggest to put it under a grey filter.
A LDR is often used, but it will be permanently damaged with a high temperature when used in direct sunlight.
A LDR is often used, but it will be permanently damaged with a high temperature
Thanks, I didn't know that. Luckily I only used ldr for ambient light level monitoring, for dimming displays etc.
For sunlight measurement, I use a BH1750 that fits under a small white translucent plastic dome. I expect the UV will destroy the plastic eventually. Here you can see some typical results, including some long periods where I forgot to replace the batteries, and lost data.
PaulRB:
I use a BH1750 that fits under a small white translucent plastic dome. I expect the UV will destroy the plastic eventually.
Not if its polyethylene and specifically non-biodegradable polyethylene. This is a great material for diffusers
as it transmits heat radiation as well as visible light and is UV safe (unlike many plastics). The prismatic
domes over PIR motion sensors are polyethylene and would be suitable (they diffuse in visible light
so the prismatic shapes don't function like they do for passive IR.)
The BH1750 can measure around 65.000 lux, but sunlight is about 120.000 lux. Thats a huge difference.
I have no experience with none of these components, and is hard to figure it out.
What about solar cell?
As i understarnd, the LER will increase resistence with the given sunlight, if i protect the LDR with a case, would it be enough?
For plant grow, sunlight is very important, and cannot disregard 60.000 lux
The BH1750 can measure up to 100klux and even beyond that (see my example sketch). But you can certainly not use that sensor in direct sunlight.
A LDR under a cover/filter is okay. If you don't need to know the exact lux, then a solar cell is easier. Use a protection resistor.
Both banggood and components101 stated that " the input light range: 1-65535lx"
Not if its polyethylene and specifically non-biodegradable polyethylene.
I've no idea what it's made of. It came with the sensor module. The vendor did not specify the type of plastic, describing it as a "light ball".
The BH1750 can measure around 65.000 lux, but sunlight is about 120.000 lux.
Hmm. My readings exceed 110,000 in the above picture. I must look at the sketch and remind myself which library I used. I did apply a calibration factor to compensate for the dome, but it was only 10~20%, not enough to increase 65,000 to 110,000.
What about solar cell?
The short circuit current of a solar cell or solar panel is proportional to the illumination intensity. The voltage is not.
You can't measure the short circuit current directly with Arduino, but a reasonable alternative is to measure the voltage drop across a small resistor. On an Arduino Uno and the like, use the 1.1V ADC reference, and chose the resistor so that in full sun at noon, the current from the panel will induce a voltage drop not to exceed 1.1V.
Thanks to all.
I'll go with the BH1750 and learn with it
The BH1750 can measure from 0.11 lux to beyond 100k lux. I don't care what others say, read the datasheet ![]()
My example sketch shows the lux in four modes.
I had the idea to make it "autoranging", but I never took the time to make that. I don't like the sensor that much, because it can never measure below 0.11 lux. I wanted to measure at least 1 milli-lux.
Add a cover to prevent that direct sunlight will hit the sensor.
For that big a range (8 orders of magnitude) you might need two sensors, and use a large area low-leakage
photodiode for low-light readings.
