Automatic watering system

by Kieron

Kieron has built a really cool automatic system from fischertechnik for irrigation of his greenhouse. And it worked: He was able to grow sunflowers and other plants. A really great idea. In the following you will find his project description and the explanation of the individual steps.
Kieron:
"I was bored and wanted to build an automatic irrigation system for my greenhouse. The idea came from two schoolmates who had carried out the smartplant project at Jugend forscht / Schüler experimentieren. They didn't use fischertechnik, so I wondered whether it would work with fischertechnik and the things I have at home (i.e.: TXT controller, NTC resistor, compressor, cables, hoses, T pieces, elbows, soldering boards, 1mm enamelled copper wire, 1.5l bottle, brightness sensor, plugs, jacks, soldering iron).

Pump bottle

I learned the principle of the pump bottle from a spray bottle for the garden. By an air pressure in the bottle, the water is pressed out of the bottle through a hose whose opening is at the bottom of the bottle. The water then runs through hoses to the earth, moistening the soil.

Plant with sensors

Conductivity sensor

The conductivity sensor measures the electrical conductivity of the materials, i.e. how difficult it is for the electrons to pass through a material. Tap water, for example, conducts well, while completely dry earth does not conduct at all. Since I put my sensors into the earth, it can be said that the higher the value, the drier the earth is. To build the sensors, I removed the varnish from enamelled copper wires, soldered them into a soldering plate and attached cables. On the sides of the soldering plate, where the cables are attached, I sealed the cables with hot glue to prevent water from entering.  If water runs out of the greenhouse during pumping, I have draped a sensor under an outlet of the greenhouse, which is important for the conductivity and thus turns off the pump.

Temperature sensor

The temperature sensor (purchased) has a higher resistance the colder it is.

Brightness sensor

The brightness sensor (purchased) has a higher resistance the darker it is.

Robotics TXT Controller

In addition to programming, the Robotics TXT Controller is the heart of the irrigation system.
The Robotics TXT Controller has:
-    4 actuator outputs (lamps, motors, but also electrovalves can be connected and controlled to them)
-    4 counter inputs (small pulses can be counted at the counter inputs)
-    8 sensor inputs (with these you can measure the resistance, on/off)
It also has a touch-sensitive screen. On it you can select stored programs to display information from the program and to transmit commands to the program.

Main program

The program consists of a main program and the subprograms:
-    Time decision;
-    moisture decision;
-    irrigation;
-    data collection;
-    Display

In the main program, the individual subprograms are linked together and data is introduced.

Irrigation

The Irrigation subroutine is for controlling the pump bottle and stopping when it has pumped in enough water. To control it, a solenoid valve in the air pressure circuit is activated. The Irrigation subprogram also controls the Data Acquisition subprogram before and after watering.

Time decision

The time decision subroutine decides whether pumping is allowed from the time of day. I made this subprogram so that the pump does not start at inconvenient times (when my parents are sleeping, during the week from 8pm to 8am and on weekends from 8pm to 10am).

Data collection

The data acquisition subprogram records all values at least every 30min. If you run it in online mode, you can use it to read the data
and evaluate it.

Display

The subprogram display (1) shows all values on the control panel (2) when it is run in online mode. However, if you run it offline, only on the Robotics TXT Controller, it shows only the values of the humidity sensors and the average value on its display (3).

Moisture decision

The moisture decision subprogram decides whether watering is necessary or not. If the moisture of the soil is too low (average value >13 000) and the time is correct, it goes back to the subprogram Time decision but if not, the subprogram Watering starts.

Results

The yellow line shows when it is day and when not "Brightness_1". During daytime a high deflection appears there (info: the brightness is shown here in lux).
The green line "Tempratur_1" shows the temperature on the right vertical axis.

The system works well, which is why I now use it to grow sunflowers and tomatoes in the greenhouse. Since the readings at the different
sensors were very different, I tested them under different conditions. The differences between the various sensors are great. For example, sensor 2 always shows the highest value by far.
fe80::39:df3:f52e:7ce6%5