About
## The problem it solves
# AI-EcoTrack: Circular Waste Intelligence
## The Problem
Industrial and electronic waste often reaches recyclers without labels or material records. Workers must identify unknown machinery, batteries, circuit boards, and cables through guesswork.
This creates:
- **Safety risks:** Items may contain pressure, electrical charge, lead, toxic chemicals, flammable residue, or hazardous gases.
- **Lost value:** Valuable alloys and reusable parts get mixed with low-value scrap.
- **Poor traceability:** Organisations cannot reliably track recycling outcomes.
- **Inefficient collection:** Vehicles follow fixed routes even when bins are not full.
Manual sorting is inconsistent, damaged barcodes are useless, and laboratory tests are too expensive for every item. Basic vision tools may identify an object but not its hazards, value, handling method, or recycling route.
## Our Solution
AI-EcoTrack combines **AI identification, safety validation, valuation, Digital Product Passports, IoT smart bins, and route optimisation**.
**Capture → Identify → Verify Safety → Guide Handling → Estimate Value → Create Passport → Monitor Bin → Optimise Collection**
### Identification and Safety
A worker captures up to three views using a phone, computer, ESP32 camera, or Raspberry Pi. The system estimates the item, materials, alloy, condition, category, hazards, confidence, mass, and recovery value—even without a label.

Every result passes through a deterministic **Safety Gatekeeper** that AI cannot override. Pressure, lead, flammable residue, hazardous chemicals, and asbestos-era parts trigger relevant isolation, PPE, containment, and escalation guidance.
Low-confidence results are blocked and sent for expert review. The platform supports decisions; it does not replace laboratory tests or qualified professionals.

### Guidance, Value and Traceability
After validation, AI-EcoTrack retrieves material, safety, pricing, and disassembly information. It provides PPE, preparation, dismantling, segregation, and disposal guidance. English, Hindi, speech recognition, and text-to-speech improve accessibility.
Recovery value is estimated from material, mass, purity, recyclability, and regional prices. This helps decide whether an item should be reused, repaired, remanufactured, recycled, or treated as hazardous.
Each verified item can receive a QR-linked **Digital Product Passport** containing its identity, materials, hazards, recyclability, value, scan history, and lifecycle events. This provides traceability for recyclers, manufacturers, and auditors.
### Smart Bins and Collection
Arduino and ESP32 smart bins monitor fill level, gases, temperature, humidity, deposits, and device status. Unsafe readings trigger warnings; full bins are marked for pickup.

The platform selects bins requiring collection and calculates a stop sequence using geographic distance and a nearest-neighbour strategy. Operators can view estimated distance, time, emission savings, and nearby recycling facilities. This replaces fixed trips with demand-based collection.
## Technology and Innovation
AI-EcoTrack uses web, desktop and mobile technologies, Firebase, Groq AI with Gemini fallback, Whisper, Raspberry Pi, Arduino, ESP32, and OpenStreetMap. It supports web, desktop, mobile, and edge-device workflows.

Unlike single-purpose tools, it connects:
- Identification without labels
- Deterministic safety and expert escalation - Disassembly and segregation guidance - Valuation and recyclability scoring - QR-based lifecycle records - Live smart-bin telemetry - Optimised collection routes
For example, a worker can scan a corroded valve, receive its probable material and pressure warning, access safe guidance, estimate its value, create its passport, store it in a monitored bin, and include that bin in an optimised route.
## Users and Impact
AI-EcoTrack supports workers, recyclers, factories, municipalities, collection fleets, manufacturers, auditors, and sustainability teams.
It enables **safer handling, better segregation, higher recovery value, less contamination, improved traceability, fewer unnecessary trips, lower costs, and reduced avoidable emissions**.
AI-EcoTrack transforms waste from an unidentified liability into a safer, traceable, and potentially valuable resource.
## Challenges we ran into
# Challenges We Ran Into
AI-EcoTrack combines AI, safety logic, cloud software, multiple applications, and physical hardware. The hardest part was not building isolated features, but making the complete workflow reliable.
## 1. Inconsistent AI Results Across Images
A corroded component can look completely different from the front, side, and top. A single image sometimes produced incomplete or conflicting predictions for the part, material, and hazards. Model responses could also include extra text or malformed JSON, breaking later steps.
We built a **multi-view pipeline** in which up to three angles are analysed separately and merged using confidence and cross-view evidence. We also added a strict response schema, JSON extraction, validation, and safe defaults. If one angle fails, the other successful angles can still be used instead of losing the complete scan.
This made identification more tolerant of corrosion, poor lighting, partial visibility, and temporary model errors.
## 2. Preventing Unsafe AI Decisions
AI can give a confident-sounding answer even when it is uncertain. That is unacceptable when an item may contain trapped pressure, lead, toxic chemicals, flammable residue, or asbestos.
We separated **AI identification** from **safety authority**. The model proposes the item and hazard information, but a deterministic Safety Gatekeeper applies mandatory rules afterward. The AI cannot remove or override them.
Pressurised parts receive isolation and lockout/tagout precautions. Other hazard flags add relevant PPE, containment, and escalation guidance. If confidence is below the safety threshold, automatic processing is blocked and human review is required.
Our rule became simple: uncertainty must create an escalation, not a guess.
## 3. Rate Limits, Timeouts and Provider Failures
Vision analysis uses external AI services. During testing, rate limits, slow responses, invalid output, and temporary service errors could cause an entire scan to fail.
We added:
- Rotation across available Groq API keys
- Gemini as an independent fallback
- Time limits for each provider attempt
- Validation before accepting responses
- Partial success if only one angle fails
- Retryable errors when every provider is unavailable
- Cached guides to avoid unnecessary repeated calls
Demo data is kept separate from real scans. The production path does not silently show a fabricated result when AI providers fail; it returns an honest retry state and preserves the scan for another attempt.
## 4. Connecting Real Hardware to the Cloud
Combining Arduino sensors, an ESP32 gateway, an ESP32-CAM, Raspberry Pi, and a cloud dashboard created several issues. Sensor readings fluctuate, serial messages may be incomplete, Wi-Fi can disconnect, and malformed JSON can prevent data from reaching the application.
We divided responsibilities: Arduino samples sensors, while ESP32 handles Wi-Fi and HTTPS communication. Readings are normalised into one JSON structure before reaching the API.
We added calibration, bounded values, repeated sampling, event debouncing, JSON parse checks, retry behaviour, and connection-status feedback. The dashboard displays the last update time so stale data is not presented as a live reading.
## 5. Device Ownership and Cross-Platform Consistency
Hardware devices must send data only to their assigned organisation. At the same time, web, desktop, mobile, Raspberry Pi, and ESP32 clients must interpret scan and sensor data consistently.
For hardware security, we created a staged lifecycle:
**Factory registration → Claim request → Nonce verification → Admin confirmation → Runtime token**
A temporary bootstrap credential is used during setup. The device proves possession, waits for administrator confirmation, and then receives runtime credentials. This prevents devices or sensor readings from being assigned to the wrong organisation.
For application consistency, we introduced shared payload structures and central API routes. Firebase acts as the common state layer for users, scans, passports, devices, and telemetry. Clients consume the same structured results and handle optional or missing fields gracefully instead of crashing.
## What We Learned
The biggest lesson was that a responsible AI system requires more than connecting a model to a camera. Reliability comes from structured validation, deterministic rules, provider fallbacks, secure device provisioning, visible error states, and human escalation.
Our final approach is:
**AI suggests → deterministic rules verify → humans handle uncertainty → the platform records the result.**
Screenshots
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.











