VLF
Back to portfolio
Engineering2026

AI-Powered Hydroponics Robot

A cable-suspended camera platform that pans across a hydroponic rig, finds ArUco-marked plants, drops to close-up height, snaps a photo, and pipes it through a locally hosted vision-language model into a live dashboard.

Solo build. Firmware, server, vision pipeline, dashboard, deployment.

01

What I built

A semester-long engineering project: an autonomous plant-monitoring robot for a small hydroponic rig. The robot hangs on a four-cable lift inside the rig with a separate pan axis, finds each plant by its ArUco marker, drops to a close-up height, captures a photo, and runs it through a vision-language model. Structured plant-health output streams to a live dashboard.

It started as a rough motion-control prototype and evolved into a full rewrite covering firmware, server, vision pipeline, dashboard, and scheduler.

02

Why hydroponics

I wanted to learn through making, and to explore how mechanical, electrical, and AI systems fit together. Hydroponics was deliberate: controlled-environment agriculture is becoming increasingly relevant in Thailand as land and climate pressures push small-scale farming toward more technology-driven approaches.

03

Owning every layer

Working solo meant owning every layer: mechanical assembly, electronics, firmware, host software, computer vision, and deploy infrastructure. That forced clean interfaces between subsystems instead of letting things bleed into each other.

The control side uses a VEX EXP brain talking to a host Mac over USB serial. The brain runs the motion firmware in C++. The host runs everything else.

04

Control stability, the hard part

Most development time went into control stability. A naive first attempt sending the same velocity to all four cable motors caused wobble-induced sign-flip oscillation: tiny tension imbalances would cause one motor to overshoot, the controller would reverse it, the cable would slack, then snap back. The whole rig would shake.

I solved it by latching each motor independently the moment it hit tolerance, backed by brain-side software limits and a watchdog. That gave lockstep motion without needing a full PID loop, and it survives the asymmetric loading you get whenever the camera platform isn't perfectly centered.

05

Reverse-engineering VEX

VEX is a closed ecosystem. I used it for budget reasons, but its byte-level USB command scheme is not designed for general-purpose use. I reverse-engineered the USB interface and replaced its protocol with a tagged compact-line scheme of my own: structured, versioned, and debuggable, so I could trace exactly what the host was sending and what the brain was doing.

06

The full software stack

VEX firmware in C++. A Python FastAPI server on the host with HTMX, Tailwind, and Server-Sent Events for the dashboard. SQLite for storage with tiered photo retention so old captures get downsampled rather than deleted. APScheduler runs the autonomous scan loop. OpenCV handles capture, ArUco detection, and pre-processing before frames go to the VLM in LM Studio.

There's also a mock mode that swaps the brain, camera, and VLM for in-process fakes so the whole system runs with no hardware attached. That made it possible to develop the dashboard and scheduler on a plane, on a lunch break, or anywhere I wasn't standing next to the rig.

07

Deployment

Two-Mac setup with a git-hook deploy. Push to the repo, the host Mac pulls and restarts. LLM-assisted coding tools were used throughout, but I kept full ownership of architecture and behavior. Every interface and every state machine was a decision I made and could explain.

Video

See it running.

Robot in motion: cable lift moving between plant stations

Gallery

Selected images.

Skills & concepts

Embedded systemsMicrocontrollersFirmware development (C++)Reverse engineeringClosed-loop motion controlComputer visionVision-language modelsAI integrationHardware and software integrationSystem architectureCoding with LLM