Das Uber Airsoft Gun Turret
Das Uber Airsoft Gun Turret
Table of Contents
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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.
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.'
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!
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.
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.
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 eliminated one of the 'Y' motors in the end and replaced it by a Ball Bearing.
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.
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.
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.
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.
Image Notes
1. BB's!
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.
http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/
step 19: Get some Lasers
Get some cheap Laser.
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.
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!
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
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.
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.
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
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.
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.
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?
Pt ~= 200W.
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,
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.
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.
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.
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.
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!
And yeah, It is damn expensive. Come to me when you start what ever when you have any trouble. Which you will.
Cheers.
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.
Esa madre nunca la hubiera acabado sin los breaks de fumar con ustedes y con la ayuda del pinche Jonas.
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...
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!
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?
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.
http://www.instructables.com/id/Das_Uber_Airsoft_Gun_Turret/