IoT · SMART AGRICULTURE

BLOO

SmartFarm IoT Monitoring & Automated Control

A smart agriculture IoT system that monitors environmental conditions and automatically controls irrigation and a protective roof through ESP32 and Firebase.

ROLEIoT Developer · Embedded Systems
CONTRIBUTION100% IoT Development
TECH STACKESP32 · Firebase · DHT22 · Soil Moisture · Raindrop Sensor · Servo · Relay
FOCUSSensor Integration · Automation · IoT Communication
PHYSICAL PROTOTYPE SHOWCASE · ESP32 IOT SYSTEM
DEVICE ONLINE · TELEMETRY ACTIVE
BLOO Physical Smart Greenhouse Prototype with Onboard Sensors and Actuators
Integrated greenhouse prototype featuring local display, environmental sensing, irrigation relay, and automated servo roof.
ESP32DHT22Soil MoistureRaindrop PlateRelay + PumpSG90 Servo16x2 LCD
01 / THE PROBLEM

Plant care becomes difficult when environmental conditions change constantly.

Maintaining delicate greenhouse plants manually requires round-the-clock vigilance. Temperature fluctuations, unpredictable precipitation, and inconsistent soil moisture frequently lead to stressed root systems, over-watering, or sudden water-logging damage without automated safeguards.

IRREGULAR WATERING

Manual watering is inherently inconsistent, resulting in severe moisture stress, root dehydration, or fungal rot from accidental over-watering.

UNMONITORED CONDITIONS

Ambient temperature, relative humidity, soil moisture, and sudden rain are impossible to assess continuously without dedicated telemetry sensors.

WEATHER EXPOSURE

Torrential downpours cause physical leaf damage and wash away soil nutrients unless protective greenhouse shutters close instantaneously.

REMOTE ACCESS

Caregivers lack real-time visibility and cannot trigger immediate irrigation or roof override actions when off-site or away from the farm.

02 / THE SOLUTION

An IoT system that senses, decides, and acts.

BLOO transforms manual plant husbandry into an autonomous, closed-loop feedback system. Powered by an ESP32 microcontroller, BLOO continuously samples multiple environmental sensors, executes localized automation thresholds, triggers high-torque actuators, and streams telemetry to the cloud.

01

SENSE

Continuous analog & digital sampling across all physical interfaces.

DHT22 · Soil Moisture · Raindrop
02

PROCESS

Onboard signal calibration, noise filtering, and edge evaluation.

ESP32 240MHz Dual-Core
03

DECIDE

Threshold comparison algorithms determining actuator states.

Moisture < 30% | Rain Alert
04

ACT

Direct relay switching and PWM pulse-width position control.

DC Pump · SG90 Servo Roof
05

SYNC

Sub-second bidirectional telemetry and remote command sync.

Firebase Realtime DB
03 / MY CONTRIBUTION · 100% SOLE OWNERSHIP

“I owned the entire IoT implementation end-to-end.”

I personally handled the complete IoT engineering lifecycle independently: from hardware sourcing, circuit schematic design, and voltage regulation, to C++/Arduino embedded firmware, sensor calibration, autonomous control logic, and two-way Firebase cloud synchronization.

01 · PHYSICAL LAYER

HARDWARE INTEGRATION

Selected, wired, and integrated all physical modules: ESP32 microcontroller, DHT22 sensor, soil moisture probe, raindrop plate, 5V relay module, DC water pump, SG90 servo motor, and 16x2 I2C LCD.

02 · FIRMWARE ARCHITECTURE

EMBEDDED LOGIC

Authored robust C++ firmware for the ESP32. Implemented analog-to-digital sensor reading loops, debouncing, threshold evaluations, device state management, and reliable fail-safe recovery routines.

03 · CLOSED-LOOP CONTROLS

AUTOMATION

Programmed autonomous irrigation activation when soil moisture drops below 30% and immediate motorized roof closure upon raindrop detection, protecting plants with zero human latency.

04 · CLOUD SYNC

FIREBASE INTEGRATION

Engineered the two-way communication protocol between ESP32 and Firebase Realtime Database. Structured live JSON telemetry pushes and implemented asynchronous event listeners for mobile app commands.

05 · END-TO-END

SYSTEM INTEGRATION

Bridged physical hardware states with the mobile application interface via Firebase, validating seamless command execution and sub-second telemetry feedback in field-style bench testing.

04 / HARDWARE

The physical system behind BLOO.

A modular embedded architecture engineered for reliable continuous operation. The system balances 3.3V logic for the ESP32 and sensitive digital sensors alongside 5V power rails for inductive relay loads and high-draw servo actuation.

PHYSICAL PROTOTYPE ENCLOSURE & LABELED SENSORS100% INDEPENDENT WIRING
BLOO Prototype Greenhouse Frame
PROCESSING UNIT

ESP32 Microcontroller

Dual-core Xtensa 32-bit MCU with integrated 2.4 GHz Wi-Fi. Executes local threshold loops and maintains persistent TCP sockets to Firebase.

CLIMATE SENSING

DHT22 Sensor

Calibrated capacitive humidity sensor and thermistor providing high-accuracy ambient readings (Temp ±0.5°C, Humidity ±2% RH).

HYDRATION PROBE

Soil Moisture Sensor

Measures soil dielectric permittivity to accurately calculate volumetric water content and trigger irrigation when moisture < 30%.

WEATHER DETECTION

Raindrop Sensor Plate

Nickel-coated serpentine trace sensor detecting water droplet conductivity for instantaneous automated roof shutter closure.

IRRIGATION ACTUATOR

Mini Water Pump

5V DC submersible centrifugal pump providing targeted drip irrigation directly to plant root zones upon relay contact closure.

POWER SWITCHING

Electromechanical Relay

Optocoupler-isolated relay module providing galvanic isolation between the sensitive ESP32 GPIOs and the inductive pump motor.

PROTECTION SHUTTER

SG90 Micro Servo

High-torque miniature servo receiving 50 Hz PWM position pulses to physically rotate the acrylic roof shutter between 0° and 90°.

LOCAL TELEMETRY

16x2 I2C LCD Display

On-device alphanumeric display rendering real-time temperature, humidity, and soil moisture metrics for immediate offline inspection.

05 / SYSTEM ARCHITECTURE

Connecting physical sensors to a remote control layer.

BLOO unites embedded hardware with a reactive cloud data layer. By treating Firebase as the central synchronization bus, sensor telemetry flows effortlessly from edge devices to mobile clients while remote commands reach the ESP32 in real time.

IOT ↔ FIREBASE ↔ MOBILE APPLICATION ARCHITECTUREBIDIRECTIONAL REAL-TIME BUS
BLOO System Architecture: IoT Device to Firebase to Mobile Application
DEVICE → FIREBASE (UPSTREAM TELEMETRY)

Continuous Environmental Streaming

The ESP32 samples connected sensors on scheduled intervals, packages readings into JSON payloads, and pushes structured telemetry to Firebase Realtime Database over secure Wi-Fi sockets.

SENSORSDHT22, Soil Probe, Rain Plate generate analog/digital signals
ESP32Firmware serializes floats & booleans into JSON document
FIREBASERealtime Database updates node /bloo/telemetry
MOBILE APPApp re-renders live gauges with sub-second latency
FIREBASE → DEVICE (DOWNSTREAM CONTROL)

Real-Time Actuator Command Dispatch

When a caregiver triggers a manual pump cycle or forces a roof shutter adjustment via the mobile application, commands are written to Firebase and consumed instantly by the ESP32 event listener.

CAREGIVERToggles Manual Water Pump or Roof Override in App UI
FIREBASEValue update written to /bloo/controls/pump_override
ESP32Stream listener receives event callback within milliseconds
ACTUATORSGPIO pulses trigger relay contact or SG90 servo motor
06 / AUTOMATION LOGIC

Turning sensor readings into automatic actions.

The microcontroller evaluates deterministic environmental thresholds to preserve ideal botanical growth parameters. Below is the exact logical execution cycle programmed into the ESP32.

01

Poll Ambient Temperature & Relative Humidity

ESP32 communicates over single-bus protocol to read calibrated DHT22 metrics.

dht.readTemperature() · dht.readHumidity()
02

Sample Soil Moisture Voltage

Analog pin samples resistive/capacitive voltage level, mapping raw ADC (0–4095) into calibrated percentage.

map(analogRead(SOIL_PIN), DRY_ADC, WET_ADC, 0, 100)
03

Evaluate Irrigation Threshold (< 30%)

System assesses current hydration. If moisture is critically low (< 30%), the irrigation cycle engages.

if (soilMoisture < 30) -> PUMP_ON; else -> PUMP_OFF;
04

Detect Precipitation & Adjust Roof Shutter

Raindrop plate detects water conductivity. If rain is detected, SG90 servo rotates to 90° (closed). When clear, roof resets to 0° (open).

if (isRaining) servo.write(90); else servo.write(0);
05

Push Synchronized Telemetry to Firebase & Update LCD

Current metrics and actuator states are committed to cloud storage and refreshed on the local 16x2 character LCD.

Firebase.setJSON("/bloo/telemetry", payload) · lcd.print()

Interactive Embedded Logic Simulator

Toggle environmental conditions to see how the ESP32 automation algorithm responds in real time.

SIMULATED FIRMWARE LOOP
1. SOIL MOISTURE CONDITION
2. RAINDROP SENSOR STATUS
WATER PUMP RELAY● ON (IRRIGATING)
SG90 SERVO ROOFCLOSED (90° PROTECT)
FIREBASE CLOUD STATUSSYNCED (SUB-SECOND)
07 / FIREBASE INTEGRATION

The communication layer between hardware and application.

Firebase Realtime Database serves as the real-time synchronization broker. By leveraging WebSocket protocols, the physical ESP32 and remote application communicate bidirectionally with minimal overhead and zero public IP routing complications.

UPSTREAM: /bloo/telemetryESP32 → FIREBASE
{
  "timestamp": 1788532000,
  "device_id": "esp32_smartfarm_01",
  "sensors": {
    "temperature_c": 28.4,
    "humidity_pct": 65.2,
    "soil_moisture_pct": 24.5,
    "is_raining": true
  },
  "actuators": {
    "pump_relay_active": true,
    "roof_servo_deg": 90
  }
}
DOWNSTREAM: /bloo/controlsAPP → FIREBASE → ESP32
{
  "manual_override": {
    "force_pump": false,
    "force_roof_open": false
  },
  "thresholds": {
    "soil_trigger_pct": 30.0,
    "auto_roof_enabled": true
  },
  "command_id": "cmd_82581e",
  "issued_at": 1788532050
}
08 / APPLICATION CONNECTION

From physical sensors to a remote control interface.

The mobile application interfaces directly with Firebase nodes, abstracting low-level micro-controller logic into an intuitive monitoring cockpit. Farmers and gardeners can inspect health metrics, view live status flags, and trigger physical actuators anytime, anywhere.

DISPLAY METRICS

Real-Time Telemetry Dashboard

Renders live readings for ambient temperature (°C), air humidity (%), soil moisture percentage, and binary rain detection with clear visual status indicators.

REMOTE OVERRIDES

Interactive Actuator Toggles

Allows users to manually command the water pump relay or override the roof position, writing immediate commands to Firebase that the ESP32 consumes.

DEVICE STATUS

Heartbeat & Connection Health

Monitors the ESP32 heartbeat timestamp in Firebase to confirm that the hardware system is actively connected and sampling the physical garden bed.

09 / SYSTEM FLOW

Complete end-to-end telemetry and actuation loop.

The complete cyclical data path connecting human intention, cloud persistence, embedded computation, and physical greenhouse actuators.

USER INTERACTIONCaregiver monitors live soil conditions or toggles irrigation on mobile device.
MOBILE APPApp formats user commands and dispatches them over HTTPS/WSS to Firebase.
FIREBASE REALTIME DBCloud broker updates data nodes and fires websocket push notifications.
ESP32 MICROCONTROLLERFirmware listener receives payload and executes localized threshold routines.
SENSORS + LOGICContinuously samples DHT22, soil moisture, and rain plate to verify plant needs.
PUMP / SERVO ACTUATORSRelay engages DC water pump for irrigation; SG90 servo motor pivots protective roof.
NEW SENSOR TELEMETRYUpdated moisture levels and actuator states pushed back into Firebase Realtime DB.
MOBILE REFRESHMobile UI synchronizes instantly, confirming hydration and greenhouse protection.
10 / RESULT

A connected system for monitoring and automated plant care.

The operational BLOO prototype validates that targeted embedded engineering and responsive cloud architectures can eliminate common agriculture failure points.

REAL-TIME MONITORING

Environmental parameters are synchronized continuously through Firebase, giving owners comprehensive visibility into crop climate stability.

AUTOMATED IRRIGATION

Pump activation responds autonomously to soil moisture conditions (< 30%), preventing both destructive dehydration and root suffocation.

AUTOMATED ROOF CONTROL

Roof shutter position reacts immediately to rain plate detection, automatically sheltering delicate flora from violent squalls.

REMOTE CONTROL

Users can issue manual override commands through the connected mobile application to adjust pump intervals or roof status at will.

CONNECTED IoT SYSTEM

Physical hardware and the digital application layer communicate cohesively through Firebase, creating a proven smart agriculture foundation.

11 / PROJECT SHOWCASE

Visual gallery & engineering artifacts.

Explore the physical build, circuit wiring, cloud architecture diagrams, and hardware components behind the BLOO SmartFarm project. Click any card to inspect in high resolution.

Explore the Implementation

View the BLOO SmartFarm IoT implementation and application integration on GitHub.