AI1 0 1 1 0 1 0 0 1 1 0 10 1 0 0 1 1 0 1 0 1 1 0 1Ai Me Bro

Smart plant waterer

A capacitive soil sensor and a small pump on an ESP32 that waters a houseplant when the soil actually needs it. Optional ESPHome and Home Assistant hooks, with a simple on-device fallback.

BeginnerBuild time: 3-5 hours, plus about 5 hours of printingParts: $35-553D print
Illustration of Smart plant waterer
Illustration. An artist's impression, not a photo of a finished build. Your build will look different.

Safety first

  • Water and electronics do not mix. Keep the ESP32, supply and MOSFET above the reservoir, and never leave a new pump unattended the first few times it runs.
  • Cap the maximum pump time (a few seconds) and add a daily maximum so a failed sensor cannot soak a floor or a power strip.
  • Use a listed 5 V USB supply. This is a low-voltage project; no mains wiring.
  • Do not run a submersible pump dry for long periods if the maker says it needs to be wet.

Parts

PartQtyApprox. eachSubtotal
Espressif ESP32-DevKitC-32E (DevKitC V4) development boardOfficial Espressif 38-pin DevKitC V4 with ESP32-WROOM-32E (4 MB). Micro-USB port, not USB-C. Buy only the official 38-pin Micro-USB board, not a USB-C or 30-pin clone. Primary listing: Mouser 356-ESP32-DEVKITC32E, $10.20, 1,701 in stock on Nov 12, 2026, per Findchips (https://www.findchips.com/search/ESP32-DEVKITC-32E). The Mouser US page itself returned 403 to a direct fetch, so click-confirm the US storefront before you order. Mouser Netherlands listed 1,622 in stock at €8.60 the same day. Do not use DigiKey as the default today (search snippets showed 0 in stock / long lead time). Official Amazon listing https://www.amazon.com/dp/B09MQJWQN2 was still unavailable; use it if it returns. Amazon search for the official board: https://www.amazon.com/s?k=ESP32-DevKitC-32E. Adafruit #3269 remains $15.00 and was out of stock (https://www.adafruit.com/product/3269). Typical $10-16.Mouser · price seen on 2026-11-121$10.20$10.20
Analog capacitive soil moisture sensor v2.0 (multi-pack listings)Typical $2.5-$5 each (or see pack note). ASIN confirmed for a 3-pack listing. Typical $8-15 a pack. Calibrate in your soil.Amazon1$3.50$3.50
DC 5 V micro peristaltic / dosing pumpTypical $8-$15 each (or see pack note). ASIN confirmed. Typical $8-15. Do not drive the motor from an ESP32 pin.Amazon1$10$10
Logic-level MOSFET module or 5 V relay moduleTypical $3-7, no verified link.Amazon (search)1$4$4
5 V, 2 A USB wall adapterA 2 A adapter is a starting point, not a measurement of your pump. Typical $5-10, no verified link.Amazon (search)1$7$7
Tubing and a reservoir bottleTypical $3-8, no verified link.Amazon (search)1$5$5
Estimated total (parts only)$39.70

Typical US prices, checked 2026-11-12. Prices change and multi-packs are often cheaper per piece.

As an Amazon Associate I earn from qualifying purchases. Prices change; check the store.

Filament

PETG (1.75 mm): about 70 g (23.1 m), roughly 5 h of printing.

PETG is a better first choice than PLA around water, 0.2 mm layers, 25% infill, 3 walls, supports if the reservoir lid or pump mount has overhangs. Seal or place electronics well above any spill.

AI agents you'll use

  • Firmware helper (ChatGPT, Claude, Gemini or Grok): Writes an Arduino or ESPHome config with a moisture threshold, a pump-on cap of a few seconds, and a lockout so a stuck sensor cannot flood the room.
  • Calibration helper: Helps you interpret raw ADC readings in air, in dry potting mix, and in a wet pot.

Tools

  • 3D printer or a reusable container for the reservoir
  • Screwdriver
  • Computer with Arduino IDE or ESPHome
  • USB data cable
  • Scissors for tubing

What you'll learn

  • Reading a capacitive soil-moisture sensor
  • Driving a small pump with a MOSFET or a relay module, not from a GPIO pin
  • Calibrating wet and dry readings for your pot
  • A failsafe that will not run the pump forever

A moisture sensor in the pot, a small pump in a reservoir, and an ESP32 that only runs the pump when the soil is actually dry. The important part is calibration and a time cap, not a fancy 3D-printed watering can.

What you'll build

A 5 V pump that sips water into one houseplant, a capacitive sensor in the soil, and an ESP32 that can work alone or report to Home Assistant through ESPHome. Start with one plant, not a greenhouse.

Print the parts

Search Printables or Thingiverse for a pump mount, a reservoir lid with a tube hole, or a clip for the sensor, and credit the designer. Print in PETG if you can. Electronics should sit in a dry bay, not under the pot. You can also skip printing and use a jar, double-sided tape and a cable clip.

Wiring

From To
Moisture sensor VCC / GND ESP32 3.3 V and GND (confirm your module is 3.3 V-safe)
Moisture sensor analog out An ADC pin, for example GPIO 34
MOSFET or relay input A GPIO through the module's documented input, for example GPIO 26
MOSFET/relay ground Common ground
Pump motor leads The switched side of the MOSFET or relay, with a flyback diode if the module does not already have one
Pump power 5 V supply that can handle the pump stall or startup current
ESP32 USB or 5 V The same 5 V supply, if the current budget allows, with a common ground

Step-by-step

  1. Read the sensor in air, in dry mix, and in a wet pot, and write the numbers down. Do this before you hook up the pump.
  2. Mount the pump in the reservoir and run tubing to the pot. Test the pump by applying 5 V briefly, away from the electronics.
  3. Wire the MOSFET or relay and confirm the ESP32 can click it on and off for a second at a time.
  4. Ask the firmware helper for a sketch or ESPHome config with a dry threshold, a 2-5 second pump pulse, and a long lockout (for example no more than a few pulses per day until you trust it).
  5. Water a test pot over a sink or a tray for a couple of days, not over a laptop or a power strip.
  6. Adjust the threshold. Capacitive readings drift with sensor placement, soil type and fertilizer.
  7. Only then leave it unattended, still on a tray, and optionally add it to Home Assistant.

Code

Prompt for the firmware helper:

Write an Arduino-ESP32 sketch that reads an analog capacitive soil sensor on GPIO 34, and drives a pump through a MOSFET on GPIO 26.
Use clearly labeled constants for a dry threshold, a pump pulse of 3 seconds, and a lockout of several hours.
Never leave the pump on if the sensor reading is out of a plausible range. Print the raw ADC values to Serial. Comment the code for a beginner.

If you prefer ESPHome, ask for an official adc plus switch / pump interval config and confirm keys on esphome.io.

Troubleshooting

  • Readings do not change in wet soil: the probe is not in the root zone, you have a digital-only board, or the wrong analog pin.
  • Pump never runs: MOSFET module needs 5 V logic, or the GPIO is inverted, or the supply cannot start the motor.
  • It waters every few minutes: threshold is wrong, or the water is running back onto the probe. Cap the daily runtime immediately.
  • Rust or green crust on a cheap probe: you probably have a resistive probe. Switch to capacitive.

Files, code and docs

Last checked 2026-11-12. Double-check parts against your own board and seller listings before you buy.

Smart plant waterer: parts, filament and AI agents | Ai Me Bro