I've been working on this turret off and on for over 5 years. I hit a huge milestone on May 29th 2019. The turret successfully tracked and shot down a Tiny Whoop (micro drone)! The next day I set the turret up in my living room and captured some footage of it in action, which you can see above.
This is a huge project, so I broke it down into several sub-projects, which I tackled one at a time. These are:
- 2 Axis Gimbal
- Gimbal Electronics
- Lidar Tracking (Xbox Kinect V2)
- PC Application (getting everything to play nice, adding a GUI, etc)
- Nerf Blaster Mount and Auto-Loader
See below for details on each sub-project, as well as cad models, code, and the bill of materials.
2 Axis Gimbal
I decided to make the whole thing out of steel, since I'd just finished my air cannon project, and I was interested to try a new material.
I designed the whole mechanism is Solidworks ahead of time. I used 2D cut steel plates wherever possible to simplify the machining.
I cut the parts out on a TRAK CNC mill after work. The parts are very simple, so I was able to enter the tool paths manually as a series of slots and arcs, as opposed to using cam software.
Besides gritting my teeth and holding the kill switch the entire time the program was running, everything went smoothly. I used 1/2in steel plate for the base and 3/8 for the moving parts.
Each axis uses a Sherline 4" CNC rotary table as both the bearing and drive mechanism. They weren't cheap, at $375 each, but they give the turret extremely good rigidity and durability. They're also stupidly accurate for this purpose, with a full step resolution of 1/40th of 1 degree.
Everything basically fit on the first assembly, which is amazing!
I couldn't resist throwing the airsoft gun on there just to check the fit. It looks wicked! And if you try to wiggle the gun barrel, the whole thing feels like one solid object; it's that rigid. The rotary tables were a good choice.
It's at this point that I realized that I should have checked the mass of this design in CAD. Because now that it's done, it weighs a whopping 52lbs! and it doesn't even have handles. But oh well.. at least it's extremely stable. :)
I decided to pair the Sherline rotary tables with a CNC stepper controller.
I went with the BC2D20 from Peter Norberg Consulting. It supports 2 motors with adjustable current up to 2A, and it's controlled with serial commands (using a built-in USB-serial adapter). It supports limit switches, goto commands, acceleration and speed limits, and many other things useful for CNC.
I could have gone with something cheaper but with the amount of time I had invested in this project it seemed sensible to not skimp on the controller.
I followed the manual's recommendation on the power supply, and went with a Rhino 24V 4.17A from Automation Direct (they're great). I mounted these along with a few other miscellaneous components in a cheap electrical enclosure from Amazon.
Here you can see everything mounted:
The capacitor was recommended by the manual. One interesting thing is the connectors. They're 4-Pole M12's. I use them whenever I can, since they're durable, and pretty cheap for how awesome they are.
With the cabinet assembled, I connected to the stepper board and tentatively moved the turret around a little bit. One nice thing about this board, is it's not too hard to type commands into a terminal manually and get the turret to do stuff.
Curiosity satisfied, I went on to configure the limit switches and current setting. From there I was able to write a simple python script to ping of the limits and "zero" the turret.
This project sat on the shelf for a few years at this point. I experimented with several video camera based tracking systems throughout that time, but the performance was always so-so.
Then, a while back I bought an Xbox Kinect...