DP / PATEL
All Projects

Team Engineering Project — Mechatronics & Embedded Systems

Automated Cat Litter Box

A team-built rotating-drum litter box with ESP32 dual-core control, load-cell and vision-based cat detection, and motor-current monitoring for safe, hands-off operation.

MechatronicsESP32Embedded C++Sensor FusionSafety Logic
Automated Cat Litter Box
01

Overview

A five-person mechatronics project: a tumbling-drum litter box that separates clean litter from waste automatically. My work covered the electrical system, ESP32 firmware, and sensor/actuator integration — the mechanical design, CAD, and structural analysis were led by a teammate.

02

Team Project & My Contribution

Automated Cat Litter Box was a five-person mechatronics project. Mechanical design — the drum, drivetrain, and enclosure CAD and structural analysis — was led by a teammate. My work focused on the electrical system, firmware, and sensor and safety-logic integration.

  • Camera-based detection: integrated and programmed the OpenMV vision system (motion-based ROI detection) and its serial link to the ESP32.
  • Embedded control: wrote the ESP32 firmware and state machine (idle → cat-present → exit-delay → cleaning → fine-homing).
  • Electrical integration: contributed to system wiring and sensor integration — load cell, Hall-effect sensor, current sensor — alongside the team.
  • Safety logic: implemented the dual-sensor (load-cell + vision) presence check that immediately halts the cleaning cycle if the cat re-enters mid-cycle.
03

System Architecture

ESP32 (Dual-Core)

One core dedicated to safety-critical sensor polling, the other to motor and sequencing logic

Tumbling Sifter Drum

24V DC gearmotor (~1:15 reduction) rotating the drum at ~5 RPM; mechanical design by a teammate

Load Cell + HX711

Weight-based cat-presence detection

OpenMV Camera

Motion-based ROI detection, serial link to the ESP32

Hall-Effect Sensor

Magnetic homing for repeatable drum positioning

ACS712 Current Sensor

Motor-current monitoring for jam/overload awareness

04

Testing & Results

  • Load-cell detection: a clear separation between empty (~14,000–16,000 raw) and occupied (~45,000–47,000 raw) readings, giving a wide margin against false triggers.
  • Vision detection: reliable under normal indoor lighting, but accuracy dropped under reduced or low lighting — this is why the load cell was treated as the primary detection layer, with the camera as a secondary check rather than the sole trigger.
  • Hall-effect homing: consistent magnet detection across repeated cycles for repeatable drum positioning.
  • Safety interlock: verified that re-entry during an active cleaning cycle immediately stops the motor and returns the system to idle.
  • Structural validation (mechanical team): simulated stresses in the drum and base stayed well below the material's yield strength under expected operating loads.
05

Challenges & Limitations

  • Vision performance was lighting-dependent; sensor fusion with the load cell — rather than vision alone — turned out to be the more robust detection strategy.
  • The prototype was built at 50% scale via FDM 3D printing, so tolerances tuned for injection molding needed rework (wall thickness, mating clearances) to fit the printed parts.
  • Long-term durability of the 3D-printed components is limited compared to the production-grade ABS intended for a manufactured version.
06

Gallery

Exploded CAD render of the litter box drum, sifting plate, and waste tray
Exploded CAD view — drum, sifting plate, and waste tray (CAD render, not a photograph)
Photograph of the assembled 3D-printed litter box prototype
3D-printed prototype — drum and housing assembled (photograph)
Photograph of printed miter and helical gears from the drivetrain iteration
Printed gear-train iterations — miter and helical stages (photograph)
FEA von Mises stress and strain simulation of the drum under load
FEA stress and strain simulation of the drum under operating load
OpenMV IDE showing a region-of-interest overlay during motion detection testing
OpenMV motion-detection ROI overlay during camera testing
Serial monitor log showing the cleaning cycle cancel when the cat re-enters
Serial log: the safety interlock canceling a cleaning cycle when the cat re-enters