Airsoft Turret Has Turn, Tilt, And Auto-feed To Keep Those BBs Flying


Yet another project that proves you need to acquire a laser cutter. This Airsoft turret rotates, tilts, and includes a hopper for ammo.

All of the pieces were cut from acrylic. The base includes a bracket which keeps the large rotating gear level by sandwiching it between the layers. That and the tilt mechanism are pretty straight forward. The module responsible for loading the BBs is pretty neat though. It uses a gear with round teeth the same diameter as the ammo. Once a BB is picked up it is forced upward into the tubing that feeds the gun. Get the full picture from the demo video after the break.

The one thing [The Liquider] is wondering about is how to provide feedback for the tilt and rotate functions. We can’t think of an easier way than to use simple rotary encoders. The Arduino Mega he wishes to use as a driver will have no problem interfacing with reflectance sensors and the acrylic makes it simple to mount this type of black and white encoder wheel.

39 thoughts on “Airsoft Turret Has Turn, Tilt, And Auto-feed To Keep Those BBs Flying

  1. Austrian systems makes a couple of magnetic encoders.

    You spin a small magnet 1 or 2 mm above the IC and it senses the rotating magnetic field using some hall effect sensors and does processing on that to determine and output the angle in a couple of formats.
    They’re 8,10, or 12 bits of resolution (depending on chip) and they have PWM, Analog, SPI, and quadrature versions.

    here is one i picked at random. AS5132

    Or, you could always go for a potentiometer or have a low-resolution quadrature encoder using some LEDs, photodiodes, and a perminent marker.

  2. Use some digital AX-12 servos.

    Then mount on a quad and enter Mech Warfare, duh.


    Also, what hopup/barrel are you using? I’ve never been able to identify a hopup that would definitely work with those gearboxes (documentation on airsoft hardware-selling sites is pathetic).

  3. Sticking black and white “pie chart” encoders on the body of the turret limits the resolution. I played around with this and couldn’t get more than about 12 segments on a small one inch wheel when using reflective sensors. (about 30 degress).

    I prefer to use motors that already have encoders built into them, like this

    This example has the encoder wheel on the motor shaft and returns 48 counts per revolution of the motor shaft. It also has a 9.7:1 gear box so the encoder will pulse 465.6 pulses per revolution. That’s .7 degrees per step if you direct drive.

    Of course, you need to ensure you have minimal backlash (slop) in you gear drive train.

    And you need to have a microcontroller that can keep up with pulse rate.

  4. developing on what ftkalcevic said, a rotary encoder would do well to tell the rotation of the turret relative to where it was before, but if you combine it with a photo-interrupt sensor, you could find the rotation by beginning measurement from where the sensor picked up the mark on the gear.

  5. Since you already have the motors and gearing system set up. The easiest is probably to use optical encoders.
    1) Find a classic mechanical mice and remove the IR diodes from there (emitter and receiver). The receiver should be in a black box, the emitter should look like a rectangular LED with a small lens.
    2) Print a optical encoder wheel and glue it over the reduction gear..
    3) Glue the IR emitter and IR receiver so that the light emitted is reflected into the encoder wheel and reflected back into the receiver.
    4) Connect the IR diode to a transistor:
    For the components, 300ohm and a BC548 transistor should work.
    Feed the output into a analog input pin of the arduino.

    Now you just need to count the pulses in the microcontroller code. You will know exactly at what speed you are rotating and from there calculate your position (if the initial position was known). If you feel like learning a bit more, hook up a schmitt trigger to the output of the transistor (thus making the signal digital) and then connect it to a interrupt pin in the microcontroller.

    1. Forgot to say that you will probably need to shield the optical part from ambient light, since it might interfere with your readings (those compact fluorescent lamps are crazy IR emitters!)

  6. “Yet another project that proves you need to acquire a laser cutter.”

    Not so fast.

    You could use a hole drill to make a rough circle out of plastic, then turn a metal wheel with the gear tooth shape as the profile, and file a notch into it to make a gear cutter. Then bolt it to the end of a hand drill and make up a jig that you can use to press the circle to the cutter and rotate it a set number of degrees to cut the gear teeth. This can be done by printing two transparencies with angle scales and corresponding pointers etc.

    It’s perfectly possible to make this thing without a laser cutter, and it’s not even that difficult. It just takes more work.

  7. As for contro: variable capacitors. To read the position, measure the RC time constant with a known resistor. You’d basically have two metal plates that overlap and the mutual area changes with the angle.

    You can also make use of the fact that capacitors are impendance to AC. If you have two plates on a surface next to one another, and a third plate on top that moves over the two, that’s like a potentiometer that only passes AC. Put a high frequency square wave through, and you can use the signal strenght at the sliding contact to estimate how much of each bottom plate it is covering.

  8. has a number of inexpensive/simple encoders (~$40 incremental, $50 absolute).

    Anyone have a recommendation for an inexpensive airsoft gun with a gearbox that can be stripped out easily?

  9. Or we could take a page from Steve Wozniak’s playbook and do like he did on floppy disk drives. BANG BANG *calibrated inside track* BANG BANG *calibrated outside track*
    But yeah, he used stepper motors if I remember right.

    1. I’m spitballing and getting something like 1000th of a degree on a 12cm or half that on an 8cm CD… but it would be a bugger to pulse count… and a bugger to actually write your encoding pattern on it. Every time it got lost you’d have to make it seek, Encoded like a regular optical in powers of 2, only it would go to 18 or 19 bit.

    1. Some of them just indicate top dead center or x degrees before it with a pulse. Crank sensors picking up off a toothed wheel rarely have more than 30 or 40 teeth. ABS tone wheels might have 50-100 teeth or slots. Most precise automotive angle sense I’ve personally seen so far was an optical tone disk in a mitsubishi distributor that has a slot per degree, but is blanked for 10 slots for TDC.

  10. Why even sense position of the rotor? Put a seeker on it! A single thermopile infrared sensor should give you decent accuracy sensitivity, and you could rig a spin-scan fairly easily (it’s 1940’s tech) using a parabolic and a flat mirror. Use the spin-scan logic to drive the center of the seeker, mounted coaxialy to the barrel, onto the target and set it to fire as soon as it is within a threshold of center. Auto-tracking, auto targeting, and auto-firing!

Leave a 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.