Tars – Smart Planter (3D Printed + Arduino + Web Dashboard)

by anvesh_padamata in Design > 3D Design

245 Views, 6 Favorites, 0 Comments

Tars – Smart Planter (3D Printed + Arduino + Web Dashboard)

tars-intro-webpage.gif

Story Behind the Project


Like many beginners, I assumed plants were easy to care for — until one experience proved otherwise and pushed me to build a solution. I received a snake plant on my birthday from a close friend. I watered it every day and kept it indoors with little sunlight because I didn't know how to take care of plants. The plant eventually perished from root rot after its leaves began to weaken and droop in a matter of weeks.

I sincerely regretted this, which motivated me to investigate whether technology could aid in avoiding such errors. My concept was to create a smart planter that would provide users with guidance on appropriate care and track plant conditions in real time.

I worked through several iterations over the course of the following two years, learning about Arduino, IoT, web development, AI integration, and 3D modelling. Even though I was unable to market it as a finished product, I am making everything public so that anyone can benefit from, expand upon, or enhance this experience.

Supplies

IMG_0565.JPG

Hardware:

  1. ESP8266 NodeMCU CP2102 Board
  2. DHT11 Digital Relative Humidity and Temperature Sensor Module
  3. GY-302 BH1750 Light Intensity Module
  4. Capacitive Soil Moisture Sensor
  5. 0.96 Inch I2C/IIC 4pin OLED Display Module BLUE
  6. DC-DC 1.8V-5V to 3.3V, Booster and Buck Power Module
  7. 500 mAh 3.7V single cell Rechargeable LiPo Battery
  8. TP4056 1A Li-Ion Battery Charging Board Micro USB with Current Protection
  9. 12x12x7.3mm Tactile Push Button Switch
  10. 4mm SPDT 1P2T Slide Switch
  11. USB to Micro USB Cable wire 1M for NodeMCU
  12. 65pcs Flexible Breadboard Jumper Wires
  13. Breadboard

Tools:

  1. Soldering iron
  2. Solder (lead or lead-free)
  3. Soldering flux paste
  4. Desoldering pump (solder sucker)
  5. Wire cutter
  6. Tweezers or forceps
  7. Glue gun
  8. Heat-shrink tubing

Software:

  1. Arduino IDE (C/C++ for microcontrollers)
  2. Node.js Web App (Express + EJS + Ubidots API)
  3. AI Integration: Google Gemini API
  4. Cloud: Ubidots (prototyping)

Project Overview & Understanding the Electronics (Before Wiring)

IMG_0832 copy 2.jpg

Before starting the build, it is important to understand how the Smart Planter works as a system.

Tars – Smart Planter is designed to monitor the basic environmental conditions required for healthy indoor plants. The system continuously measures

  1. Soil moisture
  2. Temperature
  3. Humidity
  4. Light intensity

All sensor data is processed by an ESP8266 microcontroller and displayed locally on a small OLED screen. The same data is also sent to the cloud for remote monitoring.

This version of the planter does not automate watering. Instead, it focuses on monitoring and awareness, helping users avoid common mistakes like overwatering or poor lighting.

Before connecting any wires, it is important to understand what each component does and why it is used in this project.

ESP8266 (Microcontroller)

This is the brain of the planter.

It reads data from all sensors, displays the values on the OLED screen, and sends the data to the cloud using Wi-Fi.

Capacitive Soil Moisture Sensor

This sensor measures how wet or dry the soil is.

Unlike resistive soil moisture sensors, capacitive sensors:

  1. Do not corrode easily
  2. Last longer in soil
  3. Are more stable over time

⚠️ Important note:

Even capacitive sensors need calibration. Raw values are not meaningful until calibrated for dry soil and wet soil.

DHT11 Temperature & Humidity Sensor

This sensor measures:

  1. Ambient temperature
  2. Relative humidity

It is simple and beginner-friendly, but not very accurate.

For a prototype and learning project, it is sufficient.

BH1750 Light Intensity Sensor

This sensor measures light intensity in lux.

It helps understand:

  1. Whether the plant is getting enough light
  2. If the planter is placed in a very dark location

OLED Display (0.96” SSD1306)

This small screen shows: Soil moisture, Temperature, Humidity, Light intensity, WiFi status etc

⚠️ Limitation:

The display is small, and the data is hard to read from a distance.

This is one of the design trade-offs in version 1.

Since this planter is designed to sit on a desk or shelf, I wanted it to be battery-powered instead of always plugged in.

Battery

I used a 500 mAh Li-Po battery to power the entire system.

Li-Po batteries are:

  1. Compact and lightweight
  2. Common in IoT projects
  3. Rechargeable using simple charging modules

TP4056 Charging Module

To safely charge the battery, I used a TP4056 1A Li-Po charging module.

This module:

  1. Handles safe charging of the Li-Po battery
  2. Provides over-charge and over-discharge protection
  3. Uses a standard micro-USB input

⚠️ Important safety note:

Always double-check polarity when connecting Li-Po batteries. Reversing polarity can permanently damage the battery or cause overheating.

DC-DC 1.8V-5V to 3.3V, Booster and Buck Power Module (Critical Design Choice)

As the battery discharges, its voltage drops from around 4.2V to ~3.2V.

Many sensors — especially capacitive soil moisture sensors — give inconsistent readings if their supply voltage fluctuates.

To solve this, I added a DC-DC 1.8V-5V to 3.3V, Booster and Buck Power Module and set its output to a constant 3.3V.

This ensures:

  1. Stable voltage for sensors
  2. Consistent soil moisture readings
  3. No false alarms caused by battery voltage drop

💡 This small addition made a huge difference in data reliability.

Preparing the Electronics (Breadboard Testing)

Breadboard Testing.png

Before installing any electronics inside the planter, it is extremely important to test all components on a breadboard.

This step ensures that the sensors, wiring, and code are working correctly before everything is enclosed inside the 3D-printed planter.

Testing on a breadboard helps you:

  1. Identify faulty sensors
  2. Avoid wiring mistakes
  3. Prevent moisture damage to electronics
  4. Debug code easily before final assembly

Connecting the OLED Display (SSD1306 – I2C)

Most 0.96" OLED displays use I2C communication.

Connections:

  1. VCC → 3V3 (NodeMCU)
  2. GND → GND
  3. SDA → D2 (GPIO4)
  4. SCL → D1 (GPIO5)

Both the OLED display and the BH1750 sensor will share the same I2C pins.

Connecting the BH1750 Light Sensor

Connections:

  1. VCC → 3V3
  2. GND → GND
  3. SDA → D2 (GPIO4)
  4. SCL → D1 (GPIO5)

This is safe because I2C devices are designed to share the same bus.

Connecting the DHT11 Temperature & Humidity Sensor

Connections:

  1. VCC → 3V3
  2. GND → GND
  3. DATA → D4 (GPIO2)

⚠️ Note:

If your DHT11 module does not include a pull-up resistor, add a 10kΩ resistor between DATA and VCC.

Connecting the Capacitive Soil Moisture Sensor

Connections:

  1. VCC → 3V3
  2. GND → GND
  3. AOUT → A0 (NodeMCU)

⚠️ Important:

  1. NodeMCU’s A0 pin supports a maximum of 1V (internally scaled).
  2. Most capacitive soil sensors are compatible, but verify your module.
  3. Avoid powering the sensor continuously for long periods during testing.


Powering the Setup

For breadboard testing:

  1. Power the NodeMCU using a USB cable connected to your computer
  2. Do NOT connect the battery at this stage

This allows safe debugging and easy reprogramming.


Uploading the Test Code (Arduino IDE)

To continue with this project, you must know how to upload code to the NodeMCU using Arduino IDE.

This step assumes:

  1. Arduino IDE is installed
  2. ESP8266 board support is added
  3. Correct COM port is selected
  4. Required libraries are installed

If you are new to ESP8266 programming, please refer to:

  1. Official ESP8266 Arduino Core documentation
  2. Basic NodeMCU Arduino tutorials

Once the test code is uploaded:

  1. OLED should display sensor readings
  2. Serial Monitor should show live data
  3. No sensors should report constant or zero values

If something doesn’t work:

  1. Double-check wiring
  2. Check pin definitions in code
  3. Verify sensor power connections

Only after confirming all components work correctly should you move on to permanent wiring and enclosure assembly.

3D Printing the Planter Parts

3d-printing-process.gif

The planter consists of multiple 3D printed parts:

  1. Outer planter body (outer part)
  2. Soil Container (inner part)
  3. Electronics mounting sections (charge module)
  4. Display window cutout (display cover)

I printed all parts using PLA filament. Glow-in-the-dark filament was used for aesthetic purposes.

Important observations:

  1. Print times are long due to the thickness of the planter.
  2. Surface finish is not premium but acceptable for a prototype.
  3. Required sanding.

Before assembly:

  1. Dry-fit all parts
  2. After completing all required wiring, secure the charge module to the exterior component (outer part) using strong adhesive.
  3. Sand display cover and charging module areas lightly if needed
  4. Clean support residues

⚠️ Note:

Glow-in-the-dark filament looks great initially but does not retain light for long durations.

Power Control & Reset System (Switch + Wi-Fi Reset Button)

circuit.png

Before assembling anything inside the planter, all electrical connections must be completed and tested.

This step covers:

  1. Power system wiring
  2. Main power switch
  3. Wi-Fi reset button

Completing this step fully will make final assembly much easier.

Power System Wiring

The complete power path is:

Li-Po Battery
TP4056 Charging Module
SPDT Slide Switch
→ NodeMCU (ESP8266)
→ DC–DC Boost Converter (3.3V output)


Battery → TP4056

  1. Battery + → TP4056 B+
  2. Battery → TP4056 B–

This allows safe charging and protection.

TP4056 → Power Switch

  1. TP4056 OUT+ → Common pin of SPDT switch
  2. TP4056 OUT– → System GND (direct connection)

Power Switch → Load

  1. One side pin of switch → NodeMCU VIN and DC–DC Boost Converter input
  2. The second side pin is unused.

This setup allows:

  1. Charging while device is OFF
  2. Complete power isolation when switched OFF

DC–DC Boost Converter

  1. Input → Switched TP4056 output
  2. Output → Stable 3.3V for sensors

This prevents incorrect readings caused by battery voltage drop.

Wi-Fi Reset Button Wiring

To allow Wi-Fi credential reset without reprogramming, a tactile push button is added.

Button Connections:

  1. One terminal → ESP8266 GPIO pin (defined in code)
  2. Other terminal → GND

The pin is configured using an internal pull-up resistor.

pinMode(RESET_BUTTON_PIN, INPUT_PULLUP);

Reset Logic (Firmware Behaviour)

  1. Button pressed and held for 5 seconds
  2. EEPROM is cleared
  3. Stored Wi-Fi credentials are erased
  4. Device restarts and enters fresh Wi-Fi setup mode

This makes the device reusable across different networks.

Assembling Everything Inside the Planter

IMG_0568.jpg
IMG_8638.jpg
IMG_8639.jpg
IMG_0569.jpg

Once the electronics and printed parts were ready, I assembled everything inside the planter.

Assembly Order (Important)

I followed this order to avoid rework:

  1. OLED display mounting
  2. ESP8266 + soldered circuit
  3. Battery & charging module
  4. Boost converter
  5. Soil moisture sensor placement
  6. Inner plant holder insertion

Mounting the OLED Display

  1. The OLED screen fits into the circular opening (display cover) on the front of the planter (outer part)
  2. It is held in place using friction and light adhesive
  3. Make sure the display glass is flush with the outer surface

⚠️ Take care not to stress the OLED ribbon cable.

Placing Battery & Charging Module

  1. The Li-Po battery is placed in the inner compartment
  2. The TP4056 module is aligned with the rear charging port opening (charger module)
  3. Wires are routed carefully to avoid sharp bends

Soil Moisture Sensor Placement

  1. Insert the sensor into the inner pot
  2. Avoid placing it directly near drainage holes
  3. Keep the sensor vertical for consistent readings


Final Assembly Check

Before closing everything:

  1. Verify no wires are pinched
  2. Confirm the charging port is accessible
  3. Ensure common ground connections are intact

Once satisfied, the inner pot is inserted into the outer part and secure both the inner and outer components with screws.

Sensor Calibration (Very Important)

Screenshot 2025-12-18 at 5.45.20 PM.png

Raw soil moisture values are meaningless without calibration.

Dry Soil Calibration

  1. Insert the sensor into completely dry soil
  2. Note the analog value shown on the serial monitor
  3. This value represents 100% dry soil
  4. Replace the value of "AirValue" with this analog value in the code (refer the image)

Wet Soil Calibration

  1. Water the soil fully until saturated
  2. Insert the sensor again
  3. Note the analog value
  4. This represents 100% wet soil
  5. Replace the value of "WaterValue" with this analog value in the code (refer the image)

Mapping Values

In the Arduino code, I mapped the raw values into a percentage range (0–100%) using these two reference points.

This calibration step prevents false readings and improves accuracy significantly.

Creating a Ubidots STEM Account & Setting Up Variables

Screenshot 2025-12-18 at 5.44.44 PM.png

To send data to the cloud, I used Ubidots STEM, which is free for educational projects.

Creating an Account

  1. Go to the Ubidots website
  2. Sign up for a STEM account
  3. Verify your email and log in

Once logged into Ubidots:

Create a Device (Important)

  1. Go to Devices
  2. Click Add Device
  3. Choose Blank Device
  4. Name it something like YourName_Smart_Planter

Create Variables (Important)

Inside the device, create variables:

  1. soil_moisture
  2. temperature
  3. humidity
  4. light_intensity

These variables will receive data from the ESP8266.

Getting Your API Token

  1. Go to API Credentials
  2. Copy your Default Token
  3. Keep this token safe — it allows your device to send data

This API token will be used in the Arduino firmware.


In the firmware code, insert your Ubidots API key where it says UBIDOTS_TOKEN (refer the image)

const char* UBIDOTS_TOKEN = "PASTE_YOUR_API_TOKEN_HERE";

You have the option to manually set the Wi-Fi credentials at this stage. You can also update your Wi-Fi credentials at any time by using the reset button to reset them.

const char* WIFI_SSID = "your_wifi_name";
const char* WIFI_PASS = "your_wifi_password";

Initialization and Setup (First Boot Experience)

Tars Portable Process Flowchart.jpeg

This step explains what happens internally during startup and how users configure the device for first-time use.

System Initialization

Upon power-up, Tars initializes all its core hardware components, including:

  1. ESP8266 microcontroller
  2. Capacitive soil moisture sensor
  3. DHT11 temperature & humidity sensor
  4. BH1750 light intensity sensor
  5. OLED display
  6. Wi-Fi communication module

Each component is initialized sequentially to ensure stable operation.

If any component fails to initialize, the device does not proceed further, helping prevent incorrect data display or transmission.

Setup Mode Indication

During the first boot (or after a Wi-Fi reset):

  1. The OLED screen displays a setup prompt
  2. The device automatically enters Wi-Fi configuration mode
  3. Tars creates its own Wi-Fi Access Point (AP)

This allows users to configure the device without connecting it to a computer.


Wi-Fi Configuration Process

Connecting to Tars Smart Planter

  1. On a mobile phone or laptop, open Wi-Fi settings
  2. Connect to the network named something like: Tars Smart Planter

QR Code–Based Configuration

Once connected:

  1. A QR code is displayed on the OLED screen
  2. Scanning the QR code redirects the user to a local web page hosted by the ESP8266
  3. This web page allows users to enter Wi-Fi SSID and password

This approach avoids hardcoding credentials and makes setup user-friendly.

Saving Credentials (EEPROM)

After submission:

  1. Wi-Fi credentials are securely stored in EEPROM (non-volatile memory)
  2. The device automatically restarts

On subsequent boots, stored credentials are used to connect to Wi-Fi automatically.

Data Acquisition

Once connected to Wi-Fi, Tars begins sensor monitoring.

Sensors Monitored

Sensor readings are sampled at regular intervals (every few seconds) to ensure accurate and up-to-date data.


Display and User Interaction

Real-time sensor data is continuously displayed on the OLED screen, allowing users to quickly understand their plant’s environmental conditions without opening a web app.

Displayed information typically includes:

  1. Soil moisture percentage
  2. Temperature and humidity
  3. Light intensity status
  4. Network connectivity status


Data Transmission & Optimization

Cloud Communication

Collected sensor data is transmitted over Wi-Fi to:

  1. A cloud server
  2. Or a web application endpoint (e.g., Ubidots)

Smart Data Optimization

To reduce unnecessary network traffic:

  1. The system compares current sensor data with the previous reading
  2. Only changed data is transmitted
  3. If values remain the same, no HTTP request is made

This optimization reduces Bandwidth usage, Improves battery life, Prevents excessive cloud API calls

Continuous Operation

After initialization and setup:

  1. The device enters normal operation mode
  2. Data collection, display, and transmission run continuously
  3. Users can reset Wi-Fi credentials anytime using the reset button

This completes the full lifecycle of Tars from power-on to cloud monitoring.

Planter Stand & Decorative Outer Ring (Finishing Touches)

IMG_0598_2.jpg
IMG_0597.jpg
spary paint planter stand optimize.gif

This step focuses on the metal planter stand and a decorative outer ring that visually connects the display with the planter body.


Metal Planter Stand

Instead of 3D printing a stand, I chose to use a metal planter stand for better strength, durability, and aesthetics.

Why metal?

  1. Better weight support
  2. More stable than plastic
  3. Gives a premium look
  4. Long-lasting for indoor use

Process:

  1. I selected a ready-made metal planter stand
  2. Cleaned the surface to remove dust and oil
  3. Spray-painted it using metallic gold spray paint
  4. Applied multiple light coats instead of one heavy coat
  5. Let it dry completely before mounting the planter

Tip: Light sanding before painting helps the paint stick better and gives a smoother finish.


Decorative Outer Ring Around the Display

To enhance the visual appeal and frame the display area, I added a thin circular ring around the outer body of the planter.

Material Used:

  1. Unused electric wire / USB cable
  2. Approximate diameter: ~3 mm

This material is flexible, easy to bend, lightweight, and readily available.

How the Ring Was Made

  1. Cut the wire to the required length
  2. Measurement starts from one side of the display
  3. The wire runs around the outer perimeter of the planter
  4. Ends exactly at the other side of the display
  5. Both wire ends are neatly trimmed

A groove was already designed into the outer body during the CAD stage to guide this ring accurately.

Painting the Ring

  1. The wire was spray-painted using the same metallic gold paint as the stand
  2. This keeps the colour theme consistent
  3. Multiple thin coats were applied
  4. Allowed proper drying time between coats

Fixing the Ring to the Planter

  1. Apply hard glue / strong adhesive inside the groove
  2. Carefully place the painted wire into the groove
  3. Press gently to ensure proper seating
  4. Hold in place until the glue sets
  5. Clean any excess glue immediately


Why This Step Matters

  1. Visually separates the display area from the body
  2. Adds a premium industrial look
  3. Improves overall product aesthetics
  4. Makes the planter look more like a finished consumer product than a prototype


Final Result & Limitations

IMG_0827 copy.jpg
IMG_0820 copy.jpg
IMG_0637 copy.jpg
IMG_0812 1.jpg

Tars – Smart Planter v1 successfully monitors plant conditions and sends data to the cloud.

What Works Well

  1. Stable sensor readings due to regulated voltage
  2. Clean internal wiring
  3. Cloud monitoring via Ubidots
  4. Unique glow-in-the-dark design

Limitations

  1. Small OLED display
  2. Repotting a plant can be inconvenient
  3. Bulky enclosure
  4. Limited battery life
  5. Monitoring only (no automation)

Web Application (Out of Scope for This Build)

realtime-monitoring.gif
plant-care.gif

While this Instructable focuses on the electronics, firmware, and physical design of Tars – Smart Planter (v1), the overall project also includes a separate software and web application journey.

This section briefly explains what exists on the software side and why it is not included in this build guide.

Remote Monitoring Web Application (Overview)

Alongside the hardware, I also developed a remote monitoring web application using Node.js.

The web app was designed to:

  1. Display live sensor data from the planter
  2. Show plant care guide
  3. Provide plant information and common problems
  4. Offer AI-based plant health assessments using a generative AI API

This software layer was intended to transform raw sensor data into meaningful plant care insights.

Why It’s Not Included in This Instructable

I chose not to include the web application build here for the following reasons:

  1. This guide is focused on electronics, firmware, and hardware assembly
  2. The web application represents a separate software design journey
  3. Including backend, frontend, APIs, authentication, and AI integration would significantly increase complexity
  4. The web app was developed as a prototype, not a production-ready system

To keep this Instructable clear and reproducible, the software side is documented separately.

Why This Software Still Matters

Even though it’s not part of this step-by-step build:

  1. It demonstrates my transition from embedded systems to full-stack development
  2. It shows how IoT data can be extended into cloud-based insights
  3. It influenced design decisions in Tars Portable (v2)

The experience gained from building the web app directly shaped how I think about scalability, usability, and real-world deployment.

Software Preview (Prototype Showcase)

I have provided a few screenshots of the web application:

  1. Live sensor dashboard (live web app link - https://tars.anvesh-padamata.in/ )
  2. Plant care and plant info sections
  3. AI-based plant health suggestions

Where to Find More

The software source code, architecture notes, and future plans are:

  1. Available on my GitHub (linked in profile)
  2. Highlighted on my portfolio website
  3. Tars Live App

Final Note

This project represents both:

  1. A hardware engineering journey
  2. And a software design learning experience

Each part taught me different lessons — and together they shaped the evolution of Tars.