Saturday, September 22, 2012

Remote-controlled airsoft gun turret

I spent a good amount of time this spring making knives, but this summer I decided to move forward to the modern day.  As such, my free-time project for the last two months has been building a remote-controlled gun turret.

It started in July with a couple basic sketches while manning support at the Amazon Puzzlehunt.

I looked at a couple possible materials for the supports [various plastics, aluminum, and steel] and ended up going with off-brand Lexan because a) it's non-conductive and so won't interfere with my extremely hacky wiring, b) is strong yet not impossible to cut with only a Dremel and a Leatherman, c) is easy to glue strongly with solvent, and d) because it's clear, leaves the inner workings visible.  For the control circuitry, I used an Arduino Duemilanove that I had lying around, coupled with a motor shield for the movement and a shield of my own design for the relay chain necessary for the firing circuit.  To move it, I used motors from two thrift-store cordless drills.  (I had to go through four drills to find two suitable motors, but that's still far cheaper than buying the motors new.)

Both the horizontal and vertical controls make use of sprocket chains.  I considered using normal gears, but that would've required more precision (my tool selection is quite limited) and wouldn't scale well (without getting absurdly expensive).  I'd like to re-make this about five times larger for mounting in a pickup truck bed, so I wanted the design to be practical at a bigger scale.

For the gun, I used a cheap airsoft gun from the grocery store.  I needed something that was purely electrical, as making a mechanism to actuate a trigger and mounting it to a remote-controlled turret is just begging for the ATF to arrest me for making a machine-gun precursor (yes, this turret is sturdy enough to hold an actual firearm if it's properly balanced around the axle; no, I'm not going to actually do that).  The larger version will likely have a battery of model rockets, because it's impressive and takes advantage of the remote control aspect. (As an added bonus, if I add an angle sensor and a rangefinder, I could have it automatically calculate trajectories.)

The controller is an off-brand wireless Wii nunchuck.  Initially it used a wired one, but because the controls are on the part that moves, the wire was getting in the way.  It required re-writing one of the control libraries a little bit, but that wasn't a problem.  The top part of the turret is entirely self-contained, with the Arduino, motors, and power source, so I didn't need to worry about it over-rotating and catching wires or anything like that.  I'll have a wireless webcam for the larger version, but it'd be impractical on this one.

Overall, it works pretty well.  Because of some slack in the chains, and the low torque output of the motors, aiming is a bit jerky.  I considered improving the gear ratio and fixing the slack, but it'd be a lot of work for minimal gain.  Also, it's ugly as sin.  That said, in its current state, I think it's good enough to call done as a first draft.