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 didn't take many pics of the process, but basically all the parts can be cut from steel plate. I used 1/2 for the base and 3/8 for the moving parts. It took a while, but I cut them all out on a CNC mill after work.
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 V2 for $30 on a whim. It sat on the shelf for a good year before I got around to trying it out. ..Well I shouldn't have waited so long, because the performance was exceptional! Seriously this thing is a marvel of engineering. It provides a 512x424 pixel depth image at a snappy 30hz, where...