Skip to content

Smart farming · The backyard farm AI runs series · Part 1

The backyard farm AI runs, part 1: the big picture

Greens grown to eat at home, with our own offline AI cutting daily work, keeping them sweet every season, and every crop traceable.

Published · Last updated

A backyard farm that AI watches and runsThe plotsensors, pump,misterESP32 boardreads, switchesrelays, ownssafetyEdge computer at homeraw data, trainsand runs our AICloudbackup control,summariesPhoneview, alerts,manual commandsLess daily workSweet greens every seasonAlways traceable

We grow vegetables at home to eat, not to sell. So what I want from the system is not maximum yield. It is three things: less daily work, sweet greens in every season, and a record I can check at any time of what each crop went through. The watching and the button-pressing that repeat all day, I hand to AI and the control system.

This series walks through the real system of the Baan Rak Phak farm one piece at a time. Each part has numbers from the farm, research that explains why we do it that way, and its limits stated plainly. This first part is the map for the whole series.

The whole system on one page

The plot has sensors for air, water, light and water level, plus a pump and a mister. An ESP32 board in a box beside the plot reads them every few seconds and switches the relays. The board also owns the safety rules: if it loses contact, it turns the water pump off at once without waiting for anyone, while a mister running a timed pulse finishes it (5 minutes at most) and then switches itself off, as of firmware 1.7.7.

Data goes two ways. The first is an edge computer in the house, which keeps the raw data, runs the models and is the main controller of the farm. The second is a cloud server, which backs up control and keeps summaries for viewing from outside. A phone shows the readings, receives alerts and can send commands by hand. All of this still depends on the house Wi-Fi, from which the board currently drops about once an hour or more often, for reasons not yet known; part 2 follows the search for the cause.

Terms used in this series: VPD (vapour pressure deficit) is how dry the air is, in kilopascals (kPa); the higher it is, the faster leaves lose water. DLI (daily light integral) is the total light a plant gets in a day, in moles per square metre per day (mol/m²/day). EC (electrical conductivity) of the nutrient solution shows how concentrated the feed is, in millisiemens per centimetre (mS/cm).

Every AI model in this series is trained offline on our own computer at home, from our own farm data and photos. Nothing is sent to an outside AI service. The data stays with us, the farm keeps running when the internet is down, and the models learn from our own plants, weather and water. The price is that we must collect good data ourselves. If data goes missing or drifts, the model may learn the wrong thing, which is what parts 2 and 3 are about.

How our AI learns (all inside the house, no internet needed)Our house1. Record everythinghow hot, how long we misted2. See what happenedhow much cooler it got3. Train the AIfind what works best4. Actmist only as much as neededThe longer it runs, the better it knows our farm

Shamshiri et al. (2018) reviewed automated climate control in greenhouses, which adjusts conditions more often and more precisely than a person can. Most of their cases are commercial greenhouses. Ours is an outdoor plot behind a house, where the climate can be controlled far less than in a greenhouse, so our system can only ease conditions, for example by misting in the heat; it cannot hold the temperature at a target.

Goal 1: less daily work

The work that wears you out is not the heavy jobs. It is small jobs done often. On sunny afternoons, salad greens need short pulses of mist to take the heat off the leaves. On 18 November 2026 the system ran 107 pulses by itself, 268 minutes in total; between 08:00 and 14:00 alone it ran 99, about one every 3–4 minutes. By hand, that is a press every 5 minutes on average from 8 am to 5 pm.

Mist pulses the system ran by itself per day (14–18 Nov 2026)14 pulses3 min14 Nov49 pulses28 min15 Nov90 pulses108 min16 Nov99 pulses246 min17 Nov107 pulses268 min18 NovBy hand, 107 pulses a day means a press every 5 minutes from 8 am to 5 pm

The count grew every day because I added rules one step at a time, not because later days worked better. These numbers show how much work the system took on; they cannot compare performance between days. The rules added were a temperature rule, a humidity rule, a rule that reads the weather forecast ahead, and a learner that looks back over 7 days to see how much each second of mist lowers the air's dryness (VPD). Someone still refills the mist tank once a day, but nobody has to stand watch.

Goal 2: sweet greens every season

In this series a "sweet" green means one that tastes sweet and not bitter, which does not depend on sugar alone. Chadwick et al. (2016) had people taste several lettuce genotypes and found that the ratio of bitter to sweet compounds was a key determinant of perceived bitterness and liking, and that glucose was the sugar most closely linked to perceived sweetness. Seo et al. (2009) measured sesquiterpene lactones in Korean leaf lettuce and found that cultivars with more of them tasted more bitter. How the farm will measure the sweetness of our own greens is the subject of part 4.

On light, Gent (2014) grew hydroponic lettuce in a greenhouse at 4 to 14 mol/m²/day and found that with more light, leaf compounds per fresh weight rose, except nitrate, which fell; he recommends harvesting in the afternoon after high light. On heat, McLemore et al. (2025) report that lettuce grown in hot weather and long days loses quality, that bitter compounds build up especially when plants bolt, and that enough sugar helps mask bitterness; their seasonal results depend on cultivar, though, and do not show summer as always the most bitter.

Lowering EC for the last 7 days before harvest is about nitrate, not sweetness. Gent (2003) found that leaf nitrate depended mainly on EC, together with an interaction between light and EC, and that under strong light a lower EC also slowed growth.

On our farm the system therefore measures daily light, sets a temperature ceiling for each crop (30 °C for leaf lettuce, a value I chose, not one from the studies above), and lowers EC before harvest. All of these are values the system watches for us. Whether our greens actually taste sweeter has not been measured yet.

What makes lettuce sweet or bitter (from research, not yet tested on our farm)Sweeter☀Enough light all daymore leaf solids, sugars included🍬Enough sugar against bitternessmasks bitterness (glucose matters most)More bitter🌡Heat and long daysplants bolt sooner🌼Plants start to boltbitter compounds build upWhere the system helps: daily light · afternoon misting · cutting EC before harvest is about nitrate, not sweetness

Our problem is the hot season, which is hotter than salad greens like. This part of the work is about carrying the plants through the afternoon more than making them grow fast.

Goal 3: always traceable

Everything the system does is logged: each pump or mister run (when it started, how long, how much water, why it stopped), every reading, the crop diary from seed lot to harvest day, and every task done or skipped. The system can print a QR label for a bag of greens that opens that crop's history.

The logs are not for show. When the mister stopped mid-pulse on 18 November, I went back through the log and found the mister stopped because the board dropped off Wi-Fi, not because of the overheated box I had guessed. Why the Wi-Fi drops is still being investigated; part 2 tells that story.

Who does what

Who does what (Baan Rak Phak farm, November 2026)AI and system watchAI and system actPeople still doAir temp, humidity, VPD, lightMist in pulses by heatSow, transplant, harvestPlot and tank water tempPace mist water over the dayRefill the mist tank dailyHolding and mist tank levelsSkip misting when rain is likelyMix nutrients, check EC/pHHourly weather forecastCut pumps when the link is lostClean nozzles and channelsLeaves, from photos sent (trial)Plan tasks and water changesDecide when an alert comes

The system does not do everything. Handwork, and decisions when something goes wrong, stay with people. The aim of this series is to move jobs from the right column to the left, one at a time, and to measure how much work that really saves.

Coming parts

Parts planned so far:

  1. An ESP32 dropping off Wi-Fi every hour, cause and fix traced with real data
  2. Measure right before you train: sensors that drift with heat
  3. Where sweetness comes from: light, temperature, EC and cutting EC before harvest
  4. Letting the system learn how well misting works
  5. Mist water is limited: spreading it over the whole day
  6. Reading the forecast before acting
  7. AI that checks leaves from photos
  8. Task lists and water-change dates the system works out
  9. Closing the loop: yield, sweetness and the work saved for this lettuce crop (sown 17 Nov 2026, harvest expected 7 Jan 2027)

Limits

  • This is one household's farm. The data here is from November 2026 and does not yet cover a full season.
  • The pulse count shows how much the system does in place of a person, but it is not yet a measure of real labour hours. The last part of the series will measure that.
  • Most research on sweetness was done in greenhouses or growth rooms with controlled light. Results in an outdoor plot in the tropics may differ.

References

Shamshiri, R. R., Kalantari, F., Ting, K. C., Thorp, K. R., Hameed, I. A., Weltzien, C., Ahmad, D., & Shad, Z. M. (2018). Advances in greenhouse automation and controlled environment agriculture: A transition to plant factories and urban agriculture. International Journal of Agricultural and Biological Engineering, 11(1), 1–22. https://doi.org/10.25165/j.ijabe.20181101.3210

Gent, M. P. N. (2014). Effect of daily light integral on composition of hydroponic lettuce. HortScience, 49(2), 173–179. https://doi.org/10.21273/HORTSCI.49.2.173

Gent, M. P. N. (2003). Solution electrical conductivity and ratio of nitrate to other nutrients affect accumulation of nitrate in hydroponic lettuce. HortScience, 38(2), 222–227. https://doi.org/10.21273/HORTSCI.38.2.222

McLemore, M., Kathi, S., Unterschuetz, J., Mason, T. J., Maness, N., Chrz, D., Dunn, B., Fontanier, C., & Hu, B. (2025). Impact of seasonal temperature changes on sesquiterpene lactone and sugar concentrations in hydroponically grown lettuce. HortScience, 60(3), 419–425. https://doi.org/10.21273/HORTSCI18393-24

Seo, M. W., Yang, D. S., Kays, S. J., Lee, G. P., & Park, K. W. (2009). Sesquiterpene lactones and bitterness in Korean leaf lettuce cultivars. HortScience, 44(2), 246–249. https://doi.org/10.21273/HORTSCI.44.2.246

Chadwick, M., Gawthrop, F., Michelmore, R. W., Wagstaff, C., & Methven, L. (2016). Perception of bitterness, sweetness and liking of different genotypes of lettuce. Food Chemistry, 197, 66–74. https://doi.org/10.1016/j.foodchem.2015.10.105

Mist pulse counts and run times come from the Baan Rak Phak farm system log, 14–18 November 2026, measured by Pisarn Boonnuk. All drawings are redrawn from this system and data.

Revision history

  • : Updated the part 2 title in the coming-parts list
  • : Revised after review: Chadwick (2016) restated as the bitter:sweet ratio and glucose · defined sweet · cutting EC moved to nitrate (Gent 2003) · added McLemore (2025) on heat and bolting · 30 °C stated as my own setting · VPD, DLI and EC defined with units · Shamshiri (2018) scoped to greenhouses · safety rule and Wi-Fi aligned with part 2 · sweetness drawing labelled as from research, not yet tested on the farm
  • : Updated the part 2 title in the coming-parts list
  • : Corrected the part numbers in the coming-parts list (parts 2–10)