Autonomous Paintball Sentry Gun by sentryGun53
Contest Winner
0131111533a.jpg
Make your own, custom AUTONOMOUS SENTRY GUN!

A Microcontroller Contest Finalist and Runner Up Winner.

This instructable is out-of-date. For the most recent version of the tutorial, see the website . Cheers!

This sentry gun autonomously tracks, aims, and shoots at targets, using:
-An airsoft or paintball gun
-A webcam to find targets
-A computer to process the video feed and aim the gun
-Servo motors to physically aim the gun and squeeze the trigger
-A sturdy tripod base
-A microcontroller to interface between the computer and the servo motors
-Lots of camo paint
The end result is a paintball/airsoft spewing robot, that can turn the tides of any match.

Video if it in action here .

Want to build your own?
You're in luck! All the help and information you will need is here, and the software is free and open-source. Lots of people have already used this system in their own sentry guns, with successful results.
So go ahead, make your own, and soon your own backyard will be no-man's land, too!


P.S. take pictures during the project, and when you are finished, send me a picture, and a description of your project, and I will feature it on the Successful Projects page of my website. Thanks!
 
Remove these adsRemove these ads by Signing Up

Step 1: Parts List

100_7034.JPG
          Airsoft / paintball gun, or other 'projectile dispenser'
$30   Webcam
$25   Arduino (or equivalent)
$27   3 Servo motors (pan, tilt, trigger) $9 ea.
$10   Assorted screws, nuts and bolts
$9     Wood/metal for construction
$5     USB A to B cable
$2     Some 22 gauge solid wire
$2     Servo battery box
$110 TOTAL

Also, you will need a laptop or computer to run the sentry gun program. $250 for a cheap netbook, if you don't have anything else...
1-40 of 102Next »
fishguy355 says: May 9, 2013. 12:59 PM
how would I go about changing the servo pins? the code calls for pins 8,9,10 for pan tilt and trigger servos, but me servo shield only has pins 10,11,12,13.
daigkopaangrobot says: May 9, 2013. 6:50 AM
Hello... i am a beginner too. Im having problems with the mechanical design of .the robotic sentry im making... any advice?? Please... thanks... how can i make it more stable?
firerage808 says: Feb 27, 2013. 9:14 PM
what would be really great is if you could make an app to wirelessly control the sentry and see the camera veiw from any mobile device that you sync with
AJMansfield says: Mar 22, 2012. 2:10 PM
What would be cool is if you then got an IR camera, so it can track body heat, and then some sort of marker (UV led vest? Tracking dots?) you can use to distinguish between your own team and others.
martzsam says: Dec 27, 2012. 2:32 PM
I would think a special hat or helmet with an IR bulb on top would do just fine.
tayyab00 says: Oct 5, 2012. 4:37 AM
Hello,
I am a beginner in these things, I want to know that how u have managed to pull the trigger of the gun as soon as it sense something ? is it something to change with the mechanical design or what, How have u taken that as input to the board? I will be obliged to you for the answer

Thanks
tayyab00 says: Oct 5, 2012. 4:35 AM
hello,
I am a beginner in making these things, one thing that i want to know is how u have manged to pull the trigger automatically as soon as the target is detected ? is there any mechanical alteration that is actually doing it or what ? i will obliged if you can answer to clear me

Thanks
PJPEEJ says: Jun 13, 2012. 1:33 PM
Do the downloaded programs work on a mac? Or should i use a pc/linux computer?
sentryGun53 (author) says: Jun 13, 2012. 3:57 PM
If you use a mac or linux, you have to get the Mac or linux specific versions of Processing and the libraries. Most people use a PC and all the support and tutorials are for a PC, so that is probably your best option if you have one
ledfreak01 says: Apr 27, 2012. 6:39 PM
im geting an error running procesing
"unsatisfiedlinkerror: C:\users\owener\documents\processing\libraries\jmyron\library\jmyron.dll: cant find dependent libraries "
why is this?

lxu says: Apr 21, 2012. 8:20 AM
Nice work. Very interesting project. Thanks for sharing.
dilbert227 says: Dec 28, 2011. 3:35 PM
hi,

Is there anyway to reverse the direction of the of the servos through the code.

thanx
sentryGun53 (author) says: Dec 28, 2011. 4:07 PM
Yes. In the Processing code, near the beginning, swap the values of xMin and xMax to change the direction of the panning servo, and swap the values of yMin and yMax to change the direction of the tilt servo.
Cheers,
-Bob
dilbert227 says: Dec 28, 2011. 6:07 PM
fastest reply ever thx.
ilpug says: Nov 24, 2011. 5:19 PM
(millions of people chanting) VIDEO VIDEO VIDEO!

Seriously, amazing.
sentryGun53 (author) says: Nov 28, 2011. 2:30 PM
There is a link to my youtube videos of the sentry in the Intro section of the instructable, where it says "Video if it in action here"

link: http://www.youtube.com/sentrygun53

cheers
MistaStokes says: Nov 6, 2011. 10:04 PM
Awesome. I was also thinking about if one could modify a usb missile launcher (sold at most computer stores) to do this with an airsoft gun (paintball probably has too much kick). I can't build it because I know that it would lead to a real firearm being remote controlled, and no matter how awesome that sounds something bad would definitely happen!
MRedu says: Oct 18, 2011. 3:00 AM
This absolutely brilliant! Maybe i'll use this to get rid of the foxes in my garden! LOL j/k.

Seriously though i'm impressed :)
LTM-Pedro says: Sep 24, 2011. 6:22 AM
Hi, I'm from spain and i'll build a turret using your tutorial, but y would like to add some extras, such as a airsoft grenade launcher remotely controled, some tactical lasers and lights and other camera controled by a servo (wich is controlled by a joystick). I would want to know if i could use a joystick to control the airsft gun using your software.

Thaks and sorry for the grammar

sentryGun53 (author) says: Sep 24, 2011. 7:41 AM
Sounds cool. You can easily add on these extras to the Arduino. If you have questions on how to do that, feel free to ask.
Yes, you can control the turret using a joystick (plugged into the computer). It will require a few small code changes, put it has been done before.
good luck,
-Bob
vruiz3 says: Aug 6, 2011. 3:08 PM
i dont get it...how do you run the code.i got Hex editor
sentryGun53 (author) says: Aug 6, 2011. 6:53 PM
In Processing. See the Software section of the instructable for details.
increadibad12k says: Jul 2, 2011. 7:38 PM
Is there a way to have the computor remotely process the video feed to find targets?
sentryGun53 (author) says: Aug 6, 2011. 6:52 PM
you could use a wireless camera (usually sold as security cameras). It has also been done using remote-desktop access over an internet connection, using an application such as tightVNC: http://www.tightvnc.com/
finton says: Aug 5, 2011. 7:05 PM
With permanent dye paintballs, this would be a good tool for identifying burglars! "And now on Crimewatch: has anyone recently seen a scumbag covered in fluroescent pink dye?"
puddingsgood says: May 24, 2011. 4:43 PM
does it run on windows ce because i found a cheap small computoer thatruns cee but iam not sure
XBLmonster says: Jun 23, 2011. 11:57 AM
im in the same situation... i need a cheap laptop to run everything
sentryGun53 (author) says: Jun 23, 2011. 12:55 PM
I'm not sure about windows ce, but I know it can be done on Android and on Linux. If you want a fairly cheap computer, check out the BeagleBoard single-board computer. It doesn't come with any screen or input devices, you plug them in as needed, and that brings the cost down from a laptop or netbook.
XBLmonster says: Jun 24, 2011. 11:25 AM
BTW I'm kind of die-ing to get a sentry shield but it says you are out of stock.... and thats really the only way I can do the project since I'm new to all of this. When will you get more? And if you made that kit I bet you would get many buyers.
sentryGun53 (author) says: Jul 1, 2011. 10:01 PM
July 13th they'll be in stock. If you order one now, then I will ship it as soon as they get here.
Cheers,
-Bob
puddingsgood says: Jun 24, 2011. 7:10 AM
Ya I found a 90$ computer it is about 7 inches long and they have one in android and windows ce
XBLmonster says: Jun 23, 2011. 1:42 PM
youre saying i can do it on my android phone perhaps?
sentryGun53 (author) says: Jul 1, 2011. 10:02 PM
It has been done before. You need alternate versions of some of the libraries, and of Processing, but those are pretty easy to get and set up.
puddingsgood says: Jun 24, 2011. 7:14 AM
No it is a computer ordeals extrem but kind of it runs windows ce
eragon69 says: May 19, 2011. 5:48 PM
some what confused... you wanted the tigger to pin 6 AND the usb status to pin 6? is that correct, or should trigger be connected to 6 and usb to 5? or something else?
sentryGun53 (author) says: May 19, 2011. 6:14 PM
Sorry about that, typo - the trigger goes to 6, and the sub status to 5. Good luck with your project!
eragon69 says: May 19, 2011. 8:05 PM
Thanks for the quick reply. reading through your latest code now, the connections all seem to be different. x to pin 9, y to pin 8 ect. should i follow these instead?
sentryGun53 (author) says: May 20, 2011. 12:06 PM
That's really your choice. The new values are for compatibility with the sentry shield. Check out the schematic diagram for wiring directions.
Cian95 says: May 15, 2011. 3:38 PM
Could somebody please make a video tutorial of the wiring of this?
sentryGun53 (author) says: May 19, 2011. 6:26 PM
No video tutorial for the time being, but here's a wiring schematic, and you can buy a sentry shield if you want an easy solution.
1-40 of 102Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!