Alex van Poppel
Software Development Student

IoT Security System

2024/07 - 2024/05

Python
CircuitPython
OrangePi
FreeCAD
IoT electronics
Linux
Presenting

Introduction

For this IoT project, we developed a combined hardware and software system that uses AI to detect a person's head, aim a watergun at them, and fire. If the person gets too close, a secondary defense mechanism—a smoke screen—is automatically activated. The goal of the project was to integrate real-time computer vision, mechanical actuation, and embedded systems into a fun yet technically challenging security demonstration.

Technologies Used

We used an Orange Pi as the central controller, connected to a USB camera for real-time image capture. Head detection was implemented using a pre-trained AI model with OpenCV and Python. Stepper motors were used to control the rotation and tilt of the watergun, and a relay-controlled fog machine was used to generate the smoke screen.

The software stack included Python for AI and device control, along with GPIO libraries for hardware communication.

My Role & Contributions

I was responsible for all 3D modeling, including the design and printing of mounts for the watergun, camera, and motors. I also contributed to the AI and control logic—particularly the coordination between head detection and motor movement.

Our combined efforts ensured that the turret was mechanically stable and the software reliably translated visual input into accurate aiming and activation.

Project Image

Development Process

Project Image

We began by prototyping head detection using OpenCV with various pre-trained models. Once detection was sufficiently accurate, we linked it to stepper motor logic to dynamically aim the turret. In parallel, I designed and printed custom 3D components to allow smooth rotation and firing.

Finally, we integrated the smoke screen system using relays and GPIO triggers, refining the timing and safety logic through extensive testing.

Challenges & Solutions

One major challenge was synchronizing real-time detection with smooth motor movements while avoiding jitter and overshooting. We resolved this by adding cooldown timers and fine-tuning detection sensitivity.

Another issue was getting the AI to run efficiently on the Orange Pi. Due to hardware limitations, we couldn’t achieve fast onboard detection and had to compromise by simplifying model usage.

Outcome / Results

Project Image

The final system reliably detects a person, aims, and fires water within seconds. The smoke screen adds a dramatic layer of defense when someone enters a restricted proximity.

The integration of AI, electronics, and 3D design exceeded expectations, and the project was well-received for both its innovation and execution.

Reflection

This project taught me a lot about bridging physical design with software logic. Working on both the mechanical and digital components gave me a deeper appreciation for system integration, timing, and hardware limitations. I’m especially proud of how well the 3D printed structures held up in practice. With more time, I would have added PID control for smoother aiming and upgraded the camera for better resolution.