Manual for an automatic irrigation system
HomePrecisionManual for an automatic irrigation system
Precision · Irrigation

Manual for an automatic irrigation system

Install, operate, and do maintenance on an irrigation system with sensors for crop steering, on Home Assistant. The manual starts with the basic information.

Precision11 diagramsOperation manual~14 min to read
Start here

Purpose and scope

This system is an automatic irrigation system for plants in pots of soilless substrate. Sensors in the substrate of each pot measure how wet the substrate is and the quantity of fertilizer salt in it. The software selects the time of each irrigation and the quantity of water. The system is an alternative to manual irrigation and to a timer that does not use sensor data.

The system operates in Home Assistant. Home Assistant is open-source software for home automation. The software has no cost. You operate it on your equipment. A cloud account is not necessary for the basic system. The system controls 6 grow tables at the same time.

The system has three layers, and you can use the layers one after the other. The first two layers are in operation. They are an irrigation package that uses a timer and a crop steering integration that uses sensors. The third layer is optional and has more functions (AppDaemon). It makes all the decisions without a person.

The three layers let you start with the timer and then add the sensor decisions. It is not necessary to assemble the system again. For the first week, operate the system with a timer only, and monitor the sensor readings. When the readings are correct, start crop steering.

  • The system is an alternative to manual irrigation and to timers. It uses sensor data for its decisions on 6 grow tables.
  • The system operates on Home Assistant. A cloud account and more software are not necessary for the basic system.
  • The three layers are the irrigation package with a timer, the crop steering integration, and the optional AppDaemon layer for decisions without a person.
  • You can start with the irrigation package that uses a timer, and then add the other layers. It is not necessary to assemble the system again.
Control loop from sensor to valve1Probe readsVWC and EC inthe pot→2Software decisiontime forirrigation?→3Valve opensshot for settime→4Water goes to plantwet substrate→5VWC increasesloop againA closed loop: the system applies water, measures, and applies water again.
Figure 1. The primary part of automation is this loop. The system measures the root zone and makes a decision. Then it applies water and measures again. Each other part of this manual gives more information about this loop.
In operation
Layer 1: Irrigation package
Irrigation at set times. The settings are the window, the interval, and the time of each shot. This layer is in operation. It is the stable baseline.
In operation
Layer 2: Crop steering integration
Logic for the P0 to P3 phases that uses sensor data. It sets the size of each shot from the VWC and EC. This layer is in operation.
Optional
Layer 3: AppDaemon
The software changes the phases and makes all the decisions without a person. This layer is optional. The basic system does not include it.
Figure 2. The three layers are one above the other. Each layer adds more automatic decisions to the layer below it. You can stop at a layer when you are sure that it operates correctly.
Terms

Definitions

This section gives the terms that this manual uses frequently. It is not necessary to know the terms at this time. Each term occurs again in this manual.

VWC (volumetric water content)The quantity of water in the substrate, in percent. If the VWC is 60%, water fills 60% of the volume of the pot.
EC (electrical conductivity)The quantity of dissolved fertilizer salt in the water around the roots. You measure it in mS/cm. It is an approximate measurement of the strength of the feed.
DrybackThe controlled drying of the substrate between two irrigations. You measure the dryback with the change of the VWC. If the substrate is always full of water, the roots do not go deeper. If you let the substrate dry to a set value and then fill it again, the roots go deeper. In the flowering stage, the plant also uses more energy for reproduction. The size of the dryback is the primary control for steering.
ShotOne short period of irrigation for a set time. The system gives some small shots each day. It does not give one large irrigation. The system sets the size of each shot.
Field capacityThe maximum quantity of water that the substrate can hold. More water than this quantity drains from the substrate. The default target in this system is 70%.
SubstrateThe material that contains the roots. Examples are coco and rockwool, and materials of the same type. Glossary →
Solenoid valveA valve that operates with electricity. The relay board opens or closes the valve to start or stop the flow of water to a table.
VPD and crop steeringWhen the temperature of the air is higher and the air is drier, the air removes more moisture from the surface of the leaves. VPD (vapor pressure deficit) measures this effect. It is the difference between the moisture that the air contains at this time and the maximum moisture that it can contain at that temperature. When the VPD is higher, the plant transpires water more quickly, and you must supply water more quickly. Crop steering is a method to cause vegetative growth or generative growth in the plant with irrigation, climate, and light. Glossary →
Steering
Vegetative
Growth of leaves and size. The drybacks are smaller, the substrate stays wetter, and the EC is moderate.
Steering
Generative
Flowers, density, and resin. The method uses larger controlled drybacks, a higher root-zone EC, or the two together.
Signal
Runoff
Water that drains from the bottom of the pot during a shot. It shows that the substrate is at field capacity.
Figure 3. A short reference for the three terms that cause the most problems for new personnel. These terms are the two types of steering and the information that runoff gives.
Chart of VWC and dryback in vegetative and generative steering
Example. Vegetative steering: smaller drybacks, and the substrate stays wetter. Generative steering: larger controlled drybacks. Example: the VWC for each day of the crop.Diagram for education
Water-content cycle for one dayFill to field capacity, hold it, make a controlled dryback, and do it again. The dryback size is the steering control.correct bandtoo dry0255075100offP3 minonP1FCP2offwater content %
Diagram. The system gives this cycle of water content each day: fill the substrate, hold the water, and make a controlled dryback.
Saturation, field capacity and drybackthe same block at three times of the daySaturatedafter irrigation, almostno air→Field capacityfree water drained, peakeach day→Dryback lowplant used water, air +oxygen in
Diagram. Saturation, field capacity and the dryback low.
The EC increases when the root zone driesthe salt stays, the water decreasesFull and low EC→Dry and high ECThe salt quantity is the same, but there is less water. Thus the EC atthe roots increases when the water content decreases.
Diagram. The EC increases during the day when the substrate dries. Runoff decreases the EC to its first value.
Quality of the information

Evidence and limitations

Three types of information

We want each paper to be correct. Thus we examine each paper for information that is not solid. This information comes from the view of one grower, from a small number of sources, or from grower methods that have no controlled test. We identify this information, and we do not show it as solid.

Frequently there is no paper for the decision that you must make. Then we use the reports of other growers and the methods that work in the rooms that we know. This information can help you, but it is not the result of a laboratory test. Use the methods that work for your plants, for your room and for your meters. If a table does not agree with your crop, use the data from your crop and record the difference.

Solid
Tests of plants, specifications or many sources that agree show that the information is correct
  • If the system has no safety sensors, do not operate it when no person monitors it.
  • Vegetative growth uses smaller controlled drybacks. Generative growth uses larger controlled drybacks.
Grower method
Many growers use this method in their rooms. Start with it, then change it for your room.
  • Procedures for installation and servicing of a manifold that sensors control.
Weak
The view of one grower, a small number of sources, one test, or a method that works in one room
  • The entity names and setpoints of a different facility in your facility with no change.

If you find an error, make a report. We will correct it. Make the report on GitHub, with the name of the paper and the information that is incorrect. If you have a source, include it: Make a report of an accuracy problem. The regulations, labels and licenses of your area always override each procedure in these papers. The label weak in a paper shows the points where the risk of an error is highest.

Equipment

Equipment of the irrigation system

A KC868 E16S relay board controls the valves. The relay board has an Ethernet connection and operates with ESPHome firmware. It opens and closes each valve: the 6 table valves, the mains water valve, the mainline valve, and the manifold valve.

Each table has a substrate probe. The probe measures the VWC, the EC, and the temperature. It sends the data with a basic digital protocol for soil sensors (SDI-12).

The room also has 4 environment sensors, 3 CO2 sensors, 4 AC units, a humidifier, and 4 relays for dehumidifiers. There is no pump switch. A pressure switch starts the pump when the mainline valve opens. Thus the water flows from the tank to the mainline, then to the dripper of the table, and then to the plant.

The mains water and manifold valves do not supply feed

The mains water valve and the manifold valve only fill the nutrient tank and mix the nutrient solution in it. The table valves are the only valves that supply feed to the plants. Some sensors have no connection at this time. This condition has effects on safety. The last section gives more information.

The equipment of the system. The relay board is the one point where a decision of the software opens or closes a valve.
DeviceFunctionConnection
KC868 E16S relay boardIt opens and closes all the valves: the table valves, the mains water valve, the mainline valve, and the manifold valve.Ethernet and ESPHome
Substrate probes (×6)Each probe measures VWC, EC, and temperature. There is one probe for each table.SDI-12
Environment sensors (×4)They measure the temperature and the relative humidity (RH) of the room.ESPHome and Wi-Fi
CO2 sensors (×3)They measure the CO2 of the room in ppm.ESPHome
AC units (×4)They decrease the temperature of the room.Relay or IR
HumidifierIt increases the RH of the room.Relay
Dehumidifiers (×4)They decrease the RH of the room. They start one after the other.Relay
LightsThey set the photoperiod and the lights-on window.Relay, with a timer
The flow of water1Nutrient tankmixed feed waits→2Mainline valveopens, pumpstarts→3Mainline pipepressurized→4Table valveopens for onetable→5Drippersto each plant→6Runoffwater drainsNo pump switch. The pressure switch starts the pump when the mainline valve opens.
Figure 4. Water moves only when the mainline valve and a table valve are open. The pump does not operate without water, because the pressure in the mainline starts the pump. A signal from the software does not start the pump.
Basic information

Irrigation phases P0 to P3

Crop steering divides each lights-on day into four phases. The phases control how the plant uses water and nutrients. A controlled dryback is a drying of the substrate by a set quantity before you apply water again. This dryback is the signal that causes vegetative root growth or generative flower production.[2]

P0 (morning dryback) is the phase with no irrigation. The substrate dries after the night. The system changes to P1 when the VWC decreases by the target quantity (50% for vegetative steering, 40% for generative steering) or after a maximum of 120 minutes.

P1 (ramp-up) gives shots that become larger. The first shot is 2% of the substrate volume, and the size increases by 0.5% for each shot. The time between two shots is 15 minutes. The phase continues until the VWC is approximately 65%, with a maximum of 10 shots.

P2 (maintenance) keeps the VWC stable with top-up shots. A top-up shot occurs when the VWC decreases to less than 60%. The system also increases or decreases this threshold with the EC ratio (the measured EC divided by the target EC). If the EC ratio is more than 1.2, the system applies more water to flush the salts. If the EC ratio is less than 0.8, the system lets the substrate dry. As a result, the concentration of the nutrients increases.

P3 (before lights-off) is irrigation for emergencies only, when the VWC is less than 40%. The dryback in the night starts the cycle again.

Vegetative and generative steering
  • Vegetative steering uses smaller drybacks and a moderate EC to cause the growth of roots and leaves.
  • Generative steering uses larger controlled drybacks, a higher root-zone EC, or the two together, to cause flowering.[1]
  • The same P0 to P3 phases operate for the two types of steering. Only the dryback targets and the EC change.
The phase cycle each day1P0dryback untiltarget→2P1ramp-up →~65% VWC→3P2keep VWC →lights-off near→4P3hold →lights-onEach change of phase has a trigger: dryback target, field capacity target, lights-off, lights-on.
Figure 5. The cycle starts again each day. P3 changes to P0 during the night, and lights-on starts the ramp again.
One day of VWC: the steering sawtoothP0: VWC decreases. P1: VWC increases in steps. P2: stable sawtooth. P3: VWC decreases in the night.4048566472lights onP0 endP1 startP1P1 endP2P2P2P3 / nightVWC %
Figure 6. You want this shape in the VWC trace. At the start of the day, the VWC decreases in a smooth dryback. Then the VWC increases in a controlled quantity. In the maintenance phase, the VWC is almost flat. Before the period of darkness, the VWC decreases.
EC ratio controls the P2 irrigation thresholdEC ratio = measured EC ÷ target EC. In these zones, the system adjusts the P2 trigger without a person.dryback, EC increaseskeep stablemore water to flush salts0.5 ratio1.05 ratio1.6 ratio
Figure 7. P2 does not have a constant threshold. The system measures the quantity of salt in the root zone. It lets the substrate dry to increase the concentration of the feed, or it applies more water to flush the salts. Thus the EC stays in the correct range.[2]
Climate and safety

Environment controls and safety interlocks

The system controls the climate of the room and the irrigation. The dehumidifiers start when the humidity is 5% more than the target. The 4 relays start one after the other, with 10 seconds between the starts, to prevent a current peak at start. The dehumidifiers stop when the humidity is 2% less than the target.

The humidifier uses the same logic in the opposite direction. The system injects CO2 when its concentration is 50 ppm less than the target, and only during lights-on. The injection always stops at lights-off.

Some safety layers operate independently and at the same time. Thus one fault cannot keep the valves open.

The master gate lets irrigation occur only if all these conditions occur at the same time. The Enabled toggle of the system is on, and maintenance mode is off. The leak sensor does not show a leak, and the tank is OK. The clock is in the time window.

A valve watchdog closes each table valve that is open for more than 3 minutes. Each day at 3 AM, an audit closes all valves and the CO2 injection. The audit is a reset. Maintenance mode closes all valves immediately.

Safety in many layers

Do not set a safety layer to off to make the system easier. You must keep all the layers. The system uses more than one check. If the master gate gives an incorrect decision, the valve watchdog and the audit each day close the valves.

The safety layers. Two of them (leak, tank-low) operate only after you install their sensors. Read the last section.
ProtectionFunctionAutomatic?
Master gateIt lets irrigation occur only if all these conditions occur at the same time. The Enabled toggle of the system is on, and maintenance mode is off. The leak sensor does not show a leak, and the tank is OK. The clock is in the time window.Yes
Valve watchdogIt closes each table valve that is open for more than 3 minutes.Yes
Mains watchdogIt closes the mainline valve if the valve is open for more than 24 minutes.Yes
Leak abortIt stops all irrigation if the leak sensor shows a leak.Yes (when the system has the sensor)
Tank-low abortIt stops irrigation if the tank float shows a low water level.Yes (when the system has the sensor)
Maintenance modeIt closes all valves immediately. It prevents new shots.Manual toggle
Alert for an offline sensorIt tells you when a probe or a device becomes offline.Yes
Audit at 3 AM each dayIt is a reset each day. It closes all valves and the CO2 injection.Yes
CO2 closes at lights-offIt always stops the CO2 injection at lights-off.Yes
One step at a time

Commissioning procedure

Start the system in sequence. Make sure that each layer operates correctly before you start the next layer. If you start crop steering on equipment that you did not examine, a table can have too much water.

  1. 1
    Examine the equipment
    Make sure that each probe and the relay board show Online in ESPHome. Make sure that the VWC value of a table is a correct number (for example, 47.4), and not a dash or zero.
  2. 2
    Do a test of each valve
    Open each valve with the manual control. Then close the valve immediately. Make sure that each valve operates. Open the mainline valve for a short time. Make sure that the pump starts on pressure.
  3. 3
    Set the window
    Set the irrigation window. For example, set the start to 08:30 (30 minutes after lights-on) and the end to 18:00 (2 hours before lights-off). Set the interval to 60 minutes and the time of each shot to 60 seconds.
  4. 4
    Set the system to on
    In the Command Center, set the system to on. Set maintenance mode to off. Set the Enabled toggle to on for only the tables that you want to irrigate.
  5. 5
    Do one test cycle
    Start one cycle. Monitor the valves while each valve opens and closes, one after the other. Make sure that water flows to the drippers and that runoff occurs.
  6. 6
    Set the climate and the steering
    Set the temperature and humidity targets for day and night, and a CO2 target. After you make sure that the irrigation operates correctly, you can select a steering mode and a crop profile.
Safe start setpoints. We selected these values to be safe. Change them only after you monitor the trends for one week.
SettingSafe start value
Window start08:30 (30 minutes after lights-on)
Window end18:00 (2 hours before lights-off)
Interval60 minutes
Shot time60 seconds
Temperature for day and night26 °C (79 °F) in the day and 22 °C (72 °F) at night
Relative humidity (RH)60%
CO2 target1200 ppm
Use each day

Operation each day and the dashboard

A check each day is short. When the system operates correctly, the Command Center shows these values for all 6 tables. The VWC is 30 to 70%. The EC is in your target range, and the substrate temperature is 20 to 26 °C (68 to 79 °F). The usual EC range is 2 to 6 mS/cm, and it is different for each stage. All the safety indicators are green.

On the Trends tab, the VWC graph must show a sawtooth. A sawtooth is a trace that decreases slowly and then increases quickly after each irrigation. A trace that is flat, or that only decreases, shows that irrigation does not occur. The graph gives you the first indication of a problem, before the system shows an error message.

  • Correct readings each day: VWC 30 to 70%, EC approximately 2 to 6 mS/cm, substrate temperature 20 to 26 °C (68 to 79 °F), and all safety indicators green
  • A VWC trace that is not a sawtooth is your first signal of a problem
  • To set a table to on or off, use the Enabled toggle in Zone Control
  • To stop the system in an emergency, set Maintenance Mode to on (this closes all valves) or use the emergency-stop script
The five dashboard tabs. On most days you open only Command Center and Trends. The other tabs are for changes.
TabInformation shownWhen to use it
Command CenterAll tables on one display: VWC, EC, temperature, and safety.Check of the condition each day
Zone ControlThe Enabled toggle for each table, and the manual valve controlsAdd a table, or stop irrigation of a table
TrendsGraphs of VWC and EC with timeMake sure that the VWC shows a sawtooth. Find the cause of a problem.
EnvironmentThe temperature, RH, and CO2 of the room, and their targetsTune the climate
ScheduleThe settings for window, interval, and shot timeAdjust the times of irrigation
Correct sawtooth and problem traceWhen the trace increases quickly, a shot supplies water. If it only decreases, no water goes to the table.3040516272t0t1t2t3t4t5t6t7VWC %
Figure 8. The correct trace decreases and then increases after each irrigation, many times. If your trace only decreases and does not increase, it shows a fault. Use the troubleshooting table.
When a fault occurs

Troubleshooting

You can find the cause of most problems with a short checklist. Start at the top and continue to the bottom, because the easiest checks find the most problems. Two examples are a check that the system is on and a check that the window is open.

If irrigation does not operate, make sure that the system is on and that maintenance mode is off. Make sure that the clock is in the window. Make sure that the Enabled toggle of a minimum of one table is on. Make sure that the irrigation-allowed binary sensor shows on.

If the VWC or EC shows Unavailable, make sure that the ESPHome device is online. Then reload the template entities. If the system also has no raw probe value, the probe has no connection. A correct VWC is possible only if the dielectric sensor operates. Thus a raw value that does not change shows a problem with the probe, and not with the software.[3]

Tune slowly

Operate the irrigation with set times for approximately one week, and monitor the VWC trends. Then change to crop steering that uses sensors. First make sure that the sensor readings are correct. Calibration drift in probes with a low cost is frequent. It causes errors in each decision that uses the readings.[4]

The five frequent faults. The rows for the 0.0-second shot and for entity not found frequently have the same cause (a missing input or an input with an incorrect prefix).
ProblemPossible causeFirst step
Irrigation does not operateThe system is off, maintenance mode is on, the clock is not in the window, or no table has the Enabled toggle on.Make sure that the system is on and that maintenance mode is off. Make sure that the clock is in the window and that the Enabled toggle of a table is on. Make sure that the irrigation-allowed sensor is on.
The VWC or EC shows UnavailableThe ESPHome device is offline, or the template entity has no new data.Make sure that the device is online. Reload the template entities. Then examine the connection of the probe.
The shots show 0.0 sThe substrate volume or the dripper flow rate has no value, or the known prefix fault occurs.Set the substrate volume (10 L / 2.6 gal) and the dripper flow rate (2 L/hr / 0.5 gal/hr). Do a check for the crop_steering_ prefix fault.
A valve that stays openThe relay stays on, or the watchdog does not operate.First, set maintenance mode to on. Then set the valve to off with a service in Home Assistant. Then remove the power from the relay board.
Entity not foundThe integration tries to find entities with the prefix crop_steering_.Make sure that the entity IDs agree. If the known prefix fault occurs, the system cannot find the inputs for volume and flow rate.
The settings that you tune. The system calculates the shot time from these values. Thus an incorrect substrate volume or flow rate gives incorrect shot times, or a shot time of zero.
SettingDefinitionDefaultHow to measure
Substrate volumeLiters of substrate for each pot10 L (2.6 gal)Volume of the pot × fill fraction
Dripper flow rateThe quantity of water that each dripper supplies in one hour2 L/hr (0.5 gal/hr)Read the number on the dripper, or do a catch test.
Drippers for each plantThe number of emitters that supply feed to one plant1 to 2Count the emitters on the plant
Field capacityThe maximum VWC before runoff occurs70%Saturate the substrate. Let it drain. Read the sensor.
The limits

Expected results and limitations

You cannot be sure of the results

The basic system gives automatic control of the irrigation times and automatic decisions from sensor data. The sensors and the plumbing set the limit for the performance of the system. The tank-low abort and the leak abort always show ‘safe’ and will not operate, until you install the tank float switch and the leak sensor. In this condition, do not operate the system without a person to monitor it.

There are two more limits. Without a leaf-temperature sensor, the system calculates the VPD from the air temperature of the room, and the VPD is less accurate. The optional AppDaemon layer is necessary for automatic changes between the P0 to P3 phases without a person. The basic system does not include this layer. Before you use the automation, operate the system with only a timer for approximately one week. Monitor the system in this time.

These items are not safe at this time. Install the float switch and the leak sensor before you operate the system without a person to monitor it. Each other missing sensor has a smaller effect, and the system continues to operate. These two missing sensors remove a protection.
Sensor that is not connectedEffect when there is no sensor
Tank float switchThere is no tank-low abort. The pump can operate when the tank is empty.
Leak sensorThere is no leak abort. A leak does not stop irrigation.
Tank pH and EC probesThe tank pH and EC show Unavailable. Mix the nutrient tank manually.
Leaf-temperature sensorThe system calculates the VPD from the air temperature of the room and not from the leaf temperature. The steering is less accurate.

First, read one usual day on the Trends tab. Then change one setting at a time. To know the biology of the dryback and the P0 to P3 rhythm, read the crop steering in coir paper. To know how the probe measures the root zone, read the root-zone sensor guide.

Related papers

References

  1. Caplan, D., Dixon, M., & Zheng, Y. (2019). Increasing inflorescence dry weight and cannabinoid content in medical cannabis using controlled drought stress. HortScience, 54(5), 964-969. https://doi.org/10.21273/HORTSCI13510-18
  2. Yang, B., Fu, P., Lu, J., Ma, F., Sun, X., & Fang, Y. (2022). Regulated deficit irrigation: an effective way to solve the shortage of agricultural water for horticulture. Stress Biology, 2, 28. https://doi.org/10.1007/s44154-022-00050-5
  3. Topp, G. C., Davis, J. L., & Annan, A. P. (1980). Electromagnetic determination of soil water content: Measurements in coaxial transmission lines. Water Resources Research, 16(3), 574-582. https://doi.org/10.1029/WR016i003p00574
  4. Mane, S., Das, N., Singh, G., Cosh, M., & Dong, Y. (2024). Advancements in dielectric soil moisture sensor calibration: A comprehensive review of methods and techniques. Computers and Electronics in Agriculture, 218, 108686. https://doi.org/10.1016/j.compag.2024.108686

Each citation in the paper, for example [1], refers to an item in this list. Each item is a primary source or an instruction from an authority, unless the item shows a different type. The results of cannabis tissue culture change much with the genotype. Before you use the dilutions, hormone doses and local regulations, make sure that they agree with the primary sources.