This is two, two, two Instructables in one! My entry for the USB Contest (still in progress – no guarantees I will even finish it) involves an Arduino, which I decided to package in an Altoids tin. I also needed a battery pack that would last longer than a standard 9 volt battery, so I decided to build one into another Altoids tin. Two tins, two projects, one Instructable. You can do either or both!
An Arduino fits nicely inside an Altoids tin. This project is simply cutting a hole for the USB port and drilling a hole for the 9 volt plug, then mounting the Arduino with double-sided foam core tape.
There are several options for powering an Arduino. Past Instructables on the subject include Power Arduino From a 9v battery, Self Sufficient Arduino Board, Power Arduino with a cellphone, Arduino battery pack Version 0.1V, How to Install the Arduino to the Lithium Backpack, and The Arduino AA Undershield. Mine offers the advantages of fitting inside an Altoids tin, so it nicely pairs with my Arduino in an Altoids, and using six AAA batteries, which I believe (without any solid data) will last longer than two AA batteries. Of his Arduino AA Undershield, Artificial Intelligence said, “You may ask why I'm not simply using 3 or 4 AA batteries to power the Arduino. The reason why, I'm not using batteries to drive my Arduino directly, is that they're not regulated.” I avoid this problem by using the 9 volt input on the Arduino.
Step 1: Gather the Parts and Tools
Here is a list of the parts needed:
• Double-sided foam core sticky tape
• Heat-shrink tubing or electrical tape
• Scraps of wood 3 1/2” x 2 1/8” x 3/4” and 3” x 1 3/4” x 1/4”
the above items are possibly free if you have something suitable around the house
• Arduino – available from several sources; mine was $30.00 from Adafruit
• Altoids tins (2) – free! Makershed has really nifty ones for $5.00
• “AAA” Batteries (6) – various sources, various prices
• “AAA” Battery Holder (2) – Radio Shack #270-412 $1.79 each
• 2.1mm DC Power Plug – Radio Shack #274-1569 $2.99/2 pack
• An on/off switch. I did not use one, but there’s plenty of room for one
You’ll also need a few tools:
• Ruler and pencil
• Saw and wood file
• Drill and bits
• Small metal file
• Soldering iron
• Heat gun (optional)
Step 2: Prepare the Wood Block
We’re using a block of wood inside the Altoids tin to back up the metal while drilling the holes. Because of the tin’s rolled lip the largest block that will fit is 3 1/2” x 2 1/8” x 3/4”. This is a shade too thin but it’s a very common size and we’ll make it work. As you can see, we have to round off the corners. Use the Altoids tin as a template to draw curves on the block, and then file the corners to the lines:
You can see I didn’t allow for the difference between the inside radius and the outside radius, so I took off too much:
Next file off the edge all around the top, to clear the rolled lip of the tin. We have to slide the wood block under the rolled edge so the wood is backing up the tin while we drill:
Step 5: Mark the Tin
Next we very carefully mark the tin where we need to cut it. Place the Arduino in the tin. Mine came from Adafruit and they include four little rubber feet to keep it off your work surface. These very nicely keep it off the inside of the metal tin. In Step 8 I’ll stick the Arduino down with double-sided foam tape, which is about the same thickness as the rubber feet. You should space your Arduino to match how you plan to mount it – cardboard is a good choice as you can use multiple layers to get the thickness needed.
Once the Arduino is in position, mark the lip of the tin as shown. Then carefully measure down from the lip to the top of the USB port and the 9 volt socket. With those measurements you can then measure the face of the USB port and 9 volt socket and transfer those distances to the outside of the Altoids tin.
Step 6: Cut the Holes
First you have to clamp the wood block in place, snug up against the end you intend to drill. Since the block is slightly thinner than the tin, you’ll need a small scrap of 1/4” plywood to avoid crushing the edge of the tin.
Next drill appropriate sized holes. I drilled 1/16” holes in the center and each corner of the USB opening, and in the center of the 9 volt socket hole. Next I drilled a 1/4” hole in the center of the USB opening and a 15/64” hole for the 9 volt socket. Finally, remove the wood block and use a small metal file to enlarge the1/4” hole to make the USB opening. A few minutes work and the results aren’t too bad. I was afraid the lid would hit the USB cable, but it just clears. The lid did need to be trimmed with snips to clear the 9 volt jack. Be sure to wash out the Altoids tin when you finish to remove all metal filings.
Step 8: Install the Arduino
This step is easy. Cut the double-sided foam core tape and stick it down. If you have an Arduino with rubber feet, you may need two thicknesses of tape. You DID allow for this when you measured where to cut the holes, right?
Step 9: The Battery Pack
I needed six 1.5 volt cells for 9 volts total. I fact, if you take apart a 9 volt battery you will see it has six small cells inside. I started with AA cells, and indeed six AA cells will fit in an Altoids tin. Unfortunately, holders for six AA cells will not fit in an Altoids tin. Perhaps in a future Instructable I’ll attempt it with homemade holders – you’re welcome to give it a try. Instead, I scaled back my expectations to AAA cells. Radio Shack makes a nice three AAA cell holder and two of them fit in an Altoids tin with lots of room for the wiring, plus a switch if you care to add one.
The battery holders go on the right and the wire to the Arduino exits to the left, because the Arduino socket is on the left. So we begin by clamping the wood block inside the second Altoids tin and drilling a hole for the wire in the left end of the tin. You can pretty much put the hole anywhere you like, just be sure to position it low enough to clear the lid; I put mine in the center of the end. Size the hole for your wire. Sorry, I don’t have any pictures of this.
Step 10: Mount the Battery Holders
Next we mount the battery holders. Sand the bottom of the tin and the bottoms of the holders to help the glue stick better. Then apply the glue per directions. I used Elmer’s Stix All, because I had some on hand. Anything that will glue plastic and metal should work, including super glue. With three batteries per holder, the two on the ends point one way and the one in the middle points the other way. I mounted them in alternate directions such that all six cells alternate directions.
Step 11: Wire the DC Power Plug
Cut six to eight inches of wire. I used some co-axial audio cable I happened to have. It works well because it’s round and thus goes nicely through a hole in the Altoids tin. Strip the insulation from about 3/8” of wire. Unscrew the black cap from the silver barrel of the power plug. Solder the wire to the tabs on the plug; remember that the center is positive and the ring is negative.
Now get out your multi-meter and measure the resistance between the plug’s tip and ring; it should be infinite. If not you have a short somewhere that you must fix now. When the plug is soldered properly with no shorts, slip the cap on the end of the wire and screw it back on the plug.
Step 12: Wire the Battery Holders
To connect the two battery holders in series, we’re going to solder a black wire from one battery holder to the red wire of the other. Here you have a choice. If you’re lazy, you can use the wires as-is and stuff them into the tin. If you’re adventurous, you can trim the wires to just fit, with 1/4” overlap to connect them. I chose the middle ground and trimmed them so there was one loop of wire at the left end of the tin, next to the battery holder. Strip 1/4” of insulation off the wires, slip some heat-shrink tubing over them (or wrap them with electrical tape after), and solder them together. If you use heat-shrink, position it over the solder joint and heat it with a heat gun or, if you’re careful and patient, the soldering iron. Then stuff these wires down into the tin before we move on to the other two wires.
Step 13: Connect the Power Plug Wire to the Battery Holders
Now slip the end of the wire into the hole in the tin. Pull it in until about 1” is sticking out and close the lid. Now put the Arduino in its tin on top (taping them together helps). Carefully pull out wire until you have just enough to plug the connector into the Arduino, which will be more than you need once the plug is fully seated but necessary for proper operation.
Set the Arduino tin aside and open the battery tin. Note the point on the wire where it enters the tin and tie a knot in the wire just inside the tin, as shown.
Now cut off most of the wire beyond the knot, leaving about 1”. Trim 1/2” of insulation off the wire, slip on two bits of heat-shrink tubing, and solder the remaining two wires from the battery holders to the two wires from the DC power plug. Again, remember it’s positive (red) to the center, negative (black) to the ring. As before, use the multi-meter to check for shorts. Then put six batteries in the battery holders, set the multi-meter on its 15 volt scale, and check that the plug tip (center) is positive and the ring is negative. Once you’re sure all is well, use the heat gun or soldering iron to shrink the tubing in place over the joints, then stuff the wires down next to the battery holder. Note that I took my pictures after I completed this step, so in these photos the heat shrink tubing is already installed.
Step 16: Insert Tab a Into Slot B
Now that both projects are complete, it’s time to put them together. Close the lids on the tins and tape or rubber band them together as you see fit. I use tape so I can open the Arduino tin to access the sockets. Insert the power plug into the Arduino’s 9 volt socket and you’re good to go. Enjoy!
Step 17: Final Note
Naturally, you wouldn’t put an Arduino into an Altoids tin if you didn’t have some intended use for it. I leave it to you to drill holes as appropriate for wires leading to sensors, LEDs, motors, etc. And keep that wood block; it could come in handy for other Altoids projects.