Control software for the TaubenTurret system: An automated, computer vision driven water turret system for targeted pigeon deterrence.
- Automated Targeting: Uses a Raspberry Pi Camera to detect motion, triggering an external AI object detection API to identify pigeons.
- Pan/Tilt Control: Calculates 3D physical angles from 2D pixel coordinates to smoothly aim the watergun via PWM-controlled servos.
- Web Interface: Includes a built-in FastAPI web UI for viewing the live MJPEG stream, manual firing, and browsing recorded video clips.
- Auto-Recording: Captures and saves
.mp4video events whenever motion is detected.
- 3D models and hardware list available on makerworld.
- Python 3.9+
makeanduvfor environment management.- An active external object detection backend API: taubenturret-backend
- Required Python packages:
fastapi,uvicorn,opencv-python(cv2),numpy,requests, andpicamera2.
First, create your local environment configuration file by copying the provided template:
cp .env.example .envBefore running the system, make sure your properties in the .env file are set up correctly. Important settings to verify:
- Webserver Auth:
WEBSERVER_USERNAME,WEBSERVER_PASSWORD, andWEBSERVER_PORT. - AI Endpoint:
DETECTOR_API_URLto point to your external detection API. - Hardware Tuning: Validate your
SERVO_PAN_*,SERVO_TILT_*, andWG_*constants to ensure your servos don't over-rotate and the watergun relay timings are safe. - Storage: Ensure
RECORD_DIRECTORYpoints to a valid path where the Pi can save video files.
Use the provided Makefile to quickly set up the environment and install dependencies:
make setup
make installStart the main control loop by running:
make runOnce running, you can access the dashboard by navigating to http://<raspberry-pi-ip>:<webserver-port> in your browser and logging in with your HTTP Basic Auth credentials.


