The Smart Gardener – A Connected Plant Pot

By Florent Gilliéron, Julien Mignon & Léon Ehrwein

Introduction

We are three students taking the IoT Experimental Project – DIG008AS3AE-3004. Our backgrounds are quite different. Florent and Julien had some prior experience with coding and web development and worked with microcontrollers and physical sensors before. Léon had no experience at all with Arduino or electronics and started the course from scratch, learning the very basics of circuits and C++ during the first sessions.

Ideas

During the first two sessions, we spent time brainstorming IoT project ideas. We wanted something practical, something we could actually use in our daily lives. We considered a few options but quickly settled on the idea of a smart plant pot. The concept was simple: build a device that monitors a plant’s health and tells you how it’s doing.

We liked this idea because it combined sensors, an LCD display, cloud connectivity, and a web dashboard, giving us a full IoT chain to build from end to end. Our teacher Heikki validated the project, and we were able to get the required hardware right away.

What did you need to learn

The scope of the project was ambitious. We needed to:

• Learn C++ for Arduino and understand the ESP32 platform (pins, I2C, analog reads).

• Wire and calibrate multiple sensors: capacitive soil moisture, water level, light, and a CO2/temperature/humidity sensor (SCD41).

• Drive a 20×4 LCD screen over I2C with custom characters and multiple pages controlled by a rotary encoder.

• Connect the ESP32 to Wi-Fi, authenticate with Firebase, and send JSON data to a Realtime Database.

• Build a React + TypeScript web dashboard that reads Firebase data in real time and displays charts, metrics, and weather forecasts.

• Set up a second ESP32 with an integrated camera to take daily photos of the plant and upload them to GitHub, then store the links in Firebase for a timelapse feature.

• Design and 3D-printed custom outer pot to hide the electronics.

In short, we had to learn everything from reading a sensor value to deploying a full-stack web application, with 3D modelling on top.

The building phase

The build happened over about two months of weekly sessions.

Sensors and calibration. We started with the light sensor and the LCD, then added the soil moisture sensor. Calibration was done by hand: we measured raw values with the sensor dry, then submerged in water, and mapped the range to a percentage in the code. For the water level sensor, we discovered that resistive sensors corrode quickly if left powered on, so we wired the power pin to a GPIO and only turned it on for 10 milliseconds per reading. The pH sensor gave us trouble. We bought sterilised water and baking soda to create a known pH solution, but the sensor readings jumped wildly between 0 and 12. It turned out to be defective, so we ordered a replacement. In the end, we received the PH sensor a bit late, and we ran out of time to implement it.

The CO2 sensor (SCD41). The Sensirion library caused some compilation issues at first. Once we fixed the library configuration, the sensor worked well and gave us temperature, humidity, and CO2 readings over I2C.

LCD interface and state machine. We designed five pages on the LCD: a home screen with a battery-style health indicator and the plant’s mood, a detailed data page, a 24-hour records page with min/max values, a soil moisture graph using custom characters, and a plant selection page. The rotary encoder lets the user scroll between pages and select from five plant profiles (Monstera, Snake Plant, Spider Plant, Peace Lily, Pothos). Each profile defines ideal ranges for soil moisture, temperature, and light. The state machine compares sensor readings against these ranges and determines the plant’s mood: Happy, Thirsty, Too Wet, Too Hot, and so on.

Cloud and dashboard. Every 10 minutes, the ESP32 sends a JSON payload to Firebase Realtime Database. The web dashboard, built with React 19, TypeScript, and Vite, connects to Firebase and displays live metrics, historical charts (using Recharts), plant care recommendations, and local weather data pulled from the Finnish Meteorological Institute (FMI) API. Getting the Firebase authentication to compile on the Arduino IDE was one of the trickier parts of the project.

Camera module. A second ESP32 with an integrated camera captures a photo and uploads it as base64 to our GitHub repository via the GitHub API. The image link is then stored in Firebase so the dashboard can display a timelapse gallery. We initially had a hardware error with the camera, but it turned out to be a pin configuration mistake in the code. We also changed our plan from mounting the camera on the pot lid to making it a separate, repositionable module, because the close distance would not let the camera capture the whole plant.

3D printing. We modelled an outer pot in Blender with a hidden compartment underneath for the ESP32 and breadboard, and a design that shields the electronics from water. The parts were 3D-printed over several sessions.

Debugging. Our last session was spent entirely on debugging a wiring issue: one wire was connected to the wrong pin. It took the whole session to find, but once fixed, everything worked.

Below is a screenshot of the web dashboard showing the live plant mood, sensor readings, weather widget, historical trends, and control panel:

Figure: The Smart Gardener dashboard showing real-time plant data, weather forecast, historical trends, and control panel.

The outcome

What did we learn? A lot. We went from zero experience in electronics to building a complete IoT system with sensors, a microcontroller, cloud storage, and a web frontend. We learned how to read datasheets, calibrate sensors, deal with hardware failures, structure embedded C++ code with classes and state machines, and connect an ESP32 to Firebase. On the software side, we practiced React, TypeScript, and real-time data handling. We also learned 3D modelling and printing basics. Perhaps the most useful lesson was debugging: spending a full session tracking down a single misplaced wire taught us patience and method.

Did this make us more interested in tinkering? Yes. Before this course, one of us had never wired a breadboard before. Now we have a working connected device sitting next to a real plant. Seeing the dashboard update in real time when you water the plant or move it to a sunnier spot is very satisfying. It makes you want to build more things.

Future ideas. We have a few ideas we would like to explore. Adding phone notifications when the plant needs water, automating watering with a small pump, improving the timelapse feature with better camera positioning, and expanding the plant database with more species and more detailed care profiles. The cloud infrastructure is already in place, so adding features on top should be much easier now.

For more information regarding our project, please visit our GitHub repository.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.