Seeker Tracker
Seeker Tracker
Author: Joel Johnston Date: 2026-04-06 Domain: Robotics / CV Stroke Timeline: Pre-stroke
Abstract
Autonomous target-following camera turret with PIR (passive infrared) wake-on-motion, dual-lens configuration for wide-angle acquisition and telephoto tracking, and PID servo control. Shares the CV pipeline architecture with the laser bug zapper — same gimbal, same servo driver, same PID tracking loop, different effector (camera recording instead of laser). $190 total build. Tripod-mountable. The shared primitives between this and the bug zapper are the direct application of the parametric component reuse pattern.
Hardware
Gimbal and Servos
- Servos: MG996R (2x) — same as laser bug zapper, same parametric gimbal module
- Driver: PCA9685 16-channel PWM driver over I2C — same board as bug zapper
- Range: Pan ±120 degrees, tilt +45/-90 degrees (horizontal to full down, for tracking targets on the ground)
Dual-Lens Camera System
The seeker uses two operating modes requiring different fields of view:
| Mode | Lens | FOV | Purpose |
|---|---|---|---|
| Acquisition | 6mm wide-angle | ~60 degrees | Find the target anywhere in the scene |
| Tracking | 16mm telephoto | ~22 degrees | Maintain lock with detail at distance |
Camera: Pi HQ Camera (12.3MP Sony IMX477 sensor, C/CS mount). The HQ camera was selected specifically for its interchangeable lens support. The 6mm and 16mm lenses are both C-mount, swapped manually or via motorized mount.
Automatic lens switching (software-triggered motor on the mount) is a planned upgrade — current implementation is manual lens swap or run with one lens only.
PIR Wake Sensor
HC-SR501 PIR sensor — adjustable sensitivity and holdoff time. Connected to a GPIO (general-purpose input/output) pin. Interrupt-driven: when PIR fires, the Pi wakes from low-power sleep, starts the camera, and initiates the acquisition pipeline.
Without PIR: the system would need to run the full CV pipeline continuously (high power consumption, wear on camera). With PIR: system is dark until something warm moves in front of it.
Tripod Mount
Standard 1/4-20 threaded insert captured in the base plate. The seeker mounts on any standard camera tripod. The parametric base plate also has wall-mount and ceiling-mount patterns.
CV Pipeline
Identical architecture to the laser bug zapper:
Acquisition Mode (wide-angle lens)
- PIR fires → wake from sleep → start camera pipeline
- Frame differencing with
BackgroundSubtractorMOG2 - Contour detection → largest qualifying contour = target
- Centroid tracking → PID gimbal control
- When target is centered AND stable for 500ms → switch to tracking mode
Tracking Mode (telephoto lens)
- Manual or motorized lens switch to 16mm telephoto
- Continue PID tracking with recalibrated pixel-to-angle mapping (different FOV)
- Record to file while tracking
- On target loss: hold position for 2 seconds, then return to acquisition mode (wide-angle)
Target Lock Logic
Target lock is declared when:
- Target centroid has been within 50px of frame center for 500ms
- Target contour area is stable (±20% over 500ms — indicates consistent target, not noise)
- Gimbal velocity is below threshold (settled, not still slewing)
Lock acquisition triggers recording start. Lock loss triggers a 2-second grace period (allows re-acquisition if target momentarily occluded) before returning to acquisition mode.
Full BOM
| Component | Cost |
|---|---|
| Raspberry Pi 4B (4GB) | $55 |
| Pi HQ Camera | $50 |
| 6mm C-mount lens | $20 |
| 16mm C-mount lens | $30 |
| MG996R servos (2x) | $12 |
| PCA9685 PWM driver | $8 |
| HC-SR501 PIR sensor | $3 |
| 3D-printed gimbal (PETG) | $4 |
| 1/4-20 insert + base plate hardware | $5 |
| Power supply (5V 4A) | $15 |
| Storage (32GB microSD) | $8 |
| Total | ~$190 |
Shared Primitives with Bug Zapper
The seeker tracker and the laser bug zapper share:
| Primitive | Shared |
|---|---|
| Gimbal assembly (OpenSCAD module) | Yes — same parametric module, MG996R variant |
| PCA9685 servo driver | Yes — same board, same I2C address |
| PID tracking loop | Yes — same code, different calibration constants |
| Frame differencing pipeline | Yes — same OpenCV configuration |
| Contour detection and filtering | Yes — identical |
| Centroid calculation | Yes — identical |
The only difference is downstream of the centroid: the bug zapper fires a laser, the seeker starts recording. Two completely different effectors built on identical tracking infrastructure.
This is the primitive composition pattern in action. The tracking primitive does not know or care what it is tracking for. The effector does not know or care how the target was found.