{"id":52315,"date":"2026-11-01T10:50:56","date_gmt":"2026-11-01T10:50:56","guid":{"rendered":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/"},"modified":"2026-11-01T10:50:56","modified_gmt":"2026-11-01T10:50:56","slug":"plant-watering-system","status":"publish","type":"siratek_tutorial","link":"https:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/","title":{"rendered":"Project, Automatic Plant Watering"},"content":{"rendered":"<body><p><\/p>\n<h2>What you will build<\/h2>\n<p>A plant that waters itself. A probe in the pot, a pump in a bucket, and a sketch that decides when the soil is dry enough to do something about it.<\/p>\n<p>It is the first project in this library that can do damage while behaving exactly as written. The sensor is a conductivity probe whose numbers mean nothing in absolute terms, the pump is destroyed by running dry, and the thing you are controlling takes <strong>minutes<\/strong> to respond to what you did. Get the loop wrong and you come home to a flooded room or a dead pump.<\/p>\n<p>So this project is really about one idea: <strong>how to control something that answers slowly, when being wrong is expensive.<\/strong> Everything else is two sensors and a relay.<\/p>\n<h2>Before you begin<\/h2>\n<h3>Parts<\/h3>\n<table>\n<thead>\n<tr>\n<th>Part<\/th>\n<th>Siratek product<\/th>\n<th>Its own tutorial<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Arduino Uno<\/td>\n<td>2219<\/td>\n<td><em>Getting Started with Arduino Uno<\/em><\/td>\n<\/tr>\n<tr>\n<td>Soil moisture probe<\/td>\n<td>2841<\/td>\n<td><em>Reading Soil Moisture<\/em><\/td>\n<\/tr>\n<tr>\n<td>Submersible pump<\/td>\n<td>2808<\/td>\n<td><em>Driving a Submersible Water Pump<\/em><\/td>\n<\/tr>\n<tr>\n<td>Relay module<\/td>\n<td>3308<\/td>\n<td><em>Switching Bigger Loads with a Relay<\/em><\/td>\n<\/tr>\n<tr>\n<td>Water level sensor<\/td>\n<td>2923<\/td>\n<td><em>Water Level and Rain Detection<\/em><\/td>\n<\/tr>\n<tr>\n<td>Breadboard and jumper wires<\/td>\n<td><\/td>\n<td><em>Using a Breadboard<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Also needed, and not from the parts list: <strong>a 12 V supply able to give at least 500 mA<\/strong>, silicone or PVC tube to fit the pump outlet, a bucket or tank, a 1N4007 diode, and a measuring jug.<\/p>\n<h3>Read this first: three ways this project destroys something<\/h3>\n<p>Each of these is covered on a component page. Together they are the reason the sketch looks more careful than the task sounds.<\/p>\n<p><strong>The pump dies if it runs dry.<\/strong> It is cooled and lubricated by the water it moves. A few minutes in an empty tank can ruin the bearing. <em>Driving a Submersible Water Pump<\/em> says this plainly, and it is why the water level sensor is in the parts list rather than the \u201cmaking it yours\u201d section.<\/p>\n<p><strong>The room floods if the pump runs long.<\/strong> 240 litres an hour is four litres a minute at zero lift. A stuck-dry probe and an unlimited loop will empty the bucket onto the floor.<\/p>\n<p><strong>The plant drowns if the loop is impatient.<\/strong> This is the subtle one, and the next section is about it.<\/p>\n<h3>The feedback loop is slow, and that decides the design<\/h3>\n<p>Water the pot and the probe does not change its mind straight away. The water has to soak through the soil and reach the electrodes, and depending on the pot and the compost that takes <strong>anywhere from one to ten minutes<\/strong>.<\/p>\n<p>A loop that waters, reads, sees \u201cstill dry\u201d and waters again will keep watering until the pot overflows. It will have done precisely what it was told.<\/p>\n<p>So the sketch below never reads the probe and acts on it in one breath. After every watering it enters a <strong>soak period<\/strong> and refuses to even consider watering again until that has passed. The soak time is not a refinement; it is the thing that makes the project safe.<\/p>\n<p>This is the general shape of controlling anything with a lag \u2014 a heater, a fan, a motor driving a load \u2014 and a plant pot is a forgiving place to learn it.<\/p>\n<h3>Numbers you must measure, not copy<\/h3>\n<p><strong>Your own dry and wet thresholds.<\/strong> The probe measures conductivity, not water, so its numbers mean something only against other numbers from the same probe in the same pot. <em>Reading Soil Moisture<\/em> explains why a value copied from a tutorial, this one included, is worthless.<\/p>\n<p><strong>Your pump\u2019s actual flow.<\/strong> The label says 240 L\/h at zero lift, and lifting water a metre through a narrow tube can easily halve that. The pump page has a ten-second measuring sketch; run it with the tube and the height your build actually uses.<\/p>\n<p>From those two you get the watering time. If you measure 400 ml in ten seconds and the pot takes 200 ml, water for five seconds.<\/p>\n<h3>Where the probe goes<\/h3>\n<p>Push it into the soil near the plant, roughly <strong>half-way between the stem and the pot wall<\/strong>, deep enough to reach the root zone. Keep the outlet tube away from it: dribbling water straight onto the probe reads as a watered pot when nothing has reached the roots.<\/p>\n<p>Mark the depth, because pulling the probe out and pushing it back somewhere else changes every threshold you measured.<\/p>\n<h2>How it works<\/h2>\n<p>Four jobs, none of which blocks any other:<\/p>\n<table>\n<thead>\n<tr>\n<th>Job<\/th>\n<th>How often<\/th>\n<th>Why<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Read the soil probe<\/td>\n<td>Every 10 minutes<\/td>\n<td>Soil does not change faster; the probe corrodes if left powered<\/td>\n<\/tr>\n<tr>\n<td>Read the tank level<\/td>\n<td>Just before watering<\/td>\n<td>It only matters at that moment<\/td>\n<\/tr>\n<tr>\n<td>Water<\/td>\n<td>At most once per soak period<\/td>\n<td>The lag described above<\/td>\n<\/tr>\n<tr>\n<td>Count the day\u2019s waterings<\/td>\n<td>Rolling 24 hours<\/td>\n<td>A cap nothing can argue with<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The decision to water needs <strong>all<\/strong> of these to be true:<\/p>\n<ol>\n<li>The soil reading is above the dry threshold.<\/li>\n<li>The soak period since the last watering has expired.<\/li>\n<li>The tank has water.<\/li>\n<li>Fewer than the daily maximum waterings have happened.<\/li>\n<\/ol>\n<p>And while the pump runs, one further rule applies that consults none of the above: <strong>the pump stops after its run time, whatever anything else thinks.<\/strong> That check lives on its own in <code>loop()<\/code> and is the last line of defence if a condition above is computed wrongly.<\/p>\n<p>The state machine is three states, which is as simple as this can honestly be:<\/p>\n<table>\n<thead>\n<tr>\n<th>State<\/th>\n<th>What it means<\/th>\n<th>What ends it<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>IDLE<\/code><\/td>\n<td>Watching the soil<\/td>\n<td>A dry reading with all conditions met<\/td>\n<\/tr>\n<tr>\n<td><code>WATERING<\/code><\/td>\n<td>Pump on<\/td>\n<td>The run time expires<\/td>\n<\/tr>\n<tr>\n<td><code>SOAKING<\/code><\/td>\n<td>Waiting for the water to reach the probe<\/td>\n<td>The soak time expires<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Readings continue in all three states. Only the decision is suspended.<\/p>\n<h2>Build it in stages<\/h2>\n<p>Do not wire the pump until stage 3. Every flooded bench in the history of this project came from starting at the end.<\/p>\n<h3>Stage 1: the probe, on its own<\/h3>\n<p>Wire the soil probe as in its own tutorial, power from a digital pin rather than the <code>5V<\/code> rail, and run its example. Write down two numbers:<\/p>\n<ul>\n<li>The reading with the probe in <strong>dry<\/strong> soil, the state you want to water at.<\/li>\n<li>The reading just after you water by hand, when the pot is as wet as you want it.<\/li>\n<\/ul>\n<p>Those become <code>DRY_ABOVE<\/code> and <code>WET_BELOW<\/code>. Leave a wide gap between them.<\/p>\n<p>Then do the slow test that matters: water the pot by hand and watch the reading in the serial monitor. <strong>Time how long it takes to fall.<\/strong> That measurement is your soak period, with a generous margin added.<\/p>\n<h3>Stage 2: the tank sensor<\/h3>\n<p>Add the water level sensor and find the reading that corresponds to \u201cenough water to pump\u201d. The sensor need not be precise here; it answers one question, which is whether the pump\u2019s inlet is submerged. Mount it so it reads dry <strong>before<\/strong> the pump\u2019s inlet is uncovered, not after.<\/p>\n<h3>Stage 3: the pump, in a bucket, on the floor<\/h3>\n<p>Wire the relay and the pump as in the pump tutorial, with the diode, with a separate 12 V supply, with the grounds joined. Run the pump page\u2019s ten-second measuring sketch and work out millilitres per second.<\/p>\n<p>Keep everything in a washing-up bowl for this stage.<\/p>\n<h3>Stage 4: put it together<\/h3>\n<p>The complete sketch below. Run it first with <code>MAX_RUN<\/code> set to one second and the soak period set to one minute, so you can watch a full cycle in a few minutes rather than overnight. Then set the real values.<\/p>\n<h2>Pin reference<\/h2>\n<table>\n<thead>\n<tr>\n<th>Device<\/th>\n<th>Pin<\/th>\n<th>Connect to<\/th>\n<th>Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Soil probe<\/td>\n<td><code>VCC<\/code><\/td>\n<td>Uno <code>D4<\/code><\/td>\n<td>Switched, so the probe is only live while reading<\/td>\n<\/tr>\n<tr>\n<td>Soil probe<\/td>\n<td><code>GND<\/code><\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Soil probe<\/td>\n<td><code>AO<\/code><\/td>\n<td>Uno <code>A0<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Tank sensor<\/td>\n<td><code>+<\/code><\/td>\n<td>Uno <code>D5<\/code><\/td>\n<td>Switched, for the same reason<\/td>\n<\/tr>\n<tr>\n<td>Tank sensor<\/td>\n<td><code>-<\/code><\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Tank sensor<\/td>\n<td><code>S<\/code><\/td>\n<td>Uno <code>A1<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Relay<\/td>\n<td><code>VCC<\/code><\/td>\n<td>Uno <code>5V<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Relay<\/td>\n<td><code>GND<\/code><\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Relay<\/td>\n<td><code>IN<\/code><\/td>\n<td>Uno <code>D8<\/code><\/td>\n<td>LOW energises on this board<\/td>\n<\/tr>\n<tr>\n<td>Relay<\/td>\n<td><code>COM<\/code><\/td>\n<td>12 V supply <code>+<\/code><\/td>\n<td>Load side<\/td>\n<\/tr>\n<tr>\n<td>Relay<\/td>\n<td><code>NO<\/code><\/td>\n<td>Pump red<\/td>\n<td>Off when unpowered<\/td>\n<\/tr>\n<tr>\n<td>Pump<\/td>\n<td>black<\/td>\n<td>12 V supply <code>-<\/code><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Diode<\/td>\n<td>across the pump<\/td>\n<td>Banded end to red<\/td>\n<td>1N4007<\/td>\n<\/tr>\n<tr>\n<td>12 V supply<\/td>\n<td><code>-<\/code><\/td>\n<td><strong>Also Uno <code>GND<\/code><\/strong><\/td>\n<td>Shared reference<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<figure class=\"siratek-tutorial-figure\"><img decoding=\"async\" src=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg\" alt=\"An automatic watering system with a soil probe and a tank level sensor both powered from switched digital pins, a relay driving a submersible pump from its own 12 volt supply, and the soak period that stops the pot being watered twice\" loading=\"lazy\"><figcaption>The pot answers in minutes, not seconds. The soak period is what stops a slow sensor becoming a flood.<\/figcaption><\/figure>\n<h2>The complete sketch<\/h2>\n<pre><code>\/\/ Siratek: automatic plant watering.\n\/\/ Four conditions must agree before the pump runs, and one limit\n\/\/ stops it regardless of what the other three decided.\n\nconst int soilPowerPin = 4;\nconst int soilPin       = A0;\nconst int tankPowerPin  = 5;\nconst int tankPin       = A1;\nconst int pumpPin       = 8;\nconst int faultLedPin   = 13;      \/\/ the onboard LED\n\n\/\/ Relay polarity: see Switching Bigger Loads with a Relay.\nconst int PUMP_ON  = LOW;\nconst int PUMP_OFF = HIGH;\n\n\/\/ ---- Measured on YOUR pot and YOUR pump. See stages 1 and 3. ----\nconst int DRY_ABOVE = 700;         \/\/ water above this\nconst int WET_BELOW = 450;         \/\/ satisfied below this\nconst int TANK_EMPTY_BELOW = 300;  \/\/ below this, do not run the pump\n\nconst unsigned long MAX_RUN   = 6000UL;        \/\/ 6 seconds of pumping\nconst unsigned long SOAK_TIME = 900000UL;      \/\/ 15 minutes to reach the probe\nconst unsigned long CHECK_EVERY = 600000UL;    \/\/ read the soil every 10 minutes\n\nconst int MAX_PER_DAY = 4;\nconst unsigned long DAY = 86400000UL;\n\/\/ -----------------------------------------------------------------\n\nenum State { IDLE, WATERING, SOAKING };\nState state = IDLE;\n\nunsigned long stateSince = 0;\nunsigned long lastCheck = 0;\n\nint soil = 0;\nint tank = 0;\n\n\/\/ A rolling 24 hours of watering times.\nunsigned long wateredAt[8];\nint waterings = 0;\n\nbool faulted = false;\n\nint readSwitched(int powerPin, int analogPin) {\n  digitalWrite(powerPin, HIGH);\n  delay(200);                       \/\/ let the reading settle\n\n  long total = 0;\n  for (int i = 0; i &lt; 8; i++) {\n    total += analogRead(analogPin);\n    delay(10);\n  }\n\n  digitalWrite(powerPin, LOW);\n  return total \/ 8;\n}\n\n\/\/ How many waterings in the last 24 hours, discarding older ones.\nint wateringsToday() {\n  int kept = 0;\n  for (int i = 0; i &lt; waterings; i++) {\n    if (millis() - wateredAt[i] &lt; DAY) {\n      wateredAt[kept] = wateredAt[i];\n      kept++;\n    }\n  }\n  waterings = kept;\n  return kept;\n}\n\nvoid enter(State next) {\n  state = next;\n  stateSince = millis();\n}\n\nvoid pumpOff() {\n  digitalWrite(pumpPin, PUMP_OFF);\n}\n\nvoid setup() {\n  digitalWrite(pumpPin, PUMP_OFF);   \/\/ before pinMode, so it cannot pulse on\n  pinMode(pumpPin, OUTPUT);\n\n  pinMode(soilPowerPin, OUTPUT);\n  pinMode(tankPowerPin, OUTPUT);\n  pinMode(faultLedPin, OUTPUT);\n  digitalWrite(soilPowerPin, LOW);\n  digitalWrite(tankPowerPin, LOW);\n\n  Serial.begin(9600);\n  Serial.println(F(\"Siratek: plant watering.\"));\n\n  lastCheck = millis() - CHECK_EVERY;   \/\/ read once at startup\n  enter(IDLE);\n}\n\nvoid loop() {\n  \/\/ 1. The limit that consults nothing. If the pump is on and its time\n  \/\/    is up, it goes off, whatever any condition below believes.\n  if (state == WATERING &amp;&amp; millis() - stateSince &gt;= MAX_RUN) {\n    pumpOff();\n    Serial.println(F(\"pump off, run time reached\"));\n    enter(SOAKING);\n  }\n\n  \/\/ 2. Readings continue in every state.\n  if (millis() - lastCheck &gt;= CHECK_EVERY) {\n    lastCheck = millis();\n    soil = readSwitched(soilPowerPin, soilPin);\n\n    Serial.print(F(\"soil = \"));\n    Serial.print(soil);\n    Serial.print(F(\"  state = \"));\n    Serial.print(state == IDLE ? F(\"idle\") : state == WATERING ? F(\"watering\") : F(\"soaking\"));\n    Serial.print(F(\"  waterings today = \"));\n    Serial.println(wateringsToday());\n  }\n\n  \/\/ 3. The soak period has to expire before anything else is considered.\n  if (state == SOAKING &amp;&amp; millis() - stateSince &gt;= SOAK_TIME) {\n    Serial.println(F(\"soak finished\"));\n    enter(IDLE);\n  }\n\n  \/\/ 4. The decision, which only happens from IDLE.\n  if (state != IDLE) {\n    return;\n  }\n\n  if (soil &lt;= DRY_ABOVE) {\n    return;                          \/\/ not dry enough\n  }\n\n  if (wateringsToday() &gt;= MAX_PER_DAY) {\n    if (!faulted) {\n      faulted = true;\n      digitalWrite(faultLedPin, HIGH);\n      Serial.println(F(\"DAILY LIMIT REACHED: still dry after four waterings.\"));\n      Serial.println(F(\"Something is wrong. Check the tube, the probe and the pot.\"));\n    }\n    return;\n  }\n\n  tank = readSwitched(tankPowerPin, tankPin);\n  if (tank &lt; TANK_EMPTY_BELOW) {\n    if (!faulted) {\n      faulted = true;\n      digitalWrite(faultLedPin, HIGH);\n      Serial.print(F(\"TANK EMPTY: \"));\n      Serial.println(tank);\n    }\n    return;\n  }\n\n  \/\/ Everything agrees.\n  faulted = false;\n  digitalWrite(faultLedPin, LOW);\n\n  wateredAt[waterings % 8] = millis();\n  if (waterings &lt; 8) {\n    waterings++;\n  }\n\n  digitalWrite(pumpPin, PUMP_ON);\n  Serial.println(F(\"pump on\"));\n  enter(WATERING);\n}<\/code><\/pre>\n<h3>Four decisions worth explaining<\/h3>\n<p><strong>The run-time check is the first thing in <code>loop()<\/code>.<\/strong> Not the last, and not inside the decision logic. Whatever else is wrong \u2014 a threshold inverted, a sensor stuck, a condition mis-typed \u2014 the pump still stops after six seconds, because that check reads only the clock and the state.<\/p>\n<p><strong>The daily limit is a fault, not a schedule.<\/strong> Four waterings and a pot that is still dry means the tube has come off, the probe has moved, or the water is not going where you think. The right response is to stop and light the LED, not to keep pumping. A system that silently keeps trying is how a small problem becomes a big one.<\/p>\n<p><strong>The tank is read only when watering is about to happen.<\/strong> It is the one reading whose age matters: a level taken ten minutes ago tells you nothing useful about whether the inlet is submerged now.<\/p>\n<p><strong><code>WET_BELOW<\/code> is in the thresholds but not in the decision.<\/strong> It is there for the hysteresis you will want when you extend this \u2014 a \u201csatisfied\u201d state that has to be properly reached before dryness counts again. Left as written, the soak period plus the daily cap already prevent flapping, and one mechanism doing the job clearly beats two doing it partly.<\/p>\n<h2>Testing it<\/h2>\n<p>Work down this list before leaving it alone with a plant. The last two are the ones that matter.<\/p>\n<table>\n<thead>\n<tr>\n<th>Try this<\/th>\n<th>It should<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Lift the probe into the air<\/td>\n<td>Read very dry, and water once, then soak<\/td>\n<\/tr>\n<tr>\n<td>Water the pot by hand during a soak<\/td>\n<td>Nothing happens until the soak expires<\/td>\n<\/tr>\n<tr>\n<td>Pull the tube off the pump outlet<\/td>\n<td>Pump runs, nothing reaches the pot, four waterings then the fault LED<\/td>\n<\/tr>\n<tr>\n<td>Lift the pump out of the bucket<\/td>\n<td>Tank reads empty, pump refuses to run, fault LED on<\/td>\n<\/tr>\n<tr>\n<td>Set <code>MAX_RUN<\/code> to 60000 and start a watering, then reason about it<\/td>\n<td>It cannot: the limit is checked first<\/td>\n<\/tr>\n<tr>\n<td>Unplug the probe entirely<\/td>\n<td>Reading goes to one extreme; see which, and whether that is safe<\/td>\n<\/tr>\n<tr>\n<td>Let it run for a full day<\/td>\n<td>At most four waterings, logged with their times<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>The fourth test is the one that proves the project.<\/strong> A watering system that keeps pumping into an empty bucket destroys the pump, and the only way to know yours will not is to take the pump out and watch it refuse.<\/p>\n<p>The sixth test deserves a thought too. An unplugged probe floats to a reading that may look dry, which would water a pot that needs nothing. Decide what your build should do about that \u2014 a plausibility window around the reading is the usual answer, and <em>Making a Project Survive Unattended<\/em> has the general case.<\/p>\n<h2>Making it yours<\/h2>\n<ul>\n<li><strong>Log every watering.<\/strong> The SD card module and the DS3231 give you a dated line per watering, and a month of those tells you more about your plant than any single reading. <em>Project, a Standalone Data Logger<\/em> is the pattern.<\/li>\n<li><strong>Show the state.<\/strong> An I2C LCD or OLED displaying the soil reading, the state and the waterings today makes the whole thing legible without a serial cable.<\/li>\n<li><strong>Two pots.<\/strong> The two-channel relay drives two pumps, with the interlock that page describes so only one runs at a time. The decision logic stays as it is, once per pot.<\/li>\n<li><strong>Put it on the network.<\/strong> The ESP32 MQTT node publishes the reading and the waterings, so a failed tube becomes a message on your phone rather than a dead plant.<\/li>\n<li><strong>A float switch instead of the level sensor.<\/strong> More reliable, mechanically, than a resistive level board, and it answers the same single question.<\/li>\n<\/ul>\n<p>What not to do: water on a timer alone, with no probe. It works until the weather changes.<\/p>\n<h2>Troubleshooting<\/h2>\n<table>\n<thead>\n<tr>\n<th>Symptom<\/th>\n<th>Likely cause<\/th>\n<th>Check or fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Pump never runs<\/td>\n<td>Soil reading below <code>DRY_ABOVE<\/code><\/td>\n<td>Print the reading; thresholds are yours to measure<\/td>\n<\/tr>\n<tr>\n<td>Pump never runs, soil clearly dry<\/td>\n<td>Tank reading low, or daily cap hit<\/td>\n<td>Watch the serial output for which<\/td>\n<\/tr>\n<tr>\n<td>Pump runs and will not stop<\/td>\n<td>Relay polarity inverted<\/td>\n<td><code>PUMP_OFF<\/code> must be the resting state<\/td>\n<\/tr>\n<tr>\n<td>Pot overflowed<\/td>\n<td>Soak period too short, or no tube<\/td>\n<td>The probe answers in minutes<\/td>\n<\/tr>\n<tr>\n<td>Watered twice in a minute<\/td>\n<td>Soak period not being entered<\/td>\n<td>Watering must always lead to <code>SOAKING<\/code><\/td>\n<\/tr>\n<tr>\n<td>Pump hot, no water moved<\/td>\n<td>Ran dry<\/td>\n<td>Stop; the tank check exists for this<\/td>\n<\/tr>\n<tr>\n<td>Soil reading drifts over weeks<\/td>\n<td>Probe corroding<\/td>\n<td>It is only powered while reading; check <code>D4<\/code><\/td>\n<\/tr>\n<tr>\n<td>Soil reading never changes<\/td>\n<td>Probe <code>VCC<\/code> on the <code>5V<\/code> rail<\/td>\n<td>It must be on the switched pin<\/td>\n<\/tr>\n<tr>\n<td>Reading high after watering<\/td>\n<td>Water has not reached the probe yet<\/td>\n<td>That is the whole point of the soak<\/td>\n<\/tr>\n<tr>\n<td>Arduino resets when the pump starts<\/td>\n<td>Shared supply<\/td>\n<td>Separate 12 V, grounds joined<\/td>\n<\/tr>\n<tr>\n<td>Fault LED on and nothing happens<\/td>\n<td>A fault, as designed<\/td>\n<td>Read the serial message; it says which<\/td>\n<\/tr>\n<tr>\n<td>Everything works on the bench, not in the pot<\/td>\n<td>Thresholds measured in the wrong soil<\/td>\n<td>Measure in the pot it will live in<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Sources and attribution<\/h2>\n<p>All text, wiring guidance and code in this project are original Siratek work.<\/p>\n<ul>\n<li>Component behaviour is as described in <em>Reading Soil Moisture<\/em>, <em>Driving a Submersible Water Pump<\/em>, <em>Switching Bigger Loads with a Relay<\/em> and <em>Water Level and Rain Detection<\/em>, including the probe\u2019s conductivity measurement and corrosion, the switched-power reading, the pump\u2019s 350 mA at 12 V and its need to stay wet, and the relay\u2019s low-level trigger.<\/li>\n<li>The soak period, the daily cap and the placement of the run-time check are Siratek\u2019s own design decisions for this project, with the reasoning given rather than asserted.<\/li>\n<\/ul>\n<p>Thresholds, flow rate and soak time are specific to one pot, one pump and one plant, so the tutorial gives procedures for measuring each rather than values to copy. <strong>This project has not yet been built and run on hardware<\/strong>; the figures in the sketch are starting points, and the Testing section is written to be worked through rather than read. No third-party tutorial text, diagrams, photographs or code has been reproduced here.<\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>A plant that waters itself. A probe in the pot, a pump in a bucket, and a sketch that decides when the soil is dry enough to do something about it.<\/p>\n","protected":false},"featured_media":0,"template":"","siratek_tutorial_level":[],"class_list":["post-52315","siratek_tutorial","type-siratek_tutorial","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Project, Automatic Plant Watering - siratek<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Project, Automatic Plant Watering - siratek\" \/>\n<meta property=\"og:description\" content=\"A plant that waters itself. A probe in the pot, a pump in a bucket, and a sketch that decides when the soil is dry enough to do something about it.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/\" \/>\n<meta property=\"og:site_name\" content=\"siratek\" \/>\n<meta property=\"og:image\" content=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/\",\"url\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/\",\"name\":\"Project, Automatic Plant Watering - siratek\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/plant-watering-system-wiring.svg\",\"datePublished\":\"2026-11-01T10:50:56+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/#primaryimage\",\"url\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/plant-watering-system-wiring.svg\",\"contentUrl\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/plant-watering-system-wiring.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/plant-watering-system\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/siratek.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Project, Automatic Plant Watering\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\",\"url\":\"https:\\\/\\\/siratek.net\\\/\",\"name\":\"siratek\",\"description\":\"Your Best Electronic Retail Shop\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/siratek.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Project, Automatic Plant Watering - siratek","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/","og_locale":"en_US","og_type":"article","og_title":"Project, Automatic Plant Watering - siratek","og_description":"A plant that waters itself. A probe in the pot, a pump in a bucket, and a sketch that decides when the soil is dry enough to do something about it.","og_url":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/","og_site_name":"siratek","og_image":[{"url":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/","url":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/","name":"Project, Automatic Plant Watering - siratek","isPartOf":{"@id":"https:\/\/siratek.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/#primaryimage"},"image":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/#primaryimage"},"thumbnailUrl":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg","datePublished":"2026-11-01T10:50:56+00:00","breadcrumb":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/#primaryimage","url":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg","contentUrl":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/plant-watering-system-wiring.svg"},{"@type":"BreadcrumbList","@id":"http:\/\/siratek.net\/index.php\/tutorials\/plant-watering-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/siratek.net\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/siratek.net\/index.php\/tutorials\/"},{"@type":"ListItem","position":3,"name":"Project, Automatic Plant Watering"}]},{"@type":"WebSite","@id":"https:\/\/siratek.net\/#website","url":"https:\/\/siratek.net\/","name":"siratek","description":"Your Best Electronic Retail Shop","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/siratek.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial"}],"about":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/types\/siratek_tutorial"}],"version-history":[{"count":0,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52315\/revisions"}],"wp:attachment":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/media?parent=52315"}],"wp:term":[{"taxonomy":"siratek_tutorial_level","embeddable":true,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial_level?post=52315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}