loading

Alarm airsoft gun...thing

I want to make an alarm out of an air soft gun and a web cam. I know how to make it so the web cam will go off if something passes it, but I can't thing of a way to make a servo pull the trigger on the gun, without having me around to press a button on an FM receiver i would just like it to happen all by it's self. The gun is electric by the way.

trialex10 years ago
A servo needs a well defined pulse sent to it to move. You need to send a pulse every 20 ms, the length of the pulse determines the position of the servo.

Controlling a servo via a microcontroller is fairly trivial, you could get the webcam monitoring software to output a 'fire' command to a microcontroller (or a dedicated servo controller like the Pololu range) on a serial port which would then send the appropriate signal to the servo.

There are quite a few similar projects out there - this one is the most awesome. It doesn't just react to motion, it tracks the object, and can pan/tilt to hit it. Check out the videos of the tests - they are awesome.

Also check out the defcon 15 competition, they even provide you with a reference design

Airsoft Guns10 years ago
Could you imagine someone braking into your house and seeing a airsoft gun pointing right at them? I would love to setup something like that. If you are in search for more information on airsoft guns, i found this one, www.theairsoftgun.net
CowGuy (author) 10 years ago
Thanks I also found A site that should help A LOT! http://www.usmechatronics.com/old_page/turret.htm
Maybe you could take a speaker wire, and use the + and - from in that to power the motor. That way, when the alarm sounds, electricity goes out to the servo. You may need to use a capacitor, though.