Executive Summary
The Aegis Control system is a fully autonomous, AI-driven sentry turret with drone integration. Designed and rapidly prototyped from scratch, the system integrates a custom 3D-printed chassis with real-time target tracking utilizing computer vision.
Tech Stack: Python, OpenCV, YOLOv8 (TFLite), Flask, Raspberry Pi 4, ESP32.
Documentation: View the official publication on Hackster.io
System Architecture
To maintain high-speed target acquisition while keeping manual controls responsive, the system utilizes a multi-threaded software architecture and an isolated, custom power distribution network.
1. Hardware & Fabrication
The physical chassis was engineered for high rigidity to handle rapid 35KG servo movements without structural flex or binding.
- Materials: Structural components printed in PLA utilizing a Bambu Lab X1-Carbon.
- Power Isolation: A custom multi-voltage system utilizing dedicated buck converters and MOSFET controls. This ensures the power-hungry servos do not cause voltage drops or interfere with the sensitive logic processing of the Raspberry Pi.
2. Perception-to-Action Pipeline (Python)
The core brain operates on a Raspberry Pi 4, utilizing a custom-trained YOLOv8 TFLite model to detect and track specific aerial targets. The Python backend is heavily multi-threaded to decouple video streaming, AI processing, and real-time motion control (via I2C to a PCA9685 driver). A Flask web server serves as the UI for manual override. Utilized proportional feedback control to smooth the 35KG servo actuation, translating dynamic YOLOv8 bounding boxes into precise kinematic movements.
# Core logic snippet: Multi-threaded Architecture for Non-Blocking Operations
import threading
def camera_capture_thread():
global shared_frame
while True:
frame = picam2.capture_array()
with frame_lock:
shared_frame = frame
def motion_control_loop():
global current_pan_pulse, current_tilt_pulse
while True:
with motion_thread_lock:
# Calculate positional error and apply tracking gain
pan_error = target_pan_pulse - current_pan_pulse
pan_distance = abs(pan_error)
# Apply movement logic to PCA9685 via I2C