Monday, May 4, 2026
View ProjectIn the robotics field, visual tracking systems are traditionally implemented using high level software running on a CPU or GPU. While software solutions are flexible, they suffer from sequential processing bottlenecks and operating system overhead, leading to non-deterministic latency.
To demonstrate the massive advantage of hardware level parallel processing, I designed and implemented a real-time, closed loop object tracking system entirely on a Diligent Nexys A7-100T FPGA. The system utilizes a custom computer vision pipeline to identify a distinct target (a tennis ball), calculate its centroid, and drive a 2-axis pan-and-tilt servo gimbal to keep the object centered in the camera's field of view.
The architecture is designed as a continuous, real-time data pipeline divided into three main clock domains: a 100 MHz board clock, a 24 MHz camera clock, and a 25 MHz VGA/DSP clock.
Tracking an object based purely on raw RGB is highly susceptible to shadows and glare. Perfect color tracking is typically done in the HSV color space; however, converting RGB to HSV in hardware requires complex division and floating-point logic. Initial attempts at HSV conversion took 3 clock cycles, causing timing mismatches that overwrote pixel data in the BRAM.
To resolve this and maintain my 1-clock-cycle constraint, I implemented a custom Luminance/Chrominance (YCbCr) color space conversion.
By calculating the distance of the red and blue channels from this base luminance, the hardware isolates the target color while actively ignoring skin tones and background reflections.
The calculated coordinates are passed to a gimbal tracker that acts as a hardware proportional controller. The absolute error distance between the object and the screen's center is calculated and bit-shifted to determine dynamic movement steps.
A major system limitation was the physical speed of the SG90 servos. While the FPGA calculates the object centroid at 25 million times per second, the physical servo requires approximately 100ms to mechanically rotate. If the PWM target updates faster than the servo can move, the system overshoots. To prevent endless mechanical oscillation, a 24-bit timer forces a 120ms wait state in the control loop.
Github Repo: https://github.com/CarlosT25-png/object-tracker-fpga-a7100t


