{"id":643,"date":"2026-03-20T11:39:53","date_gmt":"2026-03-20T09:39:53","guid":{"rendered":"https:\/\/www.hh3dlab.fi\/blog\/?p=643"},"modified":"2026-03-20T11:45:40","modified_gmt":"2026-03-20T09:45:40","slug":"643","status":"publish","type":"post","link":"https:\/\/www.hh3dlab.fi\/blog\/3d-robo-lab\/643\/","title":{"rendered":"The Smart Gardener \u2013 A Connected Plant Pot"},"content":{"rendered":"<p><em>By Florent Gilli\u00e9ron, Julien Mignon &amp; L\u00e9on Ehrwein<\/em><\/p>\n<h1>Introduction<\/h1>\n<p>We are three students taking the IoT Experimental Project &#8211; 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\u00e9on 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.<\/p>\n<h1>Ideas<\/h1>\n<p>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\u2019s health and tells you how it\u2019s doing.<\/p>\n<p>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.<\/p>\n<h1>What did you need to learn<\/h1>\n<p>The scope of the project was ambitious. We needed to:<\/p>\n<p>\u2022 Learn C++ for Arduino and understand the ESP32 platform (pins, I2C, analog reads).<\/p>\n<p>\u2022 Wire and calibrate multiple sensors: capacitive soil moisture, water level, light, and a CO2\/temperature\/humidity sensor (SCD41).<\/p>\n<p>\u2022 Drive a 20&#215;4 LCD screen over I2C with custom characters and multiple pages controlled by a rotary encoder.<\/p>\n<p>\u2022 Connect the ESP32 to Wi-Fi, authenticate with Firebase, and send JSON data to a Realtime Database.<\/p>\n<p>\u2022 Build a React + TypeScript web dashboard that reads Firebase data in real time and displays charts, metrics, and weather forecasts.<\/p>\n<p>\u2022 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.<\/p>\n<p>\u2022 Design and 3D-printed custom outer pot to hide the electronics.<\/p>\n<p>In short, we had to learn everything from reading a sensor value to deploying a full-stack web application, with 3D modelling on top.<\/p>\n<h1>The building phase<\/h1>\n<p>The build happened over about two months of weekly sessions.<\/p>\n<p><strong>Sensors and calibration. <\/strong>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.<\/p>\n<p><strong>The CO2 sensor (SCD41). <\/strong>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.<\/p>\n<p><strong>LCD interface and state machine. <\/strong>We designed five pages on the LCD: a home screen with a battery-style health indicator and the plant\u2019s 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\u2019s mood: Happy, Thirsty, Too Wet, Too Hot, and so on.<\/p>\n<p><strong>Cloud and dashboard. <\/strong>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.<\/p>\n<p><strong>Camera module. <\/strong>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.<\/p>\n<p><strong>3D printing. <\/strong>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.<\/p>\n<p><strong>Debugging. <\/strong>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.<\/p>\n<p>Below is a screenshot of the web dashboard showing the live plant mood, sensor readings, weather widget, historical trends, and control panel:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-644 size-large\" src=\"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?resize=640%2C347&#038;ssl=1\" alt=\"\" width=\"640\" height=\"347\" srcset=\"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?resize=1024%2C555&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?resize=300%2C163&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?resize=768%2C416&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?resize=1536%2C833&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?w=2000&amp;ssl=1 2000w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?w=1280&amp;ssl=1 1280w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-1.jpg?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p><em>Figure: The Smart Gardener dashboard showing real-time plant data, weather forecast, historical trends, and control panel.<\/em><\/p>\n<h1>The outcome<\/h1>\n<p><strong>What did we learn? <\/strong>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.<\/p>\n<p><strong>Did this make us more interested in tinkering? <\/strong>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.<\/p>\n<p><strong>Future ideas. <\/strong>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.<\/p>\n<p>For more information regarding our project, please visit our <a href=\"https:\/\/github.com\/florentgi\/ESP32-Smart-Plant-Pot-Project\/tree\/main\">GitHub repository.<\/a><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"800\" class=\"wp-image-645\" src=\"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-2.jpeg?resize=570%2C800&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-2.jpeg?w=570&amp;ssl=1 570w, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-643-2.jpeg?resize=214%2C300&amp;ssl=1 214w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Florent Gilli\u00e9ron, Julien Mignon &amp; L\u00e9on Ehrwein Introduction We are three students taking the IoT Experimental Project &#8211; 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\u00e9on had no experience at all with Arduino or electronics [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,17,34,20,66,15,33,62],"tags":[],"class_list":["post-643","post","type-post","status-publish","format-standard","hentry","category-3d-robo-lab","category-3d-printing","category-bmp-280-sensor","category-esp32","category-esp32-camera","category-iot","category-lcd-display","category-sensors"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":596,"url":"https:\/\/www.hh3dlab.fi\/blog\/iot\/snake-and-pong-games-on-an-esp32\/","url_meta":{"origin":643,"position":0},"title":"Snake and Pong games on an ESP32","author":"Lab Student","date":"28.10.2025","format":false,"excerpt":"Introduction Hi, our team is formed with three members Roope Rajahalme, Rasmus Rautakallio and Phong Phan. Before this course our background in programming and electronics was quite basic. We had some experience with Java programming projects but had never worked with displays or games before. We all had deep love\u2026","rel":"","context":"In &quot;ESP32&quot;","block_context":{"text":"ESP32","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/esp32\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/b7f9bdbb5cfd3042dea94ae15f62ccff-1024x768.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/b7f9bdbb5cfd3042dea94ae15f62ccff-1024x768.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/b7f9bdbb5cfd3042dea94ae15f62ccff-1024x768.jpeg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":575,"url":"https:\/\/www.hh3dlab.fi\/blog\/iot\/sip-n-sense-intelligence-mug-project\/","url_meta":{"origin":643,"position":1},"title":"Sip &#8216;n&#8217; Sense &#8211; Intelligent mug project","author":"Lab Student","date":"28.10.2025","format":false,"excerpt":"Introduction When we first began our studies at Haaga-Helia University of Applied Sciences, we were immediately intrigued by the world of IoT. Our journey started with the very first course, Internet of Things: A Business Perspective, where we explored different approaches to creating IoT solutions. From the beginning, our main\u2026","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/arduino\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/IMG_1753-300x169.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/IMG_1753-300x169.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2025\/10\/IMG_1753-300x169.jpeg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":658,"url":"https:\/\/www.hh3dlab.fi\/blog\/3d-robo-lab\/the-weatherslayeaer-project\/","url_meta":{"origin":643,"position":2},"title":"The Weatherslayeaer project","author":"Heikki Hietala, lab admin","date":"25.3.2026","format":false,"excerpt":"Introduction We are a team of three second\u2011year students from different areas of digital and technical studies, each bringing our own strengths into this 3D and Robotics course. Hey there! I\u2019m Saana, and I\u2019m currently in my second year of studying digital services. When I started the IoT course, I\u2026","rel":"","context":"In &quot;3D&quot;","block_context":{"text":"3D","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/3d\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-658-6.jpeg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-658-6.jpeg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-658-6.jpeg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2026\/03\/word-image-658-6.jpeg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":533,"url":"https:\/\/www.hh3dlab.fi\/blog\/3d-robo-lab\/iot-space-adventure-developing-a-retro-arcade-style-handheld-gaming-device-with-esp32-and-fun-controls\/","url_meta":{"origin":643,"position":3},"title":"IoT Space Adventure: Developing a retro arcade style handheld gaming device with ESP32 and fun controls.","author":"Heikki Hietala, lab admin","date":"16.4.2024","format":false,"excerpt":"Introduction Video demonstration: https:\/\/www.youtube.com\/watch?v=9Bk4u3yt4mI GitHub repository: https:\/\/github.com\/Gianou\/Haaga-Helia-IoT-Experimental-Project Our team consisted of three students: David, Isabelle, and Sara. We have diverse backgrounds and sets of skills within IT. Sara is a second year Business Information Technology student from Haaga-Helia. Her major is in digital services and design, but she studies Front-end\u2026","rel":"","context":"In &quot;3D&quot;","block_context":{"text":"3D","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/3d\/"},"img":{"alt_text":"Idea lists","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2024\/04\/upload-4-205x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5,"url":"https:\/\/www.hh3dlab.fi\/blog\/3d-robo-lab\/tervetuloa-haaga-helian-3d-robo-labiin\/","url_meta":{"origin":643,"position":4},"title":"Haaga-Helia 3D + Robo Lab equipment","author":"Heikki Hietala, lab admin","date":"13.3.2022","format":false,"excerpt":"Haaga-Helia 3D + Robo Lab is the 3D, robotics and IoT research lab at our University. 3D is a family of technologies that can be seen to affect every field of business today. Virtual reality, augmented reality, mixed reality, 3D modeling, scanning and printing open new business opportunities every day.\u2026","rel":"","context":"In &quot;3D + Robo Lab&quot;","block_context":{"text":"3D + Robo Lab","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/3d-robo-lab\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2022\/03\/IMG_20190202_194403_807.jpg?fit=1200%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2022\/03\/IMG_20190202_194403_807.jpg?fit=1200%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2022\/03\/IMG_20190202_194403_807.jpg?fit=1200%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2022\/03\/IMG_20190202_194403_807.jpg?fit=1200%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2022\/03\/IMG_20190202_194403_807.jpg?fit=1200%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":550,"url":"https:\/\/www.hh3dlab.fi\/blog\/esp32\/550\/","url_meta":{"origin":643,"position":5},"title":"Air Quality and Control System","author":"Heikki Hietala, lab admin","date":"11.10.2024","format":false,"excerpt":"October 2024 - (c) Stephen Swanson Check it out on GitHub Introduction Hi! I\u2019m Stephen, a 3rd-year student at Haaga-Helia UAS. Programming and creating IoT and embedded devices are recent hobbies of mine, which I picked up in summer 2024 after some friends (Alisa Dunaeva and David Gianadda) suggested I\u2026","rel":"","context":"In &quot;BMP 280 sensor&quot;","block_context":{"text":"BMP 280 sensor","link":"https:\/\/www.hh3dlab.fi\/blog\/category\/bmp-280-sensor\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2024\/10\/Picture2.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2024\/10\/Picture2.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.hh3dlab.fi\/blog\/wp-content\/uploads\/2024\/10\/Picture2.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/posts\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/comments?post=643"}],"version-history":[{"count":2,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/posts\/643\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/posts\/643\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/media?parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/categories?post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hh3dlab.fi\/blog\/wp-json\/wp\/v2\/tags?post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}