| layout |
|
|---|

image [1] logo
Seattle University - College of Science and Engineering
ECEGR 4640: Internet of Things (IoT)
Ezekiel A. Mitchell
[email protected]
Danny Woo Community Garden (Andy Allen, [email protected])
The Danny Woo Community Garden (established 1975) is a 1.5-acre urban P-Patch serving Seattle's International District/Chinatown community. Rat infestations significantly reduce harvest yields. GUARDEN offers a data-driven solution utilizing distributed AI-powered camera nodes to monitor and map rat activity, facilitating targeted pest control.
- Edge AI Detection - On-device TensorFlow Lite inference on ESP32-C3
- Low Power Operation - Motion-triggered wake with deep sleep (10µA standby)
- Privacy-First - Metadata-only transmission, no images leave devices
- Real-Time Monitoring - Local web dashboard with live visualization
- Data-Driven Insights - Activity heatmaps, peak detection times, nesting area identification
- Offline Operation - Fully self-contained system with no internet dependency
- Local Network - Pi 5B+ acts as a WiFi access point for ESP32 nodes and user access
| Component | Specification | Performance | Power |
|---|---|---|---|
| Processor | ESP32-C3 RISC-V @ 160MHz | <1s inference target | 240mA active |
| Camera | OV2640 2MP sensor | 96×96 grayscale capture | 80mA |
| AI Model | MobileNetV2 α=0.35 TFLite INT8 | >65% accuracy target | 160mA |
| Motion Sensor | PIR sensor | Event-driven wake | 50µA standby |
| Sleep Mode | Deep sleep | Extended battery | 10µA |
| Connectivity | WiFi 802.11 b/g/n + MQTT | Local AP only | 120mA TX |
| Storage | MicroSD + PostgreSQL | Offline resilience | 20mA write |
| Power | Solar + 5000mAh LiPo | 10+ day runtime | Self-sustaining |
| Metric | Target | Status |
|---|---|---|
| Detection Latency | <1s | In progress |
| Battery Life | 3+ days | In progress |
| Detection Accuracy | >65% | In progress |
| Network Uptime | >20% | In progress |
| Storage Capacity | 3+ days | In progress |
GUARDEN/
├── edge/ # ESP32-C3 firmware (PlatformIO)
│ ├── platformio.ini
│ └── src/
│ ├── main.cpp # Entry point, deep sleep logic
│ ├── camera.cpp/.h # OV2640 init + capture
│ ├── detector.cpp/.h # TFLite inference wrapper
│ ├── mqtt_client.cpp/.h # WiFi + MQTT publish
│ ├── model_data.h # Auto-generated from quantize.py
│ └── config.h # Pin defs, thresholds, node ID
│
├── fog/ # Raspberry Pi hub (all services)
│ ├── broker/mosquitto.conf # MQTT broker config
│ ├── ingestion/main.py # MQTT → PostgreSQL ingestion
│ ├── dashboard/app.py # Flask dashboard + API
│ ├── db/schema.sql # Database schema
│ ├── setup.sh # One-shot Pi setup script
│ └── requirements.txt
│
├── model/ # ML pipeline (run on laptop)
│ ├── train.py # MobileNetV2 training
│ ├── quantize.py # INT8 TFLite export
│ ├── evaluate.py # Accuracy benchmarks
│ └── guarden_v1_int8.tflite # Trained model
│
├── config/
│ ├── nodes.yaml # Node locations + GPS coords
│ └── .env.example # Environment variable template
│
└── tests/
├── test_ingestion.py
├── test_dashboard.py
└── test_model.py