Introduction: Raspberry Pi Motion Tracking Airsoft Turret

Learn how to build a motion tracking airsoft (or nerf gun) turret with a raspberry pi 3. The airsoft turret is autonomous so it moves and fires the gun when it detects motion. There is also an interactive mode so that you can control it manually from your keyboard. This project is small, lightweight and entirely battery operated.

Since this device fires projectiles, please use the necessary safety precautions while operating the turret.

Step 1: Materials

You will need a few materials for this project.

1 x Raspberry Pi: https://www.arrow.com/en/products/raspberrypi3/ra...

1 x Electric airsoft gun

1 x Raspberry Pi compatible webcam (We used a Logitech C210)

1 x Stepper Motor HAT: https://www.arrow.com/en/products/2348/adafruit-i...

2 x Stepper Motor NEMA 17 200 steps/rev: https://www.adafruit.com/products/324 or https://www.adafruit.com/products/324

1 x Single Relay: https://www.amazon.com/gp/product/B00VRUAHLE/ref=...

1 x Step up converter: https://www.amazon.com/gp/product/B011EBSKK0/ref=...

1 x Mobile cell phone battery: http://www.ebay.com/itm/12000mAh-Dual-USB-Portabl...

1x Female to female jumper wire kit: https://www.adafruit.com/products/826

2 x Micro usb cables

2 x 90 degree metal brackets

10 x #8 1/2" screws

16 x #8 washers 8 x M3 screws

1 x 2' by 2' 1/4" MDF sheet

Tools:

- Soldering Iron

- Solder

- Speaker wire

- Saw or jigsaw

- Drill

Step 2: Instructions

We created a step-by-step guide on how to construct the turret, load our custom code on the raspberry pi, and calibrate the turret. No coding experience is necessary, but you can modify our code to add more functionality if you want.

Step 3: Resources

Get the code and the project instructions on our github page: https://github.com/HackerHouseYT/Tracking-Turret

Download the 3d printable files on our Hackaday.io project: https://hackaday.io/project/18665-motion-tracking...

I2C setup guide: https://learn.adafruit.com/adafruits-raspberry-pi...

Adafruit stepper motor HAT: https://github.com/adafruit/Adafruit-Motor-HAT-Py...

OpenCV 3 on a Raspberry Pi 3: http://www.pyimagesearch.com/2016/04/18/install-g...

If you don't have access to a 3d printer and you would like to support us by purchasing a set of parts we made on our 3d printer: http://www.ebay.com/itm/332049674170?ssPageName=ST...