architecture
Full Project Spec
Complete technical specification — components, layers, operations, and design decisions
Full Project Spec
Type: Architecture
Concept
An autonomous ground rover that drags a permethrin-treated cloth to collect and kill ticks, logging session data to track trends over time.
Vehicle Layer — Traxxas TRX-4
- Mobility platform for uneven terrain, grass, roots
- Handles towing the drag cloth
- Includes ESC (motor control) and steering servo
Compute Layer — Raspberry Pi 4
- The brain: runs navigation, capture, return-to-home, and streaming
- MicroSD stores OS, captured images, and GPS logs
- Powered by independent USB battery pack (prevents electrical noise and motor spike crashes)
Control Layer — PCA9685 PWM Driver
- Converts Pi commands to RC signals
- Controls throttle (ESC) and steering servo
- Replaces the handheld controller
Navigation Layer — u-blox GPS Module
- Provides latitude/longitude for route recording, return-to-home, and session logging
- GPS-only for MVP (~2-3m precision)
- Path recording: user walks/drives the route first, rover replays it autonomously
- Boundary defined by the recorded path, no separate geofence
Sensing Layer
- ADS1115 ADC — reads analog signals (Pi can't natively)
- Voltage divider — scales battery voltage safely
- Together: monitor crawler battery and trigger return-to-home
Vision Layer
- Raspberry Pi Camera Module 3 (Standard) — forward-facing awareness and navigation, autofocus
- Camera cable — flexibility in mounting position
- Camera mount + ball head — precise angle adjustment, mounted to chassis with VHB tape + velcro
Sampling Layer
- Drag bar (PVC/dowel) — holds cloth behind rover
- White flannel cloth — collects ticks, treated with permethrin before each use cycle
- Optional dark backing — improves contrast for manual inspection
- Ticks incapacitated/killed on contact (nymphs <1 min, adults 1-3 hrs)
Physical + Mounting Layer
- Waterproof enclosure — protects Pi, ADC, wiring
- VHB tape + Velcro — secure mounting for enclosure, battery, and camera (no mount plate needed)
- Zip ties — cable management and backup securing
Wiring Layer
- Servo extension cables, connector taps, terminal block, ground wire
Optional Enhancements
- Buzzer — alerts on low battery or mission complete
- LED strip — consistent lighting for image capture
How the System Operates
1. Pre-Flight Check
Open New Mission in the dashboard. The system runs automated checks against live rover telemetry:
- System checks (blocking): rover connection, battery % (2S LiPo: 6.0V=0%, 8.4V=100%), GPS satellite lock, camera, disk space, WiFi signal, CPU temperature
- Weather check (advisory): precipitation probability over the next 3 hours via Open-Meteo. ≥80% = fail (advisory), 40-79% = warning, <40% = pass. Weather never blocks launch.
- Hit Re-check after fixing any issues to re-evaluate.
2. Launch
Confirm launch from the dashboard (all commands require confirmation dialogs). When missions:start fires, a Convex scheduled action auto-fetches weather from Open-Meteo and attaches a structured snapshot (temp, humidity, wind, precipitation, condition, 4-hour forecast) to the mission record. No manual weather logging needed.
3. Patrol
Rover drives the recorded route, drag cloth collects ticks. Dashboard shows live telemetry with battery as percentage.
4. Sampling Loop
move → stop → capture image → move → repeat
Each capture includes: image, timestamp, GPS location, battery %. Captures are browsable in a gallery with grid/list view and a lightbox viewer with prev/next navigation.
5. Inspect
After each session, flip the cloth and count ticks manually. Log the count, date, time, and conditions. Mission detail shows: weather at start, relative GPS route map (SVG), battery drain chart (collapsible), and full activity timeline.
6. Track Trends
Compare tick counts across sessions — by season, weather, time of day. Weather data is structured and attached to each mission for correlation.
7. Return-to-Home
When battery low: rover navigates back and alerts you.
Missions are identified by their start date/time (e.g. "Apr 12, 2026, 9:34 AM").
Design Decisions
Software
- Pi OS: Standard Raspberry Pi OS
- Language: Python
- Data upload: WiFi preferred; offline queue on SD card, syncs when back in range
- Central app: This Next.js/Convex project — parts, build docs, test runs, data logging, vision/ML, public how-to guide
Vision
- Camera is forward-facing for navigation and awareness
- Ticks grab the underside of the cloth, so camera-based tick counting isn't feasible
- Tick counts are done manually after each session by flipping the cloth
Hardware
- Drag bar mount raised slightly, dragging as far back as possible
- No obstacle avoidance for MVP — yard assumed mostly clear
- Run time unknown; smart return-to-home on low battery
Operations
- Daily use: set it off each morning, runs as long as battery allows
- Won't run in rain; handles morning dew (~9am starts)
- Dashboard shows live weather with 8-hour forecast (Open-Meteo, no API key needed)
- New Mission page checks precipitation probability for next 3 hours as go/no-go advisory
- Weather auto-attached to every mission at start — no manual logging
Data Pipeline
Rover (Pi) → WiFi upload → Convex backend → Next.js dashboard
↓ (if no WiFi)
Local queue on SD → sync when reconnected
Open Questions
- Exact drag bar attachment to TRX-4
- Battery run time (determines mission length)
- Cloth maintenance strategy mid-run
