All projects

PlantSense

IoT plant disease detection system

Role
ESP32 + web developer
Team
5 members
Type
IoT + web app
PlantSense screenshot

Overview

The problem

Plant diseases spread quickly, and by the time a grower recognises one by eye, much of the crop can already be affected. Expert diagnosis is slow and not always available.

The solution

PlantSense puts a low-cost camera next to the plant. It photographs a leaf, classifies the disease with an AI model on a Raspberry Pi, shows the result on the device right away, and records every scan on a web dashboard.

My role

ESP32 and web developer in a team of five. I wrote the firmware for the ESP32-CAM and the ESP32 hub, built the React web dashboard and the Express API, managed the project workflow, and wrote the documentation.

Key features

  • Leaf images captured by an ESP32-CAM with its LED flash, then sent to an ESP32 hub
  • Disease classification on a Raspberry Pi 5 with a ResNet50 TensorFlow Lite model covering 38 classes
  • Instant feedback on the device: OLED screen, status LEDs, and a buzzer
  • Results with confidence scores and a treatment recommendation saved to a cloud API
  • Web dashboard with scan statistics, the latest scan, and automatic updates
  • Detection history with search, health-status filters, sorting, and CSV export

Screenshots

Select a screenshot to view it full size.

On mobile: the home page, the plant health dashboard, and the detection history.

Architecture

From leaf to dashboard. Two ESP32 boards capture and forward the image, a Raspberry Pi 5 runs the model at the edge, and the result is saved to a cloud API that the web dashboard reads. Select a part to see what it does and what it connects to.

My part · C++ firmware

ESP32-CAM

Captures a JPEG photo of the leaf with the LED flash and sends it to the hub.

  • OV2640 camera with flash on GPIO 4
  • Sends each image in a framed packet with a checksum, so corrupted transfers are detected

Connects to

Challenges

Moving images reliably between two microcontrollers

Problem

A JPEG photo is tens of kilobytes, and sending it over a serial (UART) link between two ESP32s can silently drop or corrupt bytes, which breaks the image.

Solution

I designed a simple packet format: a 4-byte marker, the image length, and a CRC16 checksum before the image bytes, sent at 921,600 baud. The hub checks the length and checksum and rejects any image that didn't arrive intact.

Showing results without opening a computer

Problem

Someone standing next to the plant needs the diagnosis right away, not only on a website.

Solution

The hub shows the status and diagnosis on an OLED screen, lights a green or red LED, and sounds a buzzer, while the same result is also saved for the web dashboard.