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.
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.
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.
Evidence and limitations
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.
- 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.
- Procedures for installation and servicing of a manifold that sensors control.
- 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 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 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.
| Device | Function | Connection |
|---|---|---|
| KC868 E16S relay board | It 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 |
| Humidifier | It increases the RH of the room. | Relay |
| Dehumidifiers (×4) | They decrease the RH of the room. They start one after the other. | Relay |
| Lights | They set the photoperiod and the lights-on window. | Relay, with a timer |
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 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.
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.
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.
| Protection | Function | Automatic? |
|---|---|---|
| Master gate | It 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 watchdog | It closes each table valve that is open for more than 3 minutes. | Yes |
| Mains watchdog | It closes the mainline valve if the valve is open for more than 24 minutes. | Yes |
| Leak abort | It stops all irrigation if the leak sensor shows a leak. | Yes (when the system has the sensor) |
| Tank-low abort | It stops irrigation if the tank float shows a low water level. | Yes (when the system has the sensor) |
| Maintenance mode | It closes all valves immediately. It prevents new shots. | Manual toggle |
| Alert for an offline sensor | It tells you when a probe or a device becomes offline. | Yes |
| Audit at 3 AM each day | It is a reset each day. It closes all valves and the CO2 injection. | Yes |
| CO2 closes at lights-off | It always stops the CO2 injection at lights-off. | Yes |
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.
- 1Examine the equipmentMake 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.
- 2Do a test of each valveOpen 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.
- 3Set the windowSet 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.
- 4Set the system to onIn 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.
- 5Do one test cycleStart 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.
- 6Set the climate and the steeringSet 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.
| Setting | Safe start value |
|---|---|
| Window start | 08:30 (30 minutes after lights-on) |
| Window end | 18:00 (2 hours before lights-off) |
| Interval | 60 minutes |
| Shot time | 60 seconds |
| Temperature for day and night | 26 °C (79 °F) in the day and 22 °C (72 °F) at night |
| Relative humidity (RH) | 60% |
| CO2 target | 1200 ppm |
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
| Tab | Information shown | When to use it |
|---|---|---|
| Command Center | All tables on one display: VWC, EC, temperature, and safety. | Check of the condition each day |
| Zone Control | The Enabled toggle for each table, and the manual valve controls | Add a table, or stop irrigation of a table |
| Trends | Graphs of VWC and EC with time | Make sure that the VWC shows a sawtooth. Find the cause of a problem. |
| Environment | The temperature, RH, and CO2 of the room, and their targets | Tune the climate |
| Schedule | The settings for window, interval, and shot time | Adjust the times of irrigation |
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]
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]
| Problem | Possible cause | First step |
|---|---|---|
| Irrigation does not operate | The 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 Unavailable | The 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 s | The 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 open | The 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 found | The 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. |
| Setting | Definition | Default | How to measure |
|---|---|---|---|
| Substrate volume | Liters of substrate for each pot | 10 L (2.6 gal) | Volume of the pot × fill fraction |
| Dripper flow rate | The quantity of water that each dripper supplies in one hour | 2 L/hr (0.5 gal/hr) | Read the number on the dripper, or do a catch test. |
| Drippers for each plant | The number of emitters that supply feed to one plant | 1 to 2 | Count the emitters on the plant |
| Field capacity | The maximum VWC before runoff occurs | 70% | Saturate the substrate. Let it drain. Read the sensor. |
Expected results and limitations
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.
| Sensor that is not connected | Effect when there is no sensor |
|---|---|
| Tank float switch | There is no tank-low abort. The pump can operate when the tank is empty. |
| Leak sensor | There is no leak abort. A leak does not stop irrigation. |
| Tank pH and EC probes | The tank pH and EC show Unavailable. Mix the nutrient tank manually. |
| Leaf-temperature sensor | The 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.
References
- 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
- 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
- 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
- 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.