HAsmartirrigation icon indicating copy to clipboard operation
HAsmartirrigation copied to clipboard

[REQ] Integration of moisture sensor

Open Sven-v-Beuningen opened this issue 2 years ago • 8 comments

Thank you very much for the great effort for this component. I'm not using it right now, but I'm searching for a solution for controling my garden irrigation. I think I've got the Idea of the component. The amount of needed water is calculated based on the expected evaprotation based on weather data or sensors. This is done on a daily base. But how is the actual moisture level of the ground is taken into account. Starting each day at 0 means from my point of view, that the system does not know how much water is really needed. Or do I miss something?

I have 6 watering circuits. Including 4 zones for gras and 2 dripping hoses. In addition I have 2 moisture sensors for the west and south side of the house. I also have a weather station (windspeed and illuminance) and a binary rain sensor (rain or not rain).

In the first place I thought about just watering the zones until the sensors reach a certain level. Then I found your nice component and now I don't know what is the best strategy for my situation. Maybe a combination of both:

  1. Check current moisture level.
  2. Check with the predictions how much water is needed over the day
  3. Calculate the needed moisture level to get over the day
  4. Water until the calculated moisture level is reached.

Does this make sense? I assume there is a reason why you don't use a moisture sensor.

Sven

Sven-v-Beuningen avatar May 11 '22 06:05 Sven-v-Beuningen

hi @Sven-v-Beuningen thanks for checking in. Of course you're free to do whatever you want :), however, there are a couple of reasons why this component works the way it does:

  1. you can use it without any sensors whatsoever
  2. I am no expert, but it appears that evapotranspiration is the industry standard way of calculating irrigation needs for crops and lawns
  3. the moisture sensor I have doesn't have a high enough resolution to pick up the differences in moisture caused by irrigation. Please let me know which sensor you use :)
  4. I don't think moisture is the right thing to look at: it's never constant and fluctuates during the day/night.

jeroenterheerdt avatar May 11 '22 18:05 jeroenterheerdt

Hi @jeroenterheerdt ,

thank you for the reply. I didn't know that moisture sensores are inaccurate. I added your component and after my sensors are installed, I'll compare if the values are somehow correlate.

Another thing came into my mind. You're using the solar radiation for the calculations. Unfortunately I don't have a solar radiation sensor, but I do have solar power panels on the roof. I thought whether it would be possible to calculate solar radiation from current solar power.

Something like: (current_solar_power / size_of_panels_in_m²) * efficiency_of_the_panels. In an example calculation with 3600W I have about 400w/m² solar radiation. But I don't have anything to check if the calculation could be right.

Sven-v-Beuningen avatar May 12 '22 08:05 Sven-v-Beuningen

great, please let me know what you find :) - and yes, I think you can estimate solar radiation from solar power, but not sure what the formula would be.

jeroenterheerdt avatar May 12 '22 16:05 jeroenterheerdt

I have some Ideas for the solar radiation. I'll give it a try if I find some time, and let you know the result.

Sven-v-Beuningen avatar May 12 '22 17:05 Sven-v-Beuningen

I played a little bit with the values from my solar panels and that's the current result. I take into account the following data:

Temperature coefficient of the panels Current temperature Efficiency factor of the panels Efficience factor of the inverter Roof pitch angle

First of all I calculate a temperature efficiency factor, because the efficiency of the panels is dependant on the current temperature. At 25 degress they have 20.3% efficiency. This is scaled up if the tempereture is lower than 25 degress and down if it is higher.

Current temperature: 16 degrees temperature coeffcience: -0.27 %/K temperature efficiency factor: (16 - 25) * -2.27 = 2,43%

Then I add the temperature efficiency factor to the effcience factor of the panels at 25 degrees:

Panel efficiency factor: 20.3% Current panel efficiency: 20.3 + 2.43 = 22.73 %

Now we can calculate the amount of solar radiation from the sun

Current solar power: 4100W Size of solar panels: 48 m² Solar power per m² : 4100W / 48m² = 85,41 w/m² Real solar radiation on the panels: (85,41/22,73)*100 = 375.78 w/m²

The inverter is also stealing some power, so we have to take into account the inverter effciency:

Inverter efficiency: 0.97 Real solar radiation before inverter = 375.78 / 0.97 = 387,40 w/m²

Since the solar panels are angled to the sun, the value is higher than the radiation on the ground. Therefore I calculate the value as they would lay flat on the ground.

Solar panel angle: 25 degrees Solar radiation: 387.4 * cos(25) = 351.1 w/m²

This is still an approximation, because my panels are not all on the same side of the roof. Therefore I have direct and indirect solar radiation. Unfortunately I can't check the values compared to a real sensor, but could this be a matching value for solar radiation?

Sven-v-Beuningen avatar May 13 '22 07:05 Sven-v-Beuningen

@jeroenterheerdt I've played around with my solar radiation approximation and have some results. I created two zones with identical configuration except the solar radiation sensor. The first one uses your calculation and the second one my approximation. The results are quite different, but I have no clue which ones are more accurate.

Yours

image image

Mine

image image image

The difference is mainly the evapotranspiration. From the last days I observed, that my variant leads to way shorter watering times. The difference was up to 5000 seconds. Your variant has been around 6000 seconds and mine around 1500 seconds.

Sven-v-Beuningen avatar May 17 '22 06:05 Sven-v-Beuningen

right, but solar radiation is only part of the equation for evapotranspiration. temperature, wind speed, humidity and others all are taken into account. So my calculation being higher than yours is expected.

jeroenterheerdt avatar May 17 '22 16:05 jeroenterheerdt

You get the solar radiation by multiplying the lux value with 120. But the pyeto does not expect solar radiation in W/m² but in MJ/m²/day. 1 MJ/m²/day is an avverage of 11.57 W/m².

martin3000 avatar Jun 28 '22 16:06 martin3000

closing this issue because of staleness, please re-open an issue if this is still a problem in 2.0 version (now in beta)

jeroenterheerdt avatar Aug 14 '23 22:08 jeroenterheerdt