Automated Paintball Sentry

[youtube=http://www.youtube.com/watch?v=7vYKwih8Izk]

Reader, [Ben Godding], sends in the video for his senior design team’s automated paintball sentry. The frame is made of plasma cut aluminum. The paintball gun uses a custom hopper mounted remotely from the gun body. It has two webcams offering a 160 degree field of vision, and the image processing is done by a dual core pentium CPU booting windows xp off a compact flash card. The computer interfaces with the 1/4scale RC servos using a PIC24. The paintball sentry can either be configured via a computer GUI when a monitor is available or a baclkit keypad and 4×20 charachter display in the field.

Related: [Jared Bouck]’s paintball gun turret

32 thoughts on “Automated Paintball Sentry

  1. Hello, I did the image processing for this project so I can answer questions on that. It leads targets by taking the last few positions, and then figuring out an average velocity, and then using the camera’s lag, predicts where the target is going to be.

    It does not compensate for distance, although a laser range finder was thought of in preliminary planning. It is calibrated at a distance of about 25 feet, so in front of and behind that line it will be a little off.

    And yes, once it starts shooting it gets inaccurate due to camera shake. If we would have had more time this could have been fixed with a better camera mount system or some software tweaks like discounting frames if the change was too great, etc.

  2. You are semi correct about the accuracy. We ran into issues with camera jitter and targets on the verge of the size threshold dropping below the minimum threshold size for a frame or two. This then throws of the leading calculations. More logic in the code definitely would of helped this but there never seems to be enough time at the end of the final semester. In a controlled environment (low threshold size) where there is just tracking and no firing then the software is right on.

    As for the question about distance compensation we looked into it but low on time and target distance being limited by the threshold size it fell to the wayside.

  3. It will try and do its best to predict velocity based off the previous frames, so if you ran across, then slowed down, it would lead too far ahead for a frame or two, then come back and start shooting closer to you.

    Also, using the method that we did calling it a “motion” detector is actually not 100% correct. What it does is compare each new frame to a continuously updating “key frame”. If there is a difference in these two frames, it identifies it and calls the center of it the object. Then it tracks the object and outputs coordinates based on the prediction algorithm to Ben’s PIC24. So even if you run across and stop, or hold a mirror, you are always going to be different than the key frame (well, assuming you didn’t stand there for 15 seconds and get integrated into the key frame).

  4. Wow why does all these use really crappy cameras?

    Get a framegrabber board in there and some decent cameras mounted on shock mounts. you get zero camera lag by eliminating the crap quality cameras. isolation could have easily been added to the cameras to eliminate shake. Also you did not need to have the camera on the gun, put it with a wide angle lens and track from there. far easier and eliminates a ton of problems.

    Also why cameras? why not a other sensor systems that are faster and far easier to put in place? I made a “sentry” back in 1992 for my undergrad project that only used a 6809 and a spinning Ultrasonic rangefinder on a stepper sweeping a 110 deg window. I was able to get 0.5 deg resolution and 20 sweeps per second, it had a range of about 50 feet due to beam spread, we fixed that with using a slot on the receiving sensor.. it fired foam earplugs and used Co2.

    The target leading was simple based on input values and simply converting the complex math to integer math., my cohort had started to add a wind vane and cups to get input for windage and direction to compensate. Our only problem was it would not see you very quick if you rushed it straight without moving your arms and did not weave at all, a fault of our ultrasonic system.

    Today I would use a form of laser radar, far easier to put in place 100 times more accurate than any video based system.

    P,S.: you guys have it really easy with pic’s today. We had to grab a 68hc11 and build our processor and IO boards.

  5. “fartface” I am not sure if you understand how the sentry actuallly works. The phone on the feeder tube is just for video of it shooting, the actual cameras that do the image processing are very nice Phillips SPC9600 cameras. We went with video because it is a hot topic right now and it allows for future expansion for team detection. We ran out of time and the camera mount was admittedly poor, and we were more focused on getting the turret tracking well rather than PR. I will let Ben defend himself when it comes to the pic24, but it is not like it is plug and play, and he spent a lot of time on the PCB Express board, not to mention all the time we spent on physical construction and PC issues. But you are probably right, it was better when you had to walk up hill to and from school.

  6. I’ve seen so many paintball sentries on hackaday that I’m almost sick of them. Almost. Yours is by far the best home-made one, and is better than many of the commercial ones I’ve seen. Good job!

  7. Actually the stripped down version of Windows XP we made offered a lot of perks, including camera driver support, program compatibility, and familiar interface for users.

  8. @anonymous
    @leetmo

    obviously you two have never been out of your respective basement.

    newsflash: windows is used as an embedded operation system from cash registers to industrial controllers

  9. I for one think this is awesome.
    Easily one of the most refined sentry gun designs featured on hackaday thus far.

    now it needs to me mounted on a mobile platform.

    heheh

    nothing wrong with running a proven, stable os.

    this is hacking, kiddies. -run what ya brung or go sit on your hat.

    these guys are _doing_stuff_

  10. I’m new in town, pardner, but is it possible that nobody is going to consider what will happen when someone without protective gear walks by this thing?

    Massive lawsuit isn’t a great way to embark on a career.

  11. @strider
    We were hoping that people would be smart enough to treat this like what it is, a weapon. (A hopefully non-lethal one) However my father after watching us run in front of this thing and get shot repeatedly just starts walking out in front of the friggin thing with no protection. everyone was all “What the hell are you doing!?!?!” and just says “Why would it shoot me?” and he was serious.

    But yeah definitely best to only use this in a controlled area or with someone constantly manning the kill switch.

  12. Awesome job guys. It sounds like if you had a little more time you could have tweaked this down to much better resolution with just a few mods. Very impressive nonetheless. To respond to Mr. Fart’s query above: most non visual sensors are not passive and can therefore be easily detected. By necessity a sentry weapon system needs to, at times, remain stealthy. Blasting ultrasonic into the surrounding environment would be a dead giveaway :) .. and frankly, not nearly as cool.

  13. Paintball guns are not completely accurate, esp. the low-end ones shown in the video. You have to lead your target a little bit although at that range not much.

    We are also building one of these lol

  14. Hey Johnny. The image processing code was custom C# written in Visual Studio and the microprocessor code was C written in PIC C. I wrote the image processing and will not post the whole code, but if you have specific questions I would be more than happy to help! http://code.google.com/p/aforge/ is a good place to get started with understanding different image filters and motion capture.

    Thanks again for all of the positive comments everyone!

  15. Hi Jake, Ben

    Would you be interested in working with us at Weaponsgrade Kavelaars?

    We are building an open source C# sentry gun software platform based on the same aforge motion algorithms, that can be used for just about build.

    We’re currently trying to implement a “Leading Target” feature, so any tips you have would be really useful.

    I also really like the dual webcam for field of view. It’s a good solution to a great short comings of webcams vs servo potential.

    I’d love to hear what you think,
    this is our forum: http://members.upc.nl/a.kutsenko/feedback.htm

    -Mosquito.

Leave a Reply to Ben GoddingCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.