This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com). I came up with the idea originally for a place to keep candy or other things for Halloween. This instructable contains the SolidWorks drawings for the pirate chest and the Arduino sketch for controlling the servo motor with an IR remote.
Step 1: Getting Your Materials
The first thing that you need to do it obtain an Arduino kit that includes a breadboard, an Arduino UNO, connection wires, an IR sensor and remote, and a servo motor. You will also need access to a 3D printer. I was able to use one at University of Tampa, but there are also places online where you can send in the files and they send back the completed parts.
Step 2: Printing Your Parts
I have included the drawing files in the introduction. Feel free to resize as you want or need. If you have access to your own 3D printer like I did, you will need to download the printer software. Also, you will need to save the files as STL format. You can also use an online service to print them for you, but it may cost you a bit more money.These parts are supposed to fit together snugly and I glued them with epoxy. I used a nail for the hinge because the hole was too small for a printed peg. The parts are to be assembled as shown in the CAD assembly file and the servo motor is to be glued to the front corner in a position to keep the chest closed when the servo is in the closed position. I also used acrylic paint on the prints. I used a brown base with gold trim, but feel free to do a different paint job.
Step 3: Setting Up and Programming Your Arduino
First, you need to set up your breadboard and processor. Set it up like the pictures above. Just make sure the pins defined in the program match the pins on the board. Also, the arduino needs to be plugged into a power source when being used. I personally used a portable phone charger. For the program, I uploaded a detailed sketch for the servo/IR remote combination. It is fully commented to tell you what line is responsible for a certain task. In order to get this to work, you have to plug in you arduino to your computer and click upload. Once this is done, you are ready for the full assembly.
Step 4: Final Assembly and Test
At this point, you should have a fully assemble chest, as shown in the pictures and the CAD assembly file. The servo motor should be glued into place with an arm attached that will open and close the lock by rotating 90 degrees back and forth. You should test this to see if it works by pressing one and two separately. With each press of the buttons, the servo should rotate. I have attached my final video to show how it is supposed to work. Also here is the youtube link if you would prefer to look at it there, https://www.youtube.com/watch?v=cVFGoIT2Hhs. You can view other videos pertaining to this project on youtube as well.