Introduction: Monkey Hunter - Blow Guns, 3D Printing and Programming, Oh My!
There's a hunter in the woods with a blow gun, taking aim at a monkey hanging from a branch in a tree. The monkey spots the hunter and releases the branch right as the hunter's dart leaves his gun. Does the hunter hit the monkey? Find out in this instructable.
My name is John Allwine. I'm the STEAMlab Coordinator at the Children's Museum of Bozeman. At the STEAMlab our goal is to inspire more kids to get into technical fields at a younger age. We hold classes around programming, 3D printing, Arduino and more. This is the STEAMlab's first of many instructables that show the kinds of things we do at the Children's Museum. If you like it, we would really appreciate your vote in the 3D printing contest. An extra 3D printer would allow us to host bigger classes and to 3D print more cool stuff for the kids!
Alright, now on with the show. When I was in 6th grade, I was introduced to programming by a volunteer retired engineer. He taught us math and physics and was great at putting together live demos and little scripts that simulated reality. One such demo, commonly known as the Monkey and the Hunter, inspired me to start programming. He constructed a blow gun, rigged up an electromagnet to hold up a target which would fall when the blow gun was fired and implemented a basic simulation in QBasic to demonstrate how the math works. After that I was hooked on coding and have been doing it ever since. This instructable recreates the Monkey and the Hunter demo with some modern twists that involve 3D printing and intro programming environments such as OpenSCAD, processing and Scratch. I hope that it helps inspire others to start programming!
Step 1: Materials and Tools
Some of these materials you may have laying around, but I've listed options for where you can get them if you don't. This is by no means an exact list that must be followed. Alternatives should be straight forward enough to find. Sometimes I couldn't find a decent link online so I listed a bulk item when you really only need 1 or 2. In this case don't buy it! I really just wanted to give good reference for when you go to the store or when you're digging around in the garage.
1) 1/2" EMT conduit, or 1/2" PVC
Anywhere between 4 and 10 feet. This will be the barrel of our blow gun. I recommend the EMT conduit as it won't bend like PVC does at longer lengths, but either will work. A longer barrel means you can shoot it further.
$2.30 - 10ft of 1/2" EMT at Home Depot
$2.03 - 10ft of 1/2" PVC at Home Depot
2) Scrap Lumber
We'll need a couple boards to mount our blow gun and target, both about 1.5-2 feet long. I used 2x4s from old pallets, and some 1x4 that a friend had lying around, but just about any board more than 2 inches wide and 3/4 inch thick (actual dimensions, not what the board is listed as) should do. If you do a little research, you'll likely be able to find a local place that gives away pallets for free. Otherwise, your basic 2x4 or 1x4 will work:
$2.89 - 8ft 2x4 at Home Depot
$1.98 - 8ft 1x4 at Home Depot
3) 4 x Furring Strips
We'll make a basic structure to mount our target using furring strips. I used 4. A friend of mine had these lying around, but you can get them cheap at your local hardware store:
$1.52 Each - 8ft Furring Strip at Home Depot
4) Paint Can Lid
This will be the target (the monkey) that we'll be shooting at. A 1 gallon paint can lid works great. It provides about a 5" diameter target and is magnetic so it will work with our electromagnet. Other options will work, so you're encouraged to get creative. If you really want to get your demo dialed in, try to get it to work with a juice concentrate lid! Hopefully, you have an old paint can laying around, otherwise you can get an empty can from the hardware store:
$4.98 - 1 gallon paint can at Lowes
This will be the core of our electromagnet, which will hold up our target. I used a 20D 4" galvanized nail. I had a 1lb box from Home Depot lying around, but you'll only need a single nail!
6) Magnet/Wrapping Wire
We'll wrap the nail with this wire to make an electromagnet. It's important that the wire is insulated and is rather small to increase the resistance. I used 50 feet of 30-gauge wire from RadioShack (yes, our Bozeman store is still open!). Online it seems like ebay is the best place to get it:
~$4.00 for 200ft - 30AWG Magnet Wire on Ebay
7) 20/2 Bell Wire
We'll use this to wire everything up. It's stiff enough to make a simple switch at the end of our blow gun, but easy to work with. I'm sure there are plenty of alternatives, but this worked well for me. I got a 65' roll of it from Home Depot:
$7.77 - 20/2 Bell Wire at Home Depot
A tripod is great for aiming our blow gun. You're welcome to aim by hand every time, but having a tripod to mount and aim the gun makes it much easier and consistent! You can get quite expensive with tripods, but this seems like a reasonable one to get:
$19.95 - 60" Tripod on Amazon
9) Wood screws
1" - 1 1/2" should do the trick. If you go with a 1x4 board to mount your blow gun, you may need a few of them to be around 1/2"-3/4". You'll need 4 screws for attaching the legs of the target's structure, another 4 to attach chains or string to keep them from opening too far, and 4 more to mount the blow gun.
$8.32 - Wood screw assortment on Amazon
10) 1/4" x 20 TPI x 1/2" long machine screws
At the STEAMlab we have a bunch of short 1/4" 20 TPI machine screws laying around as they're used in the assembly of the metal cabinets we have. It just so happens that this is the same thread size as a standard camera mount on tripods. We'll need at least 2, one for the mounting the blow gun and one (or more) to give a little weight to our projectile (a different screw could be used for weighting, but this is the size I'll be demonstrating with and have provided a 3D model for).
11) 3D printing filament
There are many places to get 3D printing filament. All the prints you see in this instructable were printed with filament from suppliesoutlet.com:
12) Electrical tape
We'll use electrical tape to splice wires together, but you could use solder or wire connectors instead.
13) Aluminum foil
I'm sure you have some of this lying around. We'll use it as a cheap switch to trigger the monkey's fall. I don't anyone who buys aluminum foil online, but I googled it and clicked the cheapest link I saw:
$1.99 - 30 sq ft of aluminum foil
14) DC Adapter
The DC Adapter you choose should be based on the resistance of the electromagnet you make. You need to make sure that the amount of current that your electromagnet generates can be sustained by your adapter. The amount of current it draws will depend on the resistance of the electromagnet and the voltage of the adapter. To be on the safe side I bought an adapter that could handle 2500mA when set to 3,5,6, or 7.5 volts or 2000mA when set to 9 or 12 volts. You may have an old DC adapter laying around from some old piece of electronics equipment, but make sure it can handle the load before using it. In a later step, I'll explain how to do the necessary calculations to figure out exactly how much current your adapter needs to able to handle. This one looks pretty comparable to the one I have (except it comes with a 5V usb adapter, too, sweet!):
15) DC Barrel Jack
You'll either need to buy a DC barrel jack that fits the DC adapter you'll be using or just cut the wires on your adapter and hook them up directly. I went with using a barrel jack. You'll need to make sure the one you get fits your DC adapter. If you go with a universal or multipurpose adapter it will come with a number of different connectors, so it'll likely fit whatever jack you get. I got mine from RadioShack, but here's one you can get from SparkFun:
$1.25 - DC Barrel Jack from SparkFun
16) Small chain or string
My friend had this sweet chain to keep the furring strips from opening more than a certain distance. String would work just as well, or if you're gutsy don't use anything at all! I don't even know where to get it. Here's some chain you can get, but if you're buying it specifically for this, just go with some string you have lying around:
$1.15/ft - Chain at Home Depot
17) 1/2" EMT conduit straps or 1/2" PVC straps
We'll use standard EMT conduit straps or PVC straps to mount our blow gun to our tripod. I ended up using 3/4" EMT conduit straps when mounting the PVC version (as 1/2" EMT conduit straps were too small), but needed to pad the pipe a bit using electrical tape as 3/4" was too big. I should have just used a 1/2" PVC strap (or just 3D printed one myself!).
Pretty common besides the 3D printer, but hey, this is a 3D printing contest!
What project doesn't need a hammer? We'll use this to hammer in our electromagnet.
We need to be really careful about what DC adapter will be suitable for our circuit. We'll use the multimeter to measure the resistance of our circuit, which we'll use to calculate how much amperage our DC adapter needs to be able to handle.
We'll be drilling holes and screwing in screws.
We'll need a 1/2" drill bit and a 3/4" countersink or wood boring bit, along with a standard phillips bit. A friend supplied these and I don't have pictures of them, but here are some Home Depot links for reference:
The hacksaw is for cutting your EMT conduit. I bought one at the store as I couldn't fit the the conduit in my car without cutting it. We'll also be cutting wood, so a wood saw could be handy, but I just used a hacksaw.
6) Wire Stripper
We'll be wiring up a circuit, so we'll be cutting and stripping wires.
7) 3D Printer
We'll be 3D printing a number of different components.
Step 2: Blow Gun - Projectile
I was surprised by how difficult it was to find a projectile that would fly in a ballistic trajectory and fit well through a 1/2" pipe (PVC and EMT conduit are actually closer to 5/8"). I turned to 3D printing for the solution!
For the projectile I 3D printed a 15mm-diameter threaded spacer, into which a standard 1/4" 20 TPI screw could fit. For the physics to work, the projectile must follow a ballistic trajectory, that is it must be dense enough to not be affected too much by air resistance. My first attempts used an entirely 3D printed projectile, but it came out too light and the trajectory was very inconsistent. Adding the screw gave it the right amount of extra weight and works great!
The spacer was generated using software that I wrote called stl_cmd. stl_cmd is a suite of command line tools that can manipulate and inspect STL files. stl_threads is the command used to generate the spacer that is attached to this page. It was inspired by Dan Kirshner's OpenSCAD implementation of the ISO metric screw thread specification. Rather than perform the many, many, slow CSG operations in OpenSCAD though, stl_threads directly generates the triangles for the given thread dimensions and does it just about instantly (rather than in minutes or hours). I put together a little web service that can run stl_threads in the cloud so you don't need it locally. To generate the attached STL file you can point your browser to:
The parameters at the end of the URL can be changed to adjust the dimensions and features of the spacer as follows:
- f - A flag that specifies whether to generate a female thread rather than a male thread. If you want the male version just take out the f parameter entirely.
- D - The major diameter of the thread in millimeters. 1/4" is 6.35mm and I found that adding 10% (so the 6.95 in the URL above) accounted for any expansion and layer artifacts incurred by the 3D printer. You can adjust accordingly.
- P - The pitch of the thread (the height of a single cycle of the thread) in millimeters. This value might need to be tweaked to get the desired fit. American thread dimensions are often in threads per inch (TPI). To go from TPI to a pitch in millimeters divide the TPI value into 25.4. Here's an example:
- Our 1/4" bolt has 20 TPI.
- To get a pitch you divide 25.4 by 20: 25.4/20 = 1.27mm (the value in the URL above)
If you want to use a different screw to weight your projectile, change the diameter (D) and pitch (P) parameters above and generate a different spacer!
For the experienced coders out there you're welcome to check out the git repo for the stl_cmd heroku app here. As of writing this instructable, stl_threads is the only command exposed in the webapp, but I'd like to add more soon.
Step 3: Blow Gun - Barrel
We'll be mounting our blow gun to one of the boards we picked out in our materials step (either a 1x4 or 2x4). First, cut it to length, anywhere between 1-2 feet should work fine. Drill a 1/2" hole through the center of it, then countersink with a 3/4" bit about a 1/4" deep. Put double stick tape along side both sides of the non-countersunk hole and leave it for now.
We'll be 3D printing another spacer using the stl_threads webservice (or just use the one that's attached!). If you went with a 1x4, use the barrel_mount_spacer12.stl, or if you're using a 2x4, use the barrel_mount_spacer25.stl. They were each generated using the following links:
- 1x4 - http://stl-cmd.herokuapp.com/stl_threads?f=1&D=6.95&P=1.27&h=12&o=12&filename=barrel_mount_spacer12
- 2x4 - http://stl-cmd.herokuapp.com/stl_threads?f=1&D=6.95&P=1.27&h=25.4&o=12&filename=barrel_mount_spacer25
The settings on the spacers can be adjusted as necessary to work with your 3D printer/chosen board. See the projectile step to see what each of the parameters control.
The spacer should screw directly onto your tripod mount. Screw it all the way on. Peel the cover off the double stick tape and place your tripod mount through the hole, pushing it firmly onto the tape. Turn the board over and you should see the spacer should be just about flush with the countersunk portion of the hole. Place a 1/4" washer over the spacer and screw in a 1/4" machine screw until it is snug. Your board can now be mounted to your tripod!
Next, use your EMT conduit or PVC straps to mount the barrel to the board. I used larger EMT conduit straps to mount my PVC version, so I used electrical tape to beef it up a bit. If you got the right straps, you won't need the tape.
The last step to prepare your blow gun is to cut about a 5 foot length of your 20/2 Bell Wire, strip the ends, and tape them so they're poking straight out of the gun. We'll be connecting these leads in a later step using aluminum foil to function as a switch for our electromagnet.
Step 4: Blow Gun - 3D Printed Accessories
For the blow gun, we need a mouth piece and sights. I designed each piece using OpenSCAD, a simple programming environment that allows you to generate 3D models using code. The great part about OpenSCAD is your parts are inherently parametrically modeled. Parametric modeling is a term used to describe a method of creating 3D designs based on customizable parameters such as length, width, diameter, etc. Once designed, simply changing any of those parameters will yield a different 3D model. This is great for designing accessories for objects that may come in different sizes. Our blow gun, for example, could be made with a different diameter tube, in which case we'd want to adjust the size of our mouth piece or the clips that attach the sights to the barrel. The attached OpenSCAD scripts allow you to change different parameters for the mouth piece and sights if need be. If you're strictly following along, you can simply use the attached STL files.
If you need to change the parameters, just open up the scripts, adjust the corresponding variable (they are all commented, but let me know if you have questions), and press F6. Then you can go to File - Export - Export as STL... Choose a filename and location and you're good to go.
I printed these all on our MakerBot Replicator 2 using MakerBot Desktop to slice them. I used their Low setting, which uses 10% infill and .3mm layer height. You'll need to print 3 of the sight (strictly speaking you could probably get away with 2, but I found 3 made it easier to dial in) and 1 mouth piece. The mouth piece is designed to slide on and off the barrel, so you can print many of them if you'll be having many people shoot it and want to avoid sharing germs! I put one sight as close to the tip of the barrel as possible without touching the wires, another about half way up the barrel and another half way between those two. The mouth piece should just slide onto the end. I attached two different models for the mouth piece, one for the PVC barrel, the other for the EMT conduit. I found the sight worked fine on either PVC or EMT, but if you first use it on the PVC, it'll be a little too stretched out to work well on the EMT.
Step 5: Target - Electromagnet
We'll be using an electromagnet to hold up our monkey and to release it at the right time. An electromagnet is made from coils of insulated wire wrapped around a metal core. As current runs through the wire, the metal core is magnetized. We'll be using 30-gauge (or smaller) wrapping wire or magnet wire to create ours. I forgot to take pictures while wrapping with my 30-gauge wire, so the pictures show me doing it with 22-gauge wire. Don't do it with 22-gauge wire, as it'll be hard to get enough resistance to work with a reasonably priced DC adapter. The process is the same, but you'll be wrapping more times with the smaller 30-gauge.
Leave a couple feet of wire at the start so we have some room to wire up the electromagnet later. Begin wrapping from the head of the nail and continue to wrap down until there's about 1/2-3/4" left at the bottom. At this point continue to wrap the same direction, but wrap back up the nail. With 30-gauge wire, you'll have to wrap quite a few more times! In the later pictures you can see my final electromagnet using 30-gauge wire. I started wrapping all nice and neat, but ended up winding it much messier at the end. Just make sure you wind the same direction the whole time. You'll want to wrap at least 50 ft or so. I just used the whole 50ft spool that I bought. The more length the more resistance the electromagnet has. The more resistance the cheaper DC adapter we can get away with using (or the more powerful we can make the magnet). I'll go over how to determine what DC adapter we need in a later step when we wire everything up.
The next thing to do is nail our electromagnet into another board (again, something around a 1x4 or 2x4 about 1-2 feet in length). Nail your electromagnet into the center. Cut another 20 feet or so (or as long as you want to be able to shoot your gun from) of your 20/2 Bell Wire, strip the ends and connect them to your electromagnet's ends. Tape up the ends (or for a stronger connection, solder them) and then tape them all to the board.
Step 6: Target - Structure
To give our target some height, we'll add the 8ft furring strips as legs. First, drill some pilot holes so we don't split the furring strips or the board holding our electromagnet. Compare your drill bit to the screws that you'll be using to make sure its the right size. About half way down each of the furring strips, drill another pilot hole and put an extra screw in to attach a chain or string to keep the legs from spreading too far out. Stand it up and you have the tree branch your monkey will be hanging from!
Step 7: Target - Monkey
This step is a requirement. You must find a picture of a monkey, print it out, and tape it to your paint can lid. I used this free monkey image.
Step 8: Calculating DC Adapter Requirements
Before we get to wiring it up, we need to go over some basic electronics. Electromagnets can draw a lot of current (amperage), which can cause major problems (overheating which can lead to fire) if we aren't properly prepared. DC adapters are rated to work at or below a certain amperage value. If you look at the label on an DC adapter somewhere you'll see something like "Output: #V $$$mA", where the # and $$$ are replaced with actual values. The $$$ is the maximum amperage the adapter is rated for. If our circuit draws anything less than that value we're ok. The # is the voltage, which we'll use in an equation below to figure out if our DC adapter is rated at a high enough amperage.
One of the most basic laws in electricity is Ohm's Law, which boils down to the equation, V = I x R, where V = voltage, I = amperage and R = resistance. We'll use this equation to figure out whether a given DC adapter will work for our case. The first step is to figure out the resistance in our circuit. We'll do that by measuring it with a multimeter. Set your multimeter to Ω, the symbol for ohms, a unit of resistance. Connect the leads of the multimeter to the wires of your electromagnet. The number that it reads is the resistance, R, that goes into the equation above. Using that value, we can now plug in the voltage listed on the DC adapter and see if the amperage required by the circuit exceeds the maximum amperage rating of the adapter. If it does, we can't use that adapter. The adapter I chose has a number of different ratings. It can be set to 3, 4, 6, 7.5, 9 or 12 volts and is rated at 2500mA at 7.5 volts and below and 2000mA at 9 volts and above. So let's plug in some numbers.
At 3V and 4.8Ω, the amperage comes to 3V/4.8Ω = .625A. An amp (A) is 1000mA. Most DC adapters will list the amperage rating in mA, but the unit V/Ω is equal to an A so we need to multiply by 1000 to know the value in mA. In this case 625mA is what our circuit would draw. We'll be completely ok using the lowest setting on my adapter as we're rated at 2500mA and only drawing 625mA.
At 12V and 4.8Ω, the amperage comes to 12V/4.8Ω = 2.5A = 2500mA. In this case, my DC adapter would overheat or possibly even catch fire, as at 12V it is rated to handle only 2000mA.
One more example. At 9V and 4.8Ω, the amperage comes to 9V/4.8Ω = 1875mA. In this case, my adapter could handle it as it's rated at 2000mA when set to 9V. The other thing to consider, though, is the amount of heat that gets dissipated by the electromagnet. I'm not sure how to calculate that, but just by testing I noticed that at 1875mA, the electromagnet started to get really hot, so I tried lower values. I found that at 3V the strength of my electromagnet was fine to hold up the paint can lid and the electromagnet never really got above warm to the touch after long periods of time, so that's what I went with. I leave it up to you to decide what DC adapter/settings to use, but be SAFE!
Step 9: Wiring It Up
Now that you have each of the components, we need to wire up the completed circuit. It's a really simple circuit. It just forms a loop that closes once we attach a small piece of aluminum foil between the exposed wires at the end of the blow gun. Plug in your DC adapter and your electromagnet should be powered up. Hold the monkey (paint can lid) up to the nail and it should hang there. When your projectile passes through the end of the blow gun, the piece of foil will easily slide off the wires, breaking the circuit. Power to the electromagnet will cease, and the monkey will drop. If you're aimed correctly, it won't matter how hard you blow into the gun, you will always hit the monkey. To reset after you shoot, you must reattach the wires with foil and put the monkey back on it's branch.
Step 10: Simulating It on the Computer
The hunter always hits the monkey because the projectile and the monkey are both undergoing the same effects of gravity. Think about how the situation would resolve if there were no gravity at all. The monkey would let go of its branch and would just stay were he was. The hunter was aimed right at the monkey, so the bullet, regardless of how hard it was blown would eventually make it to the monkey. Now turn on gravity. The monkey and the projectile would both accelerate downward by the same amount in any given amount of time. So again, it doesn't matter how hard you blow into the barrel (as long as it's hard enough to hit the monkey before it hits the ground), the projectile will always hit the monkey.
It's a little easier to see this work on the computer. I put together this video, which is a recording of a simulation I wrote in Processing, a graphical focused programming environment, to show what's going on. I've attached the code as well if you want to play around with it (please do!).
I also put the simulation together in Scratch, a drag and drop programming environment made by the MIT Media Lab. In the Scratch version, you can drag sliders to change the gravity and velocity of the projectile to see how they affect the simulation. Check it out here.
Step 11: Troubleshooting
If you're missing the target, there are a few things to consider.
- Are you sighted in? I've found that putting the sights dead center on the target works, but your sights may be aligned differently. Get someone to help you spot where your shot is going and adjust where you are aiming.
- When you blow into the gun it's easy to bump it, throwing off your aim. Be careful not to move the gun at all when you shoot it.
- If your gun is too long, or too heavy it can be easier to throw off your aim when you shoot. Shortening your barrel, switching to PVC over the EMT conduit and using a smaller board than a 2x4 are all options to help keep the gun more stable.
Step 12: Thank You!
I hope you enjoyed this instructable and that it inspired you to do something you may not have otherwise. Our main goal at the Children's Museum of Bozeman STEAMlab is to inspire. Today we gave you a taste of programming, electronics and 3D printing. We'll be doing a lot more in the same veins soon! Please consider voting for this instructable in the 3D printing contest as it would help us tremendously when putting on 3D printing classes in the STEAMlab.
Check us out online at http://www.cmbozeman.org/steamlab.
We have a be nice policy.
Please be positive and constructive.