Get Free Shipping & Prusaments with the Prusa XL Summer Deal!

Hydroponic Arduino Pot with WiFi and Software

Welcome to the future of home gardening with the Smart Wi‑Fi Hydroponic Pot!
7
4
0
85
updated June 24, 2025

Description

PDF

🌱 System Overview

The system’s brain is an Arduino UNO, constantly reading water level in the reservoir via an ultrasonic sensor (HC‑SR04) and substrate (or soil, in hybrid mode) moisture with a capacitive moisture sensor. These readings are displayed in real time on a compact OLED screen, giving instant feedback on system status.

The UNO also controls a water pump via a relay module, turning it on/off based on customizable watering cycles or manual commands. The true magic happens with the ESP8266, which connects to your home Wi‑Fi, receives sensor data from the UNO, and exposes everything through a simple web server.

A desktop application built in Python with Tkinter completes the setup, offering an intuitive graphical interface. From this app, you can:

  • Monitor water level and soil moisture in real time.
  • Control the pump and view active watering cycles.
  • Set custom schedules (pump-on duration and interval between runs).
  • Manually turn the pump on or off.
  • Maintain a small local database of your plants, including name, planting date, fertilizer type, and preferred watering cycle.
  • Export/import the database in CSV format.

This hydroponic pot isn’t just an automated watering system—it’s a complete platform for learning and experimentation, making hydroponic gardening accessible, efficient, and fun.

🔧 Assembly & Configuration Guide

Here’s how to set up and configure your Smart Wi‑Fi Hydroponic Pot.

Required Components

  • Arduino UNO (or ATmega328P-compatible board)
  • ESP8266 module (e.g. NodeMCU, Wemos D1 Mini)
  • Ultrasonic water-level sensor (HC‑SR04)
  • Capacitive soil-moisture sensor (analog)
  • 1‑channel 5 V relay module
  • SSD1306 128×64 I²C OLED display
  • Low-voltage water pump (5 V or 12 V, depending on relay & power supply)
  • Separate power supply for the pump (if required)
  • Jumper wires (male–male, male–female), ideally 24 AWG
  • Breadboard (optional, for prototyping)
  • Pot or container for hydroponic system
  • Water tubing
  • Soldering iron & solder (optional, for permanent connections)
  • Small screwdriver

Phase 1: Prepare Software & Scripts

Arduino UNO:

  1. Open Arduino IDE.
  2. In File > Preferences, ensure the ESP8266 board URL is added, if planning to program ESP8266 via the IDE.
  3. Install these libraries via Sketch > Include Library > Manage Libraries:
    • Adafruit GFX
    • Adafruit SSD1306
    • NewPing (by Tim Eckel)
  4. Open Codice per Arduino uno.txt, copy it into a new sketch.
  5. Adjust calibration constants: DISTANCE_EMPTY_CM, DISTANCE_FULL_CM, MOISTURE_DRY_ADC, MOISTURE_WET_ADC once sensors are placed.
  6. Plug UNO via USB, select correct board/port, and upload the sketch.

ESP8266:

  1. In IDE (if using it), install: ESP8266WiFi, ESP8266WebServer, ArduinoJson.
  2. Open codice per ESP.txt, paste into a new sketch.
  3. Update Wi‑Fi credentials (replace sample SSID/password with yours).

Connect ESP8266 (you may need CH340 or CP210x USB driver), select board (e.g. NodeMCU 1.0), then upload.

Tip: Disconnect RX/TX between UNO/ESP during upload, or use a separate USB-to-serial adapter.

Python (GUI App):

  1. Ensure Python is installed.
  2. From terminal: pip install requests (Tkinter is usually included).
  3. Save Python.txt as hydroponics_gui.py (don’t run yet).

Phase 2: Hardware Assembly

Use 24 AWG wire for solid final wiring or jumper wires for prototyping. Always disconnect power before making changes.

Serial Link (UNO ↔ ESP8266):

  • ESP TX → UNO RX (D0)
  • ESP RX → UNO TX (D1)
  • ESP GND → UNO GND
    ⚠ Using D0/D1 disables Serial Monitor on UNO after ESP is connected.

OLED (SSD1306 I²C) → Arduino:

  • VCC → 3.3 V or 5 V (check module specs)
  • GND → GND
  • SDA → A4
  • SCL → A5

HC‑SR04 Sensor → Arduino:

  • VCC → 5 V
  • TRIG → D9
  • ECHO → D10
  • GND → GND

Soil‑Moisture Sensor → Arduino:

  • VCC → 5 V (or 3.3 V)
  • SIG/AOUT → A0
  • GND → GND

Relay Module + Pump → Arduino:

  • Relay VCC → 5 V Arduino
  • Relay IN → D8
  • Relay GND → GND Arduino
  • Pump’s positive lead → Relay COM → Relay OFF → Power supply +
  • Pump’s negative → Power supply –
  • Common GND between dedicated line and pump supply is crucial.

Note: If relay is triggered by LOW instead of HIGH, adjust logic in your sketch accordingly.

Phase 3: Power-Up & Testing

Sensor Placement:

  • Position HC‑SR04 at maximum water level, facing down.
  • Insert moisture sensor into substrate.
  • Install pump in reservoir, connect tubing.

Power On:

  • UNO → PC USB or 5 V supply.
  • ESP8266 (if separate) via USB.
  • Water Pump 5 V supply dedicate line.
  • Pump power switched on.

Initial Check:

  • OLED should display “Hydroponics UNO,” sensor readings, and “IP: N/A.”
  • Pump should be OFF by default.

ESP8266 & Wi‑Fi:

  • Open serial monitor on ESP (115200 baud) to check Wi‑Fi connection and IP address (e.g. 192.168.1.xx).
  • UNO receives this IP via serial, which then appears on OLED.

Python GUI Test:

  1. Run hydroponics_gui.py.
  2. Set ESP IP (either at startup or via Configuration menu).
  3. Interface should display live sensor data.

Control Tests:

  • Use “TURN ON Pump” / “TURN OFF Pump” buttons; verify pump and interface/OLED respond.
  • Set a watering cycle (e.g. 1 min ON, every 5 min), push to ESP/UNO. Confirm acknowledgement messages and correct operation.

Calibration:

  • Measure empty/full reservoir distances and update constants in UNO sketch.
  • Log raw moisture values via temporary Serial.println and adjust wet/dry ADC constants accordingly. Re-upload UNO code.

Phase 4: Managing Plant Data (Python GUI)

  • Fill in “Plant Name,” “Planting Date,” “Fertilizer,” and cycle fields.
  • Click Add to Local DB to save.
  • Use Load & Apply to send a stored cycle to UNO.
  • Use Remove Selected to delete a DB entry.
  • Export/Import your plant database via CSV.

    Wiring Assembly Tips
  • To optimize the connection between the board and the other components, I recommend creating two wire bundles:
  • One for power (you only need positive and neutral, but for safety and possible future expansions, I included an extra pair of wires)
  • One for sensors and relay connections
  • For the power supply, connect the pump using a dedicated line, and add the two wires that go to the relay.
  • To keep everything more stable and secure, use electrical tape and heat shrink tubing.

🛠 Troubleshooting

IssueCheck These
No OLED data or IP: N/AI²C wiring (SDA, SCL, VCC, GND); UNO–ESP serial wiring
ESP won’t connect to Wi‑FiSSID/password in ESP sketch; ESP serial monitor errors
Incorrect sensor readingsSensor wiring; calibration process
Pump not activatingRelay wiring (IN/VCC/GND), pump wiring (COM/NO); listen for relay click; adjust control logic (HIGH/LOW)
GUI can’t connect or updateESP Wi‑Fi connection & valid IP; correct IP in Python app; firewall settings

Congratulations! Your smart hydroponic pot is now assembled and configured. You can monitor and control your system effortlessly—happy growing!

GitHub link: https://github.com/VjAlbert/Hydroponics-smart-vase

Tags



Model origin

The author marked this model as their own original creation.

License


Highlighted models from creator

View more