Soil moisture sensors, Automatic irrigation and the Raspberry PI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everybody in this video I'm going to address the topic of automatic irrigation and soil moisture sensors I will use the eye ptosis forum system which is based on an open source software that is running ornelas Beta Pi and some other components the design of the software is made to use inexpensive components so to make it affordable in the first part of the video I will give an overview of the soil moisture sensors and how to connect them to the board in the second part of the video I will have to ask the sensor calibration and the configuration of the automation for irrigation so now let's have a look at the soil moisture sensors the first sensor is a resistive sensor it means that they tried to read the soil resistance by direct contact of the problem with the soil this sensor is very easy to find on market is very inexpensive but I do not recommend to buy it for the following reason first of all the problem made with a very thin layer of metal printed on a circuit board that is very easy to corrode then it's always in direct current and this accelerate even more the corrosion then we have also this circuit together with the problem and this is a comparator you can see there is also a screw that you can use to change the threshold and it just made to provide a digital output that is just on and off depending whether the soil resistance is above or below the typhoon then this offers a digital output that modulus gives attention that is proportional to the soil resistance this sensor has all this problem and it also not so accurate in the reading and I have to say has all the resistive sensors it's reading is very dependent on the temperature this is a capacitive sensor this is very easy to find on the market and it's also quite inexpensive it tries to measure the soil humidity by measuring the capacitance of the soil in particular the dielectric property of the soil which can be directly related to the humidity in the soil itself the capacitive sensor reading are quite stable I tested for some time with the good results the only problem that I had with this type of sensor is that the electronic is exposed as you can imagine in a real world education system there is a lot of water going anywhere so it's easy to destroy the sensor that's why I find a way to coat to protect this secretly when I use it the for real application next we have this one it is just a proper for resistive measurement of the soil I made it with stylish silver rods I had to say I use it for a couple of years and there is no corrosion indeed this one is meant to be connected with the automation board which has a particular circuitry I have seen many bad review about resistive soil moisture sensors so I would like to spend a few words about it as I use it for a couple of years I have to say that yes many sensors that you can find on the market corrode very fast so a kind of useless I have to say also that the assistive measurement even if it is quite stable is not accurate and it depends a lot by the temperature all in all in the real field we can afford to have some in accuracy and from what I have attested so far the resistive sensor can be good enough to build an automatic irrigation system then we have this one this is also a capacitive sensor indeed this is not solved as a sensor so I had to modify the field inside the microcontroller to make it work and can until I am testing it I had a few issues with I to see connection so I made it more reliable it seems it's working well now so maybe in the future I will make it available for sales in my shop now let's see how to connect the sensors to the automation board ok I will not connect the delays because for this demonstration it's not necessary but anyway there are other videos in which I show how to connect it to the board so let's take the board and ever look at the analog inputs ok the yellow one is analog input from 0 to 5 volt and you can see they are labeled as a and 1 2 3 & 4 so this one is for this one is 1 and can be used to be connected to the analog output of the sensors we have also this row of connectors that is I to see and we can use to connect the digital sensor connection is very easy for example we can see that the capacitive sensor has three wires red and black are for the power and yellow is for the analog output so we just need to connect in this way so that we have ground the black +5 volts to the red and an-12 the yellow also this one is very easy to connect here we are to just be sure that we connect to analog output this pin and we connect power and okay and I got in the probe just connect in this way here you can see there is I grew one so this one will be a label with Tygra one this is a particular version of the board which has also this type of connector and circuitry and you can contact me if you want this version the things that this circuitry does is to enable the current on the probe just one that is reading this will increase the lifespan of the problem and then we have this eye to see interface and we are just connected to the i2c beam according to the power that's it they are all connected now we have to connect the last device and this is very simple because the borders on the bottom that's it okay so next step is to power on the system and calibrate to the sensors okay so now the system is powered up and all the sensors are connected on the left side of the screen we have a system interface now let's calibrate the sensors first thing we had to do is to go to the setting page scroll down and find the sensor calibration button here that is a table we had to be sure that the fields relevant to our sensors are empty and the direction is set to dear as default so this condition are met let's go back and start to the calibration the calibration procedure is very easy we will read the two values one when the sensor probe is in the air and the other when it is in the water and then we will fill in the calibration table let's start with the analog one where the capacitive sensor is connected and click read this will give a real-time reading of the sensor okay so in the air the sensor is giving a reading of three let's let's put it in the water as you can see the leading is very stable it is 1.60 66 let's go back calibration table and let's see what is the analog one this year so the minimum is 1.66 maximum history the scale we put 100 because we want to have value ranging from 0 to 100 and offset can be left empty now we had set the direction the auto mission are great expect that the lower value is the dryer and the higher value is more wet as we have seen in this reading the novel value indeed is was when the sensor was in the water so things are inverted according to the logic of the irrigation algorithm so here we had to specify that this is inverted and which was in then we save and we go back to check the reading let's read analog 1 so we we see that now it is in the water and it is 100 let's take it out of the water and the reading will eventually go to 0 when it's completely dry wait so the first sensor is calibrated let's move on to the second which is the resistive sensor and is connected to analog 2 let's start to read the values so when it is in the air this is 4.99 and when is in the water is that with 2.25 I've seen that a resistive sensor are not so stable at least at the beginning so it takes some minutes for the reading to stabilize okay the leading seems quite stable now let's proceed to fill this value my London and also this one is inverted because the leading into the water was lower than the other reading and let's save it let's go back let's read it again so we have around 100 say taking it out of the water and it's still just I want to clarify that few decimal of evil is not a big issue I will show later the graph that I've made by the system in a real life application let's go back and also calibrate the other the other sensors the other is Agri 14.99 let's put it in the water also here we had to wait some time until it's fabulous now let's tie also the eye to see sense of 270 out out water not gonna stay this way don't want to say inside of the glass okay so into the water is 512 and as we have seen when is inside the water the value is highest so this one is dear okay the calibration is finished next step is to set up the auto watering our grit okay so far we have connected the soil moisture sensors we have calibrated them and now it's time to go to out watering page and set the watering automation as you can see there can be a different set of parameters for each lane let's assume that will a one under school one is the relay which control the valve for the irrigation and which there is our moisture sensor let's see the parameters working model if this is set to none then of course the algorithm will be disabled we can set two different values for example full-auto and in this case the irrigation will be fully controlled by the soil moisture feedback then we have under min / max in this mode this is a kind of vibrate board between scheduling watering and automatic watering because normally it works with the scheduling that we set into watering plan but then in case the soil moisture sensor goes below a certain threshold then there is a watering activation on the other side if the soil moisture reading is above a maximum threshold then it stopped the watering planner then there is emergency activation and in this case it works only by starting irrigation cycle when the sensor reading is below a certain threshold and alert only the sensor reading goes below a certain threshold send an alert by email if the email has been set then reference sensor here we can choose which sensor should be the one that controlled the radiation so let's assume in this case we select analog one which was our capacitive sensor here we have these parameters I will show the meaning of these parameters by making an example so we have minimum threshold maximum threshold what an impeded in segments number of wooden in period pause between what and in periods and interval for sensitive evaluation so let's start to say that the system will calculate as a reference value not only the last sample of the sensor but according to this parameter he will calculate the average of the samples in the last 90 minutes it is evaluated in this way to give more robustness to the system so the reference value is then compared with the minimum and maximum duration if the reference value is below the minimum threshold then a watering cycle starts and start using a first warden in period of 100 seconds after the 100 seconds the system wait for 45 minutes as in this parameter and evaluate the reference value according to the samples in the last 90 minutes if the reference value is lower than the maximum then another wooden in period is start for the second time and after that the system waits for 45 minutes evaluate again the reference value and compare it with the maximum threshold issue is still below the maximum tration he start another watering period for the third time this will be the last watering period in this side then it waits 45 minutes then it calculates the Elevens value again and if it is above the maximum treasure then the water in cycle is finished successfully in case the value is between a minimum maximum then the water in cycle is finished but a warning will be issued because the system cannot reach the target value after watering if the value is below the minimum treasure after all the watering periods then it means that sanding is wrong or in the sensor or in the valve somewhere else so the system issue an error and this is the way that the system works then we have watering time and this is the watering time during the day that the system can be activated then we have max period between cycles in days this is a safety feature if the system detects that there are no watering periods within 5 days then it will issue a warning and it will start a watering period on under seconds then valid reading meaning neutral this is a value that if the reading is below this value then an alarm is issued then there is alert preference and this one is the mail a letter that can be none or warning only or info and warning normally set it on warning only means that any warning message will be sent by email after we finish the oscillation we can save and it's done now I'd like to show you a real example where I use the irrigation the iGrow meter and automation in a vase quite big vase where I have a hygrometer and the irrigation is automatically done let me go to the interface and let's go to data in the data there is a specific chart that Lisa exactly made to assess the performance of the outer watering algorithm indeed this chart change color and the type of line according to what is set into the outdoor watering algorithm for example if in the out watering algorithm we link a delay to a sensor then in this graph they will have the same color and here we have for example here we have the relay and this one is the sensor associated to this relay and we can see exactly that when this relay activate at the same time the reading of the sensor co-op let's focus a little more on this example here I am the sensor reading then the actuator that activated education over this sensor but I also have another sensor this is I to see sensor which I'm testing and as you can see when the allegation start both sensors will have an increase of the values then it's very important to say that depending on the position of the sensor and the position the sprinkler then we will have a different level of reading of the sensor I would say that to setup day out watering parameters it's a matter of experience and for me it took some time to understand how to set up the parameter first but also where to put the sensors and which kind of spring Grell have to use of course all of this depends also on the type of plants that you ever now I want to show you more illegal data maybe you understand the cycles that are happening in the outer watering so let's switch to two weeks in the past and this is the data in the past two weeks as you can see there are lots of things that I'm testing but I want to show you the one that I'm using for quite a long time so this is the balcony side and so let me remove all the other here we are so as you can see this is the trend of the sensor and of course is going down because there are plants that are taking the water then we have water activation and then the same cycle start again you may notice this oscillation and as I explained before this is a resistive sensor and this oscillation have exited the frequency of one day and I check it with the temporal they overlap quite completely image that this egg fat is given by the daily template will change as you can see this is set to provide the same amount of water for each irrigation but as you can see the period between education changed and this is normal because sometimes the weather is more cloudy sometimes there is no Sun is more windy so the soil changed the humidity in two different speed hope it was clear and if you have an adapter please feedback to the forum I put the link into the scripture on this video and thank you for watching
Info
Channel: hydrosys4 raspberry
Views: 27,780
Rating: undefined out of 5
Keywords: automation, garden, raspberri pi, plants, irrigation, hydroponics, balcony, flowers, autowatering, soil moisture, hygrometer, calibration, rain sensor, sprinklers
Id: EZM3w_XAwQU
Channel Id: undefined
Length: 29min 11sec (1751 seconds)
Published: Sun Mar 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.