Introduction: Arduino Gum Ball Turret

The Gum Ball Turret is project I made at HKU in The Netherlands. This project was meant as an introduction to the capabilities of the Arduino and was very free in form.

I took my inspiration from the turrets you see in Portal. I wanted to replicate the essence of their functionality; Tracking moving targets while shooting at them. Due to some problems I had to change the design, but this is the final result:

The Gum Ball turret starts sweeping whenever motion is detected in front of him. While sweeping it will fire Gum Balls all over the place. I had to change my personal design since I broke my transistor :(

This is my first Instructable, so please bare with me.

Step 1: Materials

- For this project you will need some sort of construction to mount your shooting mechanism on and a base that it can swivel on. I used Lego since I had a whole lot laying around and it lets you change your design easily.

- You will also need 2 pretty powerful motors. Mine where 30 Volt motors (at 0.67 Amps) and I even would have liked more powerful ones.

- You will either need wheel to fit on your motors or to power indirectly with a belt, gears, chain, etc.

- A 180 degree servo, that can carry the weight of all of the above.

- An Arduino.

- PIR-sensor.

- An external power source for your motors.

- Breadboard and pin connector cables.

- A switch.

- Some sturdy paper and some tape.

- And ammo! I used Gum balls, if you are from the US I'd use those Nerf rival foam balls.

(Optional) A casing for all your electronics.

(Optional) you can look up how to make a NPN transistor switch circuit to make the turret shoot automatically.

Step 2: The Build

This is open to interpretation. If you are using Lego as well, you can look at my design and tweak it to your liking. You will probably have different wheels and motors though, so your ideal mounting potions might be different.

In my case I'm driving two big wheels with two smaller wheels. The paper is rolled into a tube and used as a loading ramp for the ammo.

As for the servo, I built up around it and ended with flat tiles so that the top part had a smooth surface to sit on. I also made the rough shape of the servo handle in the bottom of the firing mechanism's plate. This hooks in perfectly and keeps it pretty secure.

Step 3: Electronics and Code

I put all my electronics in a box and made it the base of my turret. I poked holes for all the cables I had to route to different places. The schematic is pretty simple:

    • A 5V and GND from the Arduino to two different rails on the breadboard.
    • The servo's and the PIR-sensor's power and GND hook into these respectively.
    • The middle pin on the PIR-sensor is connected to digital pin 2.
    • The yellow wire on the servo is connected to digital pin 10.
    • The power from the adapter is hooked up to the motors thru a switch of your choosing.
    • The motors are connected in parallel. Red to black and black to red, since the motors have to be spinning in different directions. Check this before you connect anything permanently!

    And here is the code as well.

    Step 4: Have Fun!

    That is my simple turret. I hope this guide wasn't too bad. There are just a lot of variables that are specific to the individual when it comes to making something like this. Use whatever you have laying around, as long as it works for you!