0% found this document useful (0 votes)
218 views19 pages

Das Uber Airsoft Gun Turret

The document describes how to build an automated airsoft gun turret. It provides 26 steps to take an electronic airsoft gun, add electronics like Phidgets boards to control servos, attach the gun to a mount that can rotate and aim in different directions using the servos. The turret can then be controlled manually with an Xbox controller or set to automatic detection and firing mode using a webcam to detect human targets. The goal is to build a functioning prototype airsoft gun turret that can aim and fire automatically or be controlled like a video game.

Uploaded by

Web dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views19 pages

Das Uber Airsoft Gun Turret

The document describes how to build an automated airsoft gun turret. It provides 26 steps to take an electronic airsoft gun, add electronics like Phidgets boards to control servos, attach the gun to a mount that can rotate and aim in different directions using the servos. The turret can then be controlled manually with an Xbox controller or set to automatic detection and firing mode using a webcam to detect human targets. The goal is to build a functioning prototype airsoft gun turret that can aim and fire automatically or be controlled like a video game.

Uploaded by

Web dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Home Sign Up!

Explore Community Submit

Das Uber Airsoft Gun Turret


by Miltron_B on January 4, 2007

Table of Contents

intro: Das Uber Airsoft Gun Turret . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 1: Get an "Electronic" Airsoft BB Gun. And Slice it open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 2: Get Phidgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

step 3: Prepare your Computer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 4: Phidgets and Gun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 5: Phidgets and Gamepad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

step 6: The Mechanism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 7: The push Bearing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

step 8: Attach the Plexy Glass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 9: Cut the wood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

step 10: Gun Bed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 11: Ball Bearing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

step 12: Couple the shafts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 13: Mount the Push Bearing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 14: Sand the wood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

step 15: Cover the servos! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 16: Paint the Thing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

step 17: Leave it out to Dry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 18: Add some Stickers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

step 19: Get some Lasers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 20: Cut them up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

step 21: PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

step 22: Clean and Sand the PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

step 23: Solder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

step 24: Stuffing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

step 25: Attach the lasers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

step 26: Voila! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Customized Instructable T-shirts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
intro: Das Uber Airsoft Gun Turret
This Instructable will show you how to Design, Build and Trouble Shoot an Airsoft Gun Turret with a USB interface. The turret can be toggled between Manual Mode,
where a Human interfaces with it using an Xbox 360 Controller, or Automatic Detect and Fire Mode, where the turret springs to life and detects any human presence in its
surroundings. Firing at Humans is not advised.

A Special Thanks to Colin. For helping me with the WebCam calibration concept way back when.

Update: HACK-A-DAY Post checking out the turret. Very flattered from these guys words.

step 1: Get an "Electronic" Airsoft BB Gun. And Slice it open.


If you are in the U.S. Say just as the title says, go to any Department Store and buy one.

Look for guns that look easy to cut or to take apart.

After you've got your gun, open it up (follow this guide).

As you can see, it is very simple. If you power the motor, you fire the pistol. Before you hack it open you do this by closing the circuit by pushing a switch with your finger
as you pull the trigger. But there are many, many ways to close an electric circuit, and you can get very creative. In this project we are going to use Relays to do that.

If you are not in the U.S, this may take some doing.

I am obviously not in the U.S. but I got Lucky. A friend of mine gave me his.

'(Gracias Pinche Bronzon!! Ahi esta el Robot que te dije que iba a hacer con tu Pistola.)'

If you are in Mexico: 'jalense a los bazares o a los mercados y busquen a la gente que vende cuchillos y pistolas tipo militar. las tiendas de chucherias afuera de los
super mercados (Soriana y la Comer y demas) a veces las tienen. De ultimas, preguntenle a algun amigo que le gusten las gotchas si tiene una o sabe donde comprarla.
En Mexico es comun que vendan gotchas y Airsoft Guns en las mismas tiendas.'

step 2: Get Phidgets.


Phidgets are a bunch of awesome USB interfaces that rock out.

They always send you stickers with their order.

The Phigets we are going to use for this project are the servo controller, and the relay controller, or InterfaceKit 0/0/4.

While your phidgets get to you through the mail, it's a good idea to get your computer ready. Follow the next step to do so.

I know you can fire a relay with the two extra ports of the servo controller, but that required an additional circuit and I was to lazy to make it. But YOU can make it. Just
have something check the servo signal until it hits certain value and fire a relay from there. You can use a PIC or one of the AVR tiny uCs to do this.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 3: Prepare your Computer.
We will use an Xbox 360 gamepad to control the Turret. I think it is serves very good as interface for a pistol.

Being this the case, we need to use a Windows environment to program. And we ALL know that is a bitch.

First, get your hands on the followings SDKs. Windows SDK and Direct X 9.0c or above.

Also, you will want to get the Phidget Library of your choice. I'm going to do this in VC++ because I can get it working with the two other libraries required to make this
robot. The Direct X library, and the Intel OpenCV Library.

These are all powerful tools and are behind some very very cool things, so treat them with respect!

It's a good idea to get an IDE up and running now if you don't have one and go through some of the code examples.

All the code for this robot is done by mashing together the SimpleController example from the DirectX Xpad library, the Servo and the 0/0/4 Interface phidget code
examples, and the face recognition code example from OpenCV.

Check Linker errors if you are using the Microsoft Visual Studio Express CD that comes with the Phidgets.

Once you have all of this working properly, your Phidget order should have arrived!

step 4: Phidgets and Gun


Use the phidget relays to close the circuit between the motor and the power supply.

If for any reason you can't make your code work, and you really want to fire your BBs, go to the Phidget Manager, in the task bar next to the clock. You can fire the BB
gun from there.

If you are using an AC/DC converter to power the gun instead of batteries, make sure it can draw at lears 1.5 Amps of current, since the motor needs a bit of current to
start.

Remember to shoot when there is no one in front are anything stupid like that.

Don't fire at people.

Image Notes
1. use Aligator Clamps to access the motor, and connect it to the relays. The green clamp in this photo represents vcc, the black gnd.

step 5: Phidgets and Gamepad


Use the SimpleGamepad example to change the boolean variables in the InterfaceKit example Code.

Once that is done.

You should have Gamepad + Phidgets and Airsoft gun all working in unison. And hopefully you can do something like the attached video.

If you are done, it's time you build our two DOF mechanism to mount our turret.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 6: The Mechanism.
We are going to make a two DOF mechanism similar to this one, and this one.

I used CAD to help me, and I share it with you.

It uses two Servo Motors, two bearings, wood and plexyglass.

I eliminated one of the 'Y' motors in the end and replaced it by a Ball Bearing.

The image also shows the gun facing backwards.

step 7: The push Bearing.


The push bearing is the key to have a smooth control over the 'X' axis movement of the robot and it should be mounted on a cut round piece of Plexiglas.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 8: Attach the Plexy Glass
Attach a piece of round cut Plexiglass to the Push Bearing.

Image Notes
1. The Push Bearing mounted on the lif of the wood structure and a round cut Plexiglas.

step 9: Cut the wood


Get your hand dirty and use some tools to cut the wood. I approached a professional to do this.

If you live in Mexico: ' Aqui es donde nos desquitamos. Ya que cortar madera de una manera de tal manera de que sea util y estetica despues, se necesitan
herramientas mamonas. Y en Mexico hay muchas carpinterias pequenias donde se pueden hacer este tipo de cosas por un precio infimo! Nosotros nos pusimos a
ayudar y nos hechamos unas chelas con el carpintero en Mexico.'

After you enjoy a Beer with your Local Carpenter, proceed to assemble the wood pieces.

These can be even be pasted with White Glue. I used it, at least. Use anything you think does the work best.

Image Notes
1. Plexiglass tube, to make the Gun Bed extensions mentioned later.
2. WebCam base

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 10: Gun Bed.
Add pair of extensions to your BB Airsoft Gun.

One will be attached to a Bearing that will smooth out movement in the 'Y' Axis of the turret and the other will be attached to the Servo that will, well, create the 'Y' Axis
movement.

Using hot Glue, Add a USB Web Camera PCB to the front, and run the cable under the Gun Bedding.

Image Notes
1. Phidget 4 servo motor controller.
2. Bare bones WebCam
3. Hitec Servomotor
4. Place Ball Bearing on this side.

step 11: Ball Bearing


A nice Ball Bearing to hold our turret.

Image Notes
1. A Miracle of manufacturing.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 12: Couple the shafts
Couple the Servo Shaft with the Gen Bed arm.

step 13: Mount the Push Bearing


Now you should have a dry wood structure. Mount the Push bearing.

step 14: Sand the wood


Sand the wood, and add another Web Cam to the bottom of the structure.

Place it over some News Papers and get it ready to paint.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Image Notes
1. Remove WebCam from Base before painting.
2. A cup of weak Lemon Drink.

step 15: Cover the servos!


Be nice to your servo motors and cover then (and their shaft) with a little paint.

Image Notes
1. BB's!

step 16: Paint the Thing


Have it reflect your favourite lenghtwave of the electromagnetic spectrum with a nice liquidy plastic coating.

I went with the same colors as the Gamepad.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 17: Leave it out to Dry
At least half an hour!! More of you can.

Image Notes
1. Use Tape to clearly define the lines where the color changes.
2. Drill three holes (or more!) around the push bearing and stuff LEDs through
them to decorate your turret.

step 18: Add some Stickers


Our robot has lasers, there is no such thing as a cool robot with out lasers. So the robot must carry the appropriate warning stickers.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 19: Get some Lasers
Get some cheap Laser.

step 20: Cut them up


Cut them up with the Dremel and then short the switch, as shown in the third picture.

Warning! I don't know if this is dangerous.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Image Notes Image Notes
1. Dremel FTW 1. All this metal is the + side of the laser bias.
2. Xbox 360 Gamepad 2. this is the - side of the laser bias.

Image Notes
1. Short the push button by soldering the two leads together.

step 21: PCB


Print a PCB on a Toner Printer (a.k.a laser printer or Copy Machine).

Then, Iron the piece of paper on to a slab of copper. Then, drop it in the Acid.

Image Notes
1. Tracks printed in Toner
2. Copper

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Image Notes
1. Use diluted Ferric Chloride!

step 22: Clean and Sand the PCB


After putting the copper in the acid, keep rocking it for about 15 minutes.

Take it out carefully, sand it. and then drill it.

Image Notes Image Notes


1. Copper, fresh out of the acid. 1. After sanding

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Image Notes
1. Dremel the hell out of the PCB using a 3 mm Drill Bit

step 23: Solder


Introduce all the component leads into the holes of the PCB and solder it.

Image Notes
1. This circuit here is the one that connects the relays with the LEDs and the pistol.
Use proper Resistors for your LEDs and respect wire color coding.

step 24: Stuffing


Stuff the inside of the robot with all the components.

Image Notes Image Notes


1. Give credit where it's due! This sticker shows all the stuff this robot uses. And 1. Our custom made PCB.
makes it look cool. 2. Another shot at the Phidgets and the 'X' Axis servo.
2. Phidget Relay Control.
3. Phidget Servo Motor Controller
4. X Axis Servo motor. This will move the push bearing, along with the Plexiglas
disk in the X direction.
5. Voltage In. USB Outs.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 25: Attach the lasers
Use some thermofit and to fit the Lasers to the barrel of the pistol.

Image Notes Image Notes


1. Lasers, ready to stick on to the gun barrel. 1. Thermofit a part of the barrel so you can hot glue the lasers on to it easier.
Please Excuse the bad focus shot.

step 26: Voila!


Finished!

If you have questions about the programing, just ask me. but you can do it just by following the examples very easily.

If you want to know how to wire up the indicator LEDs or decorative LEDs, follow my other instructable. Or any other one of the trillions of guides out there.

Happy Teleshooting!

Image Notes
1. Use the fixed camera to do the face recognition and calibration. Having a fixed reference will help you orient your robot.
2. Use the movable camera and the three lasers to snoop around and aim. Predator Style.
3. Use some LEDs to indicate firing or what ever you want.
4. Decorative LEDs around the push bearing make it look nice.

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Related Instructables

Integrating How to modify a BiPed robot V-3 How to build Make your own How to make an
Servo Motors servo motor for your first Robot Autonomous radio controled autonomous
by alex.v Low Cost
with continuous Foosball Table basketball
Hobby Servo XY ($ 85) by fritsl airsoft gun by
fischertechnik rotation ( One by eski playing robot
Table by CarlS alfonso
(Robot Theme) motor walker using an iRobot
by ftking_83702 robot ) by Create as a
robomaniac base by Matthew
Oelke

Advertisements
Customized Instructable T-shirts

Comments
50 comments Add Comment view all 53 comments

Argon 27 says: Oct 3, 2008. 5:24 PM REPLY


You, my friend are a god.

lander says: Sep 17, 2008. 4:37 PM REPLY


orale eso esta genial "felicitaciones"

Miltron_B says: Sep 27, 2008. 8:04 PM REPLY


A huevo. Muchas gracias.

MrNintendo says: Aug 29, 2008. 6:39 AM REPLY


Think it would be possible to wire this up to an alarm system and fire at the intruder when the alarm is triggered?

By the way, nice intructable dude. I've been meaning to make one of these for when I go play airsoft and scare the crap out of my friends when they can't
find who's shooting them.

Miltron_B says: Aug 30, 2008. 2:57 AM REPLY


Yes you could. It's very easy.

Just hook your alarm system to the main power of the sentry gun and turn it on and off when ever the alarm triggers.

Basically, if your alarm control has a boolean output signal (maybe a 5 Volt TTL?) use this output to actuate a relay in series with the main robots power.

Good luck making yours!

MrNintendo says: Sep 2, 2008. 6:01 AM REPLY


Thanks!

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
J.E.F says: Aug 28, 2008. 5:50 AM REPLY
I'm a lil confused im just getting into electronics but i think i can make this, but my question is do u need to keep it plugged in to a computer to use or can u
just plug the xbox controller in use it alone?

Miltron_B says: Aug 28, 2008. 8:40 PM REPLY


The Phidgets, Controller and WebCams are all controlled by a running program in a tunerd-on PC where the stuff is all connected.

J.E.F says: Aug 29, 2008. 10:56 AM REPLY


ok then if i was to mount this on a paintball tank that i have in development. what kinda power needs does this have. could i run it of the motor or
could i get some big rechargable marine batterys and run it off that.

Miltron_B says: Aug 30, 2008. 10:59 PM REPLY


Both.

Pt ~= 200W.

lordofthedonuts says: Aug 25, 2008. 12:17 PM REPLY


Whoa, just as I was thinking " I should make a sentry gun and post it on Instructables..." I saw yours, great job!

Miltron_B says: Aug 28, 2008. 8:58 PM REPLY


Thanks mate. Make yours!

lordofthedonuts says: Aug 29, 2008. 3:54 PM REPLY


I'll sure do.

Lylec says: Aug 26, 2008. 12:40 AM REPLY


Miltron, I am sure I am missing it, but you mention an auto mode in the intro. but i cant find a description of the aiming process etc.
Any stats on its accuracy? In my part of the world, just being able to paint a guy up with a Laser dot will get him running

Miltron_B says: Aug 26, 2008. 9:19 PM REPLY


Hola Lylec!

The automated aiming mode is very simple. The OpenCV Library has an example on face recognition. In that Example, you will see that the program
draws a circle around the face it is detecting.

If you look at the code as how the program draws that circle, you will see it uses a point of the image (pixel) as a center to trace the circle. This point is
almost always smack in the middle of the face.

About the accuracy, it will depend on how well you calibrate your robot.

Use the FIXED WebCam to use this pixel (in x, y, coordinate system of the image) as your reference point. In order to get the position of your servos as a
function of the center point of the circle, you will need to gather at least 20 points of data across the mid-section of your screen and use a spreadsheet to
do a cuadratic o cubic regresion.

That means that you will have to experimentally (trial and error) find at least 20 points where the servos are in such position, that the gun is pointing to
where the center of the drawn circle is. And you have to find this 20 points across the mid section of the image.

I hope that answered your question, if not, ask again what ever you are stuck in.

Good luck in that part of the world of yours! Just don't be mean to your neighbors.

Saludos,

Miltron_B says: Aug 26, 2008. 9:27 PM REPLY


Here is a nice link that I'm sure will help you.

In your case, the "Shelf Space" is the center of the circle and the "Books sold" are the position of one of your servo motors.

If you want to take it further, the face recognition software also gives you a circle radius, this will be a nice indication of how far your target will be.

Lylec says: Aug 27, 2008. 12:14 AM REPLY


Thanks Miltron.
And just a useful/less factoid. I live in South Africa, and Hola is also a very common/hip greeting amongst the youth (tho mainly the black youth).
The theory is that during the cold war, Cuba send instructors to Angola to train soldiers (our erstwhile enemies) They obviously spoke spanish, so
the greeting was passed on to their students and slowly it made its way into our local slang..... So there you go, you can greet practically any SA
youth (under 35 probably) in your native tongue......

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
Miltron_B says: Aug 28, 2008. 8:49 PM REPLY
That story is friggin' awesome! I want to go to SA for the WorldCup 2010.

Miltron_B says: Aug 26, 2008. 9:27 PM REPLY


for got the link.

handyScrapper says: Aug 23, 2008. 11:44 AM REPLY


Seems like an exellent instructable however much of it is just a bit over my head. Right now i am simply experimenting with electronic components and some
simple computer programs but that intrest combined with my love of airsoft makes this instructable quite interesting in itself. I think the reason why i didnt
understand alot of it was because of all the abreviation and acronyms which am not entirely familiar with. If you have the time or fell like it maybe you could
help explain some of it to me but if not thanks for the great idea. 5 stars in my book.

Miltron_B says: Aug 23, 2008. 5:27 PM REPLY


I'm glad you liked it. And dude, this robot uses the simplest electronics ever.

The LEDs (Light Emmiting Diode) Lasers (Light Amplification by Stimulated Emission of Radiation) and the BB (Baby Bullets) Airsoft are all fired by
closing a circuit. Manually, you would do this by pushing a button, or a switch. If you want to do this "electronically" you can do it by many means that I'm
sure you will learn later, this time we are going to use Relays.

Relays are basically switches that actuate when a nearby coil is powered and so magnetized, closing the circuit.

About the other Acronyms I use, here is a quick list of what I think you may want to know:

DOF - Degrees of Freedom. Usually states the number of motor required for a certain mechanism, and in how many directions can it move (ours can just
move in X and Y)

uC - Microcontroller. A computer stored in single electronic packaging. not used in this project. AVRs and PICs are types of uc made by different people.

IDE - Integrated Development Environment. A Program that helps you avoid using notepad and the command line to program and compile. It make
things easyer (most of the time) when programing.

SDK - Software Development Kit.

PCB - Printed Circuit Board.

AC/DC - Alternate Current (The one found on a house outlet) to Direct Current (The one provided by batteries and solar panels) Converter. You use an
AC/CD converter every dy to charge your cellphone or your laptop or your PSP/DS.

Sorry about the acronyms, I should edit it later.

Miltron_B says: Aug 23, 2008. 5:56 PM REPLY


Forgot one...

CAD - Computer Assisted Design. Google's SketchUp is a Free CAD tool you can get from here.

Give it a try! You can do something like Alonso's first as a warm up if you think this one is too comlplex/expensive to make.

Good Luck!

handyScrapper says: Aug 28, 2008. 8:19 PM REPLY


Thanks so much for the help! you cleared up just about everything i was a little confused about, and even though this project may still be a little
out my league (aka price range) i can at least understand how it works for projects in the future. You did go a little overboard with the
explanations though, i mean come on, AC/DC, LED, PCB, if i dont know those then i have no business looking at this project. But seriously,
thanks again for the help and ill let u know if i have any more questions.

Miltron_B says: Aug 28, 2008. 8:48 PM REPLY


Lolz! sry.. I wanted to leave no room for doubt.

And yeah, It is damn expensive. Come to me when you start what ever when you have any trouble. Which you will.

Cheers.

theophilus says: Aug 22, 2008. 10:18 AM REPLY


I wonder if you can replace it with a paintball gun?
( that +gocart+plexiglass+plywood=paintball tank!
I'm scaring myself, cool instructable!!!!!!!!!!!

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
J.E.F says: Aug 28, 2008. 5:45 AM REPLY
thats was my first thought when seeing this. and its totally the same principle as long as you have a electronic gun.

Miltron_B says: Aug 28, 2008. 8:42 PM REPLY


I want to build a Small Robotic BB Tank. Though something you can actually ride is WAY better.

Miltron_B says: Aug 22, 2008. 5:16 PM REPLY


Yeah! You can. Just make sure your servos have enough torque to move it!

twenglish1 says: Aug 22, 2008. 11:02 PM REPLY


and you will need an electronic gun

Vittorio88 says: Aug 24, 2008. 10:54 AM REPLY


HAHAHA pinche hector nunca pense que te iba a ver aqui! Ah huevo cabron te felicito!

Miltron_B says: Aug 24, 2008. 8:14 PM REPLY


A huevo mi Vic!!! Hahaha, como fuiste a dar por estos rumbos?? hack-A-Day??

Esa madre nunca la hubiera acabado sin los breaks de fumar con ustedes y con la ayuda del pinche Jonas.

Un Abrazo muy fuerte desde aca, hermano.

Urge que nos juntemos a quemar.

mdrobbins says: Aug 24, 2008. 3:05 PM REPLY


It would be awesome if you used a container full of bb's instead of the standard magazine

devin0 says: Aug 23, 2008. 9:07 PM REPLY


Awesome tutorial, is there a way I could do this but with a basic stamp microcontroller connected to PC by serial instead of using phidgets? I already have a
basic stamp so I was wondering if there was a way use it instead.

Miltron_B says: Aug 23, 2008. 9:52 PM REPLY


Yes there is.

Use the outputs of the BASIC to fire a relay circuit. Do that for the LEDs, Lasers and Guns. The Servo's can be controlled using the PWM feaure of the
Stamp uC.

Connect the signal (white or yellow) wire of the servo to the PWM output of your stamp uC and use the standard Hobby Servo Frequencies to drive them
(Period is 2 ms).

The Visual recognition is done in C, with the OpenCV libs. Have the C code write intro a file and the Stamp code read of it. There are other ways to
integrate these two though...

aficiomaquinas says: Aug 23, 2008. 2:06 PM REPLY


Eres un pinche genio cabron!

Miltron_B says: Aug 23, 2008. 5:10 PM REPLY


Haha, gracias carnal. Me pare un hombros de gigantes.

zjharva says: Aug 21, 2008. 6:40 PM REPLY


lol! "warning! I don't know if this i dangerous!" nice instructable!

Miltron_B says: Aug 21, 2008. 8:24 PM REPLY


Hahaha, yeah. Sometimes one just has to take risks. Is it though?

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
PKM says: Aug 22, 2008. 3:24 AM REPLY
That depends on your definition of "dangerous". I think lasers are physically sensitive so if you are rough you might break the laser diodes, but it's not
overly dangerous to you, other than maybe sharp bits of casing in your eyes. Wear goggles when dremelling!

=SMART= says: Aug 22, 2008. 3:17 AM REPLY


wow great ible, that thing looks dangerous !! lol

somerockenguy says: Aug 21, 2008. 7:10 PM REPLY


you should add high powered IR leds that way the with the cameras you can see at night. also i would have put the gun upside down so i could hang it on
the over hang of my garage so i could shoot the pizza man as he gets back in to his car.

Miltron_B says: Aug 21, 2008. 7:21 PM REPLY


Hahaha, thanks dude.

You say that by just adding a sort of lamp made IR LEDs it'll create a large enough refelction for the cameras to see at night?

It might be worth trying out.

somerockenguy says: Aug 21, 2008. 8:33 PM REPLY


ya just take like 12 IR leds and wire them together. you could probaly assign a button on the controler to turn them on and off. if you do put them on
though use the high powered ir leds through the cam it will look like it does during the day except in gray tone. one thing about the high powered
ones it you can see a faint red glow but its not enough to make people know whats there. alson use resistores so you don't blow the ir leds there a
little too expencive to be replacing every week(about $2 each). i use this site for figuring out what type of resistors to use. http://led. linear1
.org/led.wiz (remove spaces)

Miltron_B says: Aug 21, 2008. 8:50 PM REPLY


I'll give it a go when I have the chance. To calculate I just use Ohm's Law with the source voltage and the rated specs of the diode, makes it
easier when you are out buying stuff.

ravebot says: Aug 21, 2008. 7:04 PM


(removed by community request)

Miltron_B says: Aug 21, 2008. 8:35 PM REPLY


Haha, thanks. I tried to make it look very flashy just because it's very dumb! You can trick it pretty easily. Post some pics of yours.

A.C.E. says: Aug 21, 2008. 7:22 PM REPLY


im going to take my jacked up ak 47 airsoft gun and mount it on a tripod then bring it to life with my lego mindstorms nxt kit. by jacked up i mean 380 round
hi-cap clip, 18 rounds per second (im guessing, probable more) an exploded stock when i meleed a tree (accident) and a hackjob exposed wiring sysem that
came with putting in an aftermarket battery with twice as much voltage and mah. 9 or 10 volts and like 5600 mah or something like that. the battery that used
to be in the stoc is now ducktaped to the side of the gun. untill it dies this instructable sounds pretty cool. vote : )

Miltron_B says: Aug 21, 2008. 8:31 PM REPLY


Post some pics when you do.

IX Smith XI says: Aug 21, 2008. 1:42 PM REPLY


You should add a video of it working dude.
Good Instructable!

Miltron_B says: Aug 21, 2008. 7:31 PM REPLY


Thanks!

Currently I'm outside the continent, far from my beloved Mexico. But I will as soon as I get back home late in the year.

view all 53 comments

http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/

You might also like