29 - 11 - 2020

Home Irrigation

The used hardware for all the Irrigation experiments is the same:

  • Numato 8 channel USB GPIO Module;
  • Connector board for ADC 5V;
  • AltonaLab Soil humidity sensor;
  • Soil humidity probe - two pieces;
  • Water level sensor;
  • PWM Regulator with digital input starter;
  • Mini water pump 5V;
  • Watering hose - 1 meter and Sprinkler;
  • 5V multi connector power supply board;
  • 220V to 12V, 2A power supply;
  • You also need to have a pot with soil (Not included in the KIT).


Warning!!! The Jumper of the PWM Regulator has to be removed for Irrigation experiments. This is because the power supply of the PWM Regulator is 12V, but the Water pump power supply is 5V. With removed jumper, the output power of the PWM regulator will be 0..6V. When the diagram is run for a first time, please adjust the PWM Screw to the needful power of the pump. The pump is cheap and not very powerful, but it is perfect to present the idea of a complete irrigation system. It can be easy replaced with more powerful pump for your future and real system.

 

For all the Irrigation experiments:

GPIO 0, 1, 2, 3 of a Numato board are set as analog input. GPIO 4, 5, 6, 7 are set as digital outputs. 

  • Control the water in tank - GPIO 0 of Numato block is used to control the water level in the tank.GPIO 0 is connected to the output of a Water level sensor. The output of this sensor is NOT analog, it is digital. This means, when the probe is in a water, the output of the sensor becomes to a high level +5V, when there is not water, the output is in low level 0V. The analog output IO00 of Numato block is converted to a digital signal by the block AnalogToBool, so when the probe of the Water level sensor is contacted with a water, the output of the block AnalogToBool will become to a high level, if the tank is without water, the output will be in a low level. The use of this sensor is very important to avoid the damage of the pump because of missing water in the tank.
  • Soil humidity - GPIO 1 of Numato board is used to read the voltage output 0..5V of a Soil humidity sensor. The sensor is sensitive in range 50 ohms to 50,000 ohms. The block SoilHumiditySensor of the diagram is used to convert the ADC value 0..1023 of IO01 output of a Numato block to soil resistance - output RSoil (in ohms) and soil humidity - output Humidity (0..100%). The block SoilHumiditySensor has two very important parameters: HiLevelHum and LowLevelHum. We use this parameters for hysteresis effect - for example, let set the parameters HiLevelHum = 70%, LowLevelHum=30% and thenrun the diagram. If the current soil humidity is 20%, the system will start to irrigate until the soil humidity increased over 70%, then the irrigation will be stopped until the soil humidity decreased below 30%, then the irrigation will be started again. The block SoilHumiditySensor has an output Irrigate, which becomes to a high level, according to the explanation above.

For all the irrigation experiments, the parameter FastMode of a Numato block is turned OFF, CommunicatePerSec is set to 0 sec. For a real irrigation system, CommunicatePerSec can be set to 1 or more seconds, because the real irrigation process is not very fast and the computer can get its decisions slowly. 

 

The hardware diagram for all the Irrigation experiments is shown below:

 

 

The real picture of the Tank, Pump and Water probe is:

 

For the experiments, the Soil humidity probe and the Sprinkler are placed close to each other, because at this case, the measured soil humidity will be changed very fast when the irrigation is started:

 

Experiment: Irrigation by Time.

AltonaLab diagram: KIT_IrrigationByTime.nsm

Please read the common information for all the irrigation experiments at the top of this article!

This experiment uses only a sensor for Water level, to avoid the pump operation without water. The Soil humidity sensor is not used, the diagram is organized logic for watering by time, without feedback about a soil humidity.

The used AltonaLab diagram is:

The control logic by a Time is presented by blocks DayOfWeek and TimeInterval. The idea is:

  • At the days Monday, Wednesday and Friday the output of the block OrUni will be at a high level, because of this days, one of the connected outputs of the block DayOfWeek will be at a high level;
  • In the time period 22:00..22:02, the output of the block TimeInterval will be at a high level, because its parameter OnOffInerval is set to 22:00..22:02. The idea is the irrigation process to be set at the night time, because at this time there is not a sun radiation and the water evaporation will be low, the time to the morning is enough, the water to be absorbed from plants. Please note, the pump running time is very short in this experiments, only 3 min, because this is just a demonstration experiment and the pump is very weak. At the real live, the time interval could be longer and the pump to be more powerful. At the block TimeInterval, unlimited time intervals can be added in the parameter OnOffInterval.

As is described at the beginning of this article, AnalogToBool block, represents existing of a water in the tank. If the output of the block is in a high level, there is a water in the tank. 

The outputs of the AnalogToBool, OrUNI and TimeInterval blocks are inputs of the block AndUNI. This means, if there is a water in the tank, the current day is Monday, Wednesday or Friday and current time is in interval 22:00..22:02h, the pump will be started. For the demonstration purpose, just connect the output of the DayOfWeek block, which represents the current day to the OrUni block, then open the parameter OnOffInterval of the block TimeInterval, delete the existing interval and add a new one, which is a few minutes after the current moment. Then run the diagram.

The pump can be started with a button Pump too (available on the AltonaLab diagram), because the output of a AND block and the output of a button block are connected to the inputs of a OR block. The output of the OR block is connected to the digital input IO4 of a Numato block. When the Numato input IO4 is in a high level, the input of the PWM board will be enabled and the pump will start to irrigate.

 

Experiment: Irrigation by Soil humidity.

AltonaLab diagram: KIT_IrrigationByHum.nsm 

Please read the common information for all the irrigation experiments at the top of this article!

The experiment is very interesting, using the diagram below, the soil moisture of the home plants can be adjusted in very precise boundaries. In this experiment we will use two soil humidity probes - one inserted into the soil and one to control the presence of a water in the tank.

 

The used AltonaLab diagram is:

 

GPIO 0, 1, 2, 3 of a Numato board are set as analog input. GPIO 4, 5, 6, 7 are set as digital outputs. 

  • Control the water in tank - GPIO 0 of Numato block is used to control the water level in the tank.GPIO 0 is connected to the output of a Water level sensor. The output of this sensor is NOT analog, it is digital. This means, when the probe is in a water, the output of the sensor becomes to a high level +5V, when there is not water, the output is in low level 0V. The analog output IO00 of Numato block is converted to a digital signal by the block AnalogToBool, so when the probe of the Water level sensor is contacted with a water, the output of the block AnalogToBool will become to a high level, if the tank is without water, the output will be in a low level. The use of this sensor is very important to avoid the damage of the pump because of missing water in the tank.
  • Soil humidity - GPIO 1 of Numato board is used to read the voltage output 0..5V of a Soil humidity sensor. The sensor is sensitive in range 50 ohms to 50,000 ohms. The block SoilHumiditySensor of the diagram is used to convert the ADC value 0..1023 of IO01 output of a Numato block to soil resistance - output RSoil (in ohms) and soil humidity - output Humidity (0..100%). The block SoilHumiditySensor has two very important parameters: HiLevelHum and LowLevelHum. We use this parameters for hysteresis effect - for example, let set the parameters HiLevelHum = 70%, LowLevelHum=30% and thenrun the diagram. If the current soil humidity is 20%, the system will start to irrigate until the soil humidity increased over 70%, then the irrigation will be stopped until the soil humidity decreased below 30%, then the irrigation will be started again. The block SoilHumiditySensor has an output Irrigate, which becomes to a high level, according to the explanation above.

For a real irrigation system, the parameters HiLevelHum and LowLevelHum of the block SoilHumiditySensor should have distant values, for example 70% and 30%. But at this case the time between two irrigations will be very long. If we want to make a demonstration of the irrigation, we can set the parameters with close values HiLevelHum=70%, LowLevelHum=67%. At this case, the Start/Stop process will be more intensive. 

The outputs Irrigation of the block SoilHumiditySensor and an output of the block AnalogToBool are connected to the inputs of a block AND. This means, the current soil humidity has to be under LowLevelHum, which will rise the level of the output Irrigate of the block SoilHumiditySensor and has to have a water in the tank, in order to start the pump. If the output of the block AND is in a high level, it starts the pump.

The pump can be started with a button Pump too (available on the AltonaLab diagram), because the output of a AND block and the output of a button block are connected to the inputs of a OR block. The output of the OR block is connected to the digital input IO4 of a Numato block. When the Numato input IO4 is in a high level, the input of the PWM board will be enabled and the pump will start to irrigate.

 

Experiment: Irrigation by Soil humidity and Forecast.

AltonaLab diagram: KIT_IrrigationByHumAndForecast.nsm 

Please read the common information for all the irrigation experiments at the top of this article!

The used AltonaLab diagram is:

The diagram of this experiment is very close to the experiment: Irrigation by Soil humidity At the curent experiment, an additional logic is added by a block ForecastMyWeather2. The block ForecastMyWeather2 is well explained at the URL:

https://scada.altonalab.com/index.php/en/descriptions-of-the-functional-blocks/weather-library

  • Create an account in the WEB site: MyWeather2.com and get you Access code;
  • Enter your Access code to the parameter UniqueAccessCode of the block ForecastMyWeather2;
  • Enter the parameters Latitude, Longitude of the block ForecastMyWeather2 with GPS coordinates of your living place;  

When the diagram is run, the output CanIrrigate of the block ForecastMyWeather2 will be at a high level, in the cases below:

  • if the forecast for today is not for a raining weather;
  • if the yesterday's forecast for today, which is remembered from yesterday running of the diagram, is not for a raining weather. This condition is possible only if the diagram is not stopped from yesterday!


So the irrigation process will be started if the next three conditions are available: there is a water in the tank, the soil humidity is low and the forecast for today is not for a raining weather.