Urban Gardening: the Water System

by Jon G Aguado in Outside > Water

980 Views, 20 Favorites, 0 Comments

Urban Gardening: the Water System

Portrait 2.png

In this second article of my urban gardening series, we'll delve into the intricacies of the dual watering system I've implemented for my balcony garden. This system ensures that all my plants, whether in soil pots or hydroponic setups, receive the right amount of water and nutrients. Let's explore how these two independent system works and how you can set it up for your garden.

Supplies

2. Materials.png
2. Tools.png

Materials:

  • Pressure reducers (from the main water line to <20 PSI or 1.5 bar)
  • 3m 6mm (outer diameter) pipes
  • Fits for the 3mm pipes (elbows, dividers, screw inlets)
  • Rotho Loft 3.2L (or any equivalent transparent food storage box)

Sensors and actuators

  • 5x 12VDC solenoid valves
  • 1x 12VDC Pump
  • 1x Peristaltic pump 12VDC
  • Water level sensor
  • Pressure sensor (up to 100PSI)
  • TDS sensor
  • Water leak sensor

For the hydroponics

  • Plastic pots (where to make an input and an output holes)
  • Clay pebbles for hydroponics

For the automations:

  • Relay board with IoT functionalities (like the Smart Garden or similar)
  • Plant monitor with IoT functionalities (like the Smart Plant or similar)

Tools:

  • Laser cutter, optional (or access to any makerspace having one)
  • 3D printer (or access to any makerspace having one)
  • Screwdriver
  • Scissors or pliers

Installing the Pressure Reducer

IMG_8723.JPG
IMG_8617.JPG

Start by attaching a pressure reducer (like the one from Gardena for their micro-drip system) to the main line of your water tap, or to the free port of the tap divider, if you have one installed like I did. This reducer not only will allow us to adapt the 13 mm (1/2") main tap to our 4.6mm (ID) / 6mm (OD) piping, but will bring the water pressure down to a safe level for our system.

Optionally, you can follow the adaptor with an adjustable pressure reducer, which allows fine-tuning of the water pressure to suit your specific needs.

As part of my efforts to control a healthy pressure on the water line, I integrated a pressure sensor (range 0-100 PSI) after the adjustable reducer. As the sensor came without any calibration (a cheap Aliexpress sensor), I performed a point to point calibration to accurately relate the read voltage to the corresponding pressure measured.

The sensor calibration model is obtained with a 1st degree polynomial regression method:

y = 41.51x + 2.762

Where x is the raw signal in V and y is the calibrated signal in psi.

Connecting the Electrovalves

IMG_8616.JPG
IMG_8619.JPG
IMG_8618.JPG

Plug the water from the adjustable pressure reducer into multiple distribution fittings, bringing 5 pipes to the inlets of 12V DC-controlled electrovalves.

Optionally, you can mount these electrovalves on a 3D-printed platform (like the one attached) and secure it inside the wooden closet. The platform keeps the valves organized and includes a small box beneath to catch any water leaks. A resistor-based water leak sensor is installed in this box to alert you in case of leaks. Excess water collected here drains back into a water tank that we will comment later.


Soil Pot Watering System

IMG_E8709-ezgif.com-video-to-gif-converter.gif
FVAD9200-ezgif.com-video-to-gif-converter (1).gif
imagen_2024-08-04_192647653.png

From the previously mentioned electrovalves, four of them will be delivering water to individual soil pots distributed around the balcony. This setup allows precise control of water delivery to each pot, ensuring that each plant gets the right amount of water.

For assuring the quantity of the deliverable water on each of the pots, you can use commercially available sensors like the Xiaomi Mi Flora. In my case, I used my own developed board, the Smart Plant, that not only is capable of measuring soil moisture, ambient light, air temperature and humidity, but it can display on an embedded 2.9" e-paper display the current measurements and the comfort ones for each plant.

The full control of the soil pot watering system was done through Home Assistant and my Smart Garden controller flashed with custom ESPHome firmware. An example of the configuration YAML can be found attached.

Manual Backup

IMG_8717-ezgif.com-video-to-gif-converter.gif
IMG_8722-ezgif.com-video-to-gif-converter.gif

As a backup for when the soil pot irrigation system doesn't water enough based on the needs of each pot, or if you simply want to water manually one of the pots, I installed pushbuttons with ring leds to trigger each pot watering.

Hydroponics System

IMG_8729.JPG
IMG_8726.JPG
IMG_8727.JPG
IMG_8685.JPG

The fifth electrovalve leads to a 3.2L Rotho Loft water tank. Inside the tank, a pump sits at the bottom, ready to push water to the hydroponic pots. The hydroponics system consist of several subsystems that need to be explained in detail:

  1. The (auto) refilling system of the tank.
  2. The fertilizing system.
  3. The water pumping cyclic system.

The water from the hydroponics system (not the ones going into the soil pots) comes from a water reservoir contained in the transparent 3.2L food container. The tank cover has been laser-cut (file attached) to hold some sensors and pass the wiring/piping needed from within the tank to the rest of the system. Additionally, sensors like the TDS required from a special 3d printed parts to be kept firmly in place.

In this case, the hydroponics system is also controlled by my Smart Garden controller, with the correspondent configuration YAML for ESPHome

The (auto) Refilling System

KSIR9174-ezgif.com-video-to-gif-converter.gif

The water level sensor triggers the fifth electrovalve to refill the tank when the water level drops below a set threshold. This water level sensor, despite being built very nicely and robust, only delivers 5 discrete resistance values:

  • ~1Ω (at it's lowest level)
  • ~52Ω
  • ~91Ω
  • ~130Ω
  • ~191Ω (at it's highest level)

In this case, I prepared the logic of my system to refill the tank when the sensor detects it's on it's lowest level. The electronic design behind is a voltage divider with a ~220Ω resistor pulled-down (connected to ground).

This way, if the sensor is disconnected, or something would happen with the cable, the system wouldn't try to refill it automatically.

The Fertilizing System

XMJB1216-ezgif.com-video-to-gif-converter.gif
IMG_8724.JPG
imagen_2024-08-04_201054137.png

The water on the reservoir needs to contain some nutrients for the correct development of the plants on the hydroponics system. In my case, and to simplify things, I decided to go with just one fertilizer solution that will cover most of my current needs, however, the system is scalable to add more than one fertilizer source.

According to the fertilizer's instructions, I should dilute the contain of the dosing cap (~36gr of liquid) in 2 litres of water. Since the peristaltic pump I acquired (also from Aliexpress) didn't include any calibration neither, I performed another calibration based on time and weighted amount of transferred fertilizer.

The result is that for the ~2.6l of water from my water reservoir, I should add around 47gr of fertilizer, or let the peristaltic pump run for around 48.6s equivalently.

Additionally, I integrated a TDS (Total Dissolved Solids) sensor on the water reservoir to monitor the water quality and the nutrients disolved on the tank.

Once I had disolved the indicated amount of nutrients as the fertilizer's manufacturer recommended and measured the stable TDS value, I set automatic nutrients refilling dependant on the TDS level. But this last automation is still under test.

The Water Pumping Cycle

Flow.gif
Diseosinttulo-ezgif.com-video-to-gif-converter.gif
Diseosinttulo1-ezgif.com-video-to-gif-converter.gif
Diseosinttulo3-ezgif.com-video-to-gif-converter.gif

The hydroponic pots, which we will cover in detail in the next article, are filled with clay pebbles and have an internal water inlet and outlet system. When the pump in the tank is activated, it pushes water up to the topmost pot. The water fills the pot up to a designated level, then drains into the next pot in line.

This cascading effect ensures that all pots receive water before the excess drains back into the tank. The pump operates in cycles, with a timeout of 120s which for my two under-testing pots is enough.