Computer Vision · Completed · Feb 2026 – Mar 2026
A real-time computer vision tracking platform using YOLO, a Kalman filter, PID control, a Teensy, and motorized pan-and-tilt hardware.
- Role
- Sole designer
- Team
- Individual
- Status
- Completed
- Timeline
- Feb 2026 – Mar 2026
Problem Statement
Building a responsive electromechanical tracker requires closing the loop between perception latency and actuator bandwidth. Detection delay, network/serial latency, and mechanical lag all compound into pointing error.
Design Goals
- Sustain ~60 FPS object tracking
- Keep detection latency under 50 ms
- Keep motor command latency under 10 ms
- Support predictive tracking and manual override
- Expose live PID tuning through a dashboard
System Architecture
Pipeline:
- Camera capture → YOLOv8 detection
- Bounding-box centroid extraction
- Kalman filter prediction of target motion
- PID computation of pan/tilt setpoints
- Serial commands to Teensy 4.1 actuators
A Flask dashboard provides mode selection, live PID gains, and system monitoring.
Hardware Design
Two-axis pan/tilt mechanics on custom 3D-printed structure (black cage + red decks), driven by NEMA steppers through STEPPERONLINE CL42T closed-loop drivers and commanded from a Teensy 4.1.
Build path: motor/driver bring-up on the bench → print the mechanical stack → assemble the belt-driven tilt axis and camera payload. Homing and motion-stabilization routines keep the platform calibrated for closed-loop tracking.
V1 proved the motion stack; the final build closes the vision → Kalman → PID loop and tracks a hand in real time (see Videos).
Software Design
- Vision process runs detection and filtering
- Control process issues low-latency actuator commands
- Dashboard process exposes telemetry and live pan/tilt PID gain sliders
- Manual and automatic modes share the same command path
Engineering Decisions
- Kalman filtering to bridge detection gaps and reduce jitter
- Embedded PID on Teensy for deterministic actuator timing
- Closed-loop stepper drivers for cleaner tracking under load
- Flask dashboard for rapid experiment iteration
Testing and Validation
Validated tracking frame rate, detection latency, and command latency during live target motion (including hand tracking). Homing and stabilization routines were exercised before closed-loop runs.
Results
Achieved approximately 60 FPS object tracking with less than 50 ms detection latency and less than 10 ms motor-command latency on the Teensy actuator path.
Challenges
- Balancing model accuracy against latency
- Mechanical backlash and axis coupling
- Keeping serial command streams non-blocking
Lessons Learned
End-to-end latency budgeting matters more than peak FPS. Predictive filtering significantly improved smoothness when detections momentarily dropped.
Future Improvements
- Multi-target selection
- On-device inference optimization
- Improved mechanical stiffness and encoder feedback
Gallery



Videos
V1 turret — early mechanical / motion demo
Final build — tracking a hand in real time
Questions about this project? Email Caleb.