Alejandro Delgado Cardona
Portfolio Software engineering León, MX · 2026
← Selected work
Type
Design and development · full-stack + firmware
Year
2025
Stack
ESP32-CAM · .NET 9 · OpenAI Vision
Collaborators
Jonathan Moreno Muñoz · Vayron Abraham Granados Conchas · Brandon Esaú Montoya Ortiz
Links
Demo

Context

Sorting waste properly depends on a person recognizing the material at the exact moment they throw it away, and that almost never happens. I wanted to find out whether a low-cost device could make that decision on its own and act on it, without relying on the user knowing anything about recycling.

What I built

A complete end-to-end system, in three pieces that talk to each other:

  • A physical station with an ESP32-CAM and firmware in C++. An ultrasonic sensor detects an approaching item, the camera takes a photo and, based on the category returned by the server, a servo controller (PCA9685) opens the correct bin: organic, recyclable or non-recyclable.
  • A central API with ASP.NET Core / .NET 9. It receives the image, classifies it, stores the detection and returns the category. It handles users with JWT, along with zones, classifiers, statistics and inventory, on SQL Server with Entity Framework Core.
  • An Android app with Kotlin and Jetpack Compose. It allows classifying from the phone with CameraX and reviewing usage statistics by type, zone, time of day and trend.

Classification distinguishes three operational categories plus an error state for images that are not clear enough.

Technical decisions

  • Inference through a vision model (yolov8 or gpt-4o) behind the API, with a strict response contract. Three labels organic, recyclable and non-recyclable so that the model, the firmware and the app can all act without ambiguity.
  • The device does not decide on its own. Centralizing inference and persistence in the API keeps the firmware simple and, as a side benefit, leaves everything recorded for statistics and traceability by zone and classifier.
  • HTTP multipart communication between the ESP32, Android and the API; every detection is persisted for analytics.
  • Responsibilities split across three repositories (cabapi, cabesp, cabmobile), one per layer of the system, so each member can work and collaborate efficiently.

Result

A functional end-to-end system: hardware that detects and acts, an API that classifies and records, and an app that classifies and reports. Its value lies in the range covered embedded firmware, AI, backend and mobile all solved.

It is an academic prototype, not a commercial product, so production deployment and actual sale are deliberately out of scope.