Pan-Tilt-Zoom Tracking Camera
Summary
A camera that finds an object with YOLO and physically turns to keep it centered. A webcam sits on 3D printed mounts driven by a stepper motor for pan and a servo for tilt, both controlled by an Arduino, with a laptop running detection and control.
What I did
- Built the vision pipeline in Python with OpenCV and YOLO, smoothing the detected target position to avoid jitter.
- Designed the control logic: velocity control for the pan stepper and eased position control for the tilt servo, so motion stays smooth despite a discrete command stream.
- Added firmware safety interlocks: a watchdog that stops motion if commands drop out, plus hard limits on both axes.
- Implemented automatic digital zoom that keeps the subject at a constant apparent size, with a deadband so the crop doesn't breathe on a still target.
- Designed and 3D printed the mounts in Onshape, built the motor and Arduino circuit, and calibrated the axes before closing the loop.
Future steps
- Depth-based zoom using a monocular depth model, so framing follows actual distance rather than bounding box size.
- A self-contained build on a PCB with enclosed wiring and aligned mounts.
- Natural language control for picking the subject and composing the shot.
Skills
Python
OpenCV
YOLO11
Arduino C++
Onshape
3D Printing