This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).
This project had the class, with no prior experience, use a 3D printer, write some Arduino code, and put together a project of their choosing with a few stipulations.
So as a fan of Doctor Who I decided to 3D print the TARDIS. I only made it do simple things since for the most part this is my first experience with a lot of these tools like a 3D printer, or an CAD program, and with the Arduino. I have broken up this Instructable into parts to detail the design and build process of this project. The steps are as follows:
- AutoDesk Design
- Breadboard Design
- Arduino Code
- Final Product
The project has LEDs that turn off and on (one 10mm on top and three 3mm inside, the servo will open and close the front door, and there is an LCD on the front that will display different sayings. All of this is controlled by an IR remote and receiver.
Step 1: Parts
I purchased an entire kit that we needed for the class with many more parts than what I ended up using, but the parts I used are below.
- Arduino Uno R3
- Micro servo
- LCD screen (16x2 with an I2C backpack)
- IR Remote
- IR receiver
- Access to a 3D printer (I printed mine in white PLA)
- Breadboard jumper wires
The rest of the supplies we provided by me:
- 3-3mm white LEDs
- 1-10 mm white LED
- 4-9V batteries
- SPST rocker switch found here
- 2.5mm Barrel Jack
- 22 AGM wire found here
- Heatshrink tubing
- Heat gun
- Blue and black spray paint
- Soldering supplies
There was some minor soldering as well so those supplies are recommended if you want the DIY battery pack. If not then only the white LEDs are required from the bottom list. The soldering was to connect the battery to the switch and to the barrel jack to plug into the Arduino. I'm sure there are other ways to do this but i wanted to try my hand at soldering. It still works with any power even USB. That was how I helped decode the code later.
Full parts list of the kit we got for the class is found here: makecourse.weebly.com/arduinokit.html
Step 2: AutoDesk Inventor Design and Printing
I used AutoDesk Inventor 2015 to model the TARDIS but any CAD software will do. A lot of the other engineers that were in the class used SolidWorks instead because they were more conformable with it. Since I had no prior experience with a CAD program I chose to use AutoDesk since the class itself used it and I could get the most amount of help if I needed it. This proved to be the biggest learning curve for me just because it can do so much. I would spend several minutes trying to figure out how to model an object but once I found it, it didn't take as long. I watched several videos on YouTube to figure out what to do that wasn't covered in the lectures of the class.
The basic design I wanted was for the TARDIS to fit together with the need for as little glue (or epoxy) as possible. My thinking was that since most of the parts run up inside the TARDIS, that if i needed to move or replace a part it would be easier to do so. There is a channel that the sides and the columns in the corners fit into. These are on the base and the bottom part of the top section. Since we were required to use the enclose that came with the kit, it limited the size of the TARDIS because I didn't think it looked good if it hung over the sides.
I've included the actual part (.ipt) files as well as the assembly (.iam) files that I made and they associate with AutoDesk. I've read that SolidWorks sometimes opens the .ipt files as well. Also, are the assemblies of the TARDIS and the entire project.
To print these files I exported them as .stl files that many 3D printers recognize and then took them to the print shop. As a fail safe I downloaded the MakerBot desktop app found here to make sure that the parts fit onto the platforms that were in the printers the shop had. Additionally I made a .thing file from this program and took that to make the process go faster. It is just MakerBot's file that saves all the parts on the platform to easily open then export the print to a printer. I messed around with this and other settings to see if there was any significant savings in time. Nothing took too long to print except the enclosure. That took about 12-13 hours to print and by far was the most costly (heaviest therefore the most expensive). All in all I bought a kilogram of filament from the shop and used about 75% of it only because I printed everything twice and the kilogram was $60. So if you print it all on the first time alright then you can look at $20-$30 for printing alone.
Step 3: Breadboard Design
The breadboard design was deceptively simple. Since all that really was connected to it was the LCD screen which had an I2C backpack so that only needed 4 pins two of which were for power, the IR received which needed only three pins and the 4 LEDs needing 2 pins each and the servo's three pins.
The servo is just a straight up connection to a pin and the power and ground and that was it for that.
To connect the LCD screen, I connected the power and the ground to the breadboard and the SDA and SCL lines to the Arduino. These are above the 13 pin and are marked on the bottom of the Arduino oddly enough.
The IR receiver was connected to the Arduino and to power and ground
The LEDs were connected to the Arduino through some 220 Ohm resistors and back to the ground of the breadboard. In the diagram I only show one but it can be repeated.
I've included a Fritzing diagram for clarity as well as a screenshot if you do not have Fritzing.
Step 4: Arduino Code
The code for the function of the project was fairly simple. Not much needed to be done just look for an input and when an input was received from the IR remote and decide what to do from there.
First though I had to figure out the codes that were being sent from the IR remote. I used the Instructable here to print what was received to the Serial Monitor in the Arduino IDE. The output is in decimal because later in the code when it is put into the switch statement the switch statement takes integers (decimal) as an argument for the cases and not binary or hexadecimal numbers.
Once I had these decimal values i can put then in pre-compile #define statements and give them a name. I did this because remembering which decimal output went to which button was not going to happen. So i named them something similar to their function (e.g. PWR for power, VOL_DOWN for the volume down button etc.).
Once those are defined, I had to create some objects of the LCD class, the servo class, and two for the IR receiver, one to decode and another for the pin that is used.
The code consistently looks for an input in the main loop from the IR remote and when an input is received it dumps into a switch statement.
I know that using delay() statements is not good for more experienced code but this was the first attempt at Arduino coding and I ran out of time to clean up the code before everything was due. It worked and did what I wanted it to do so it was good enough.
Full file of the code is included.
Step 5: Assembly
Once the code all worked and I was satisfied on how the parts fit together it was time for assembly.
The door that swings open need to pivot to let the servo swing the door open and close. For that I drilled a hole on the top and bottom of the door on the right side and hammered (carefully) brads(18 Gauge x 5/8 inch) into the holes. I did the same with the base and the bottom half of the top to insert the brads. When the doors and the top and bottom were put together it held the door in place but it was still be able to be moved.
The posts fit into the corners and the sides of the TARDIS fit in the channels between the posts and the channels that were mirrored on top fit the posts and doors as well.
To hold the upper part of the top (Top.ipt and Top-2.ipt) to the lower part of the top I used Loctite's 2-part epoxy. I tried superglue (cyanoacrylate) but it never set and was always liquid. I red that the glue just melts the plastic. The Police Box signs on the four sides are held on the same way and were put on after the tops were glued together.
The servo was held with super glue on the under side of the top of the enclosure in the little niche on the right side. Even though this enclosure top was printed in PLA like the rest of the project the glue stuck to the paint rather than the plastic itself. Here it worked but if you look closely it dreid white which is ok since it was inside but for the other parts I didn't want that showing.
So, here how I assembled the TARDIS after the tops were glues together and the police signs on the side. Starting with the base i then put the four corner posts in. The I put the three sides on that were no on the front. Then the two front doors and put the top on to hold it all together.
After the servo is fixed to the top enclosure and a brad stuck through the horn I could now sit the TARDIS on top of the box. The brad fits in the eye bolt that's in the back of the door that swings. When the servo moves it pulls on the eye bolt and opens the door.
The LED on top and on the insides are fed from wires up through the TARDIS and carefully hidden from view.
Step 6: Final Product
So here it is. I feel as though it came out pretty good. It doesn't do a whole lot but it is not a bad first attempt. I wanted to make up for the lack of things it did with the finish quality of the project and I think I did that. I think the requirement to use the box inhibited the size of the TARDIS. I would like to have made it a bit bigger and fit all the electronics inside. Overall, I am happy with the detail the #D printer was able to achieve, Even though the print left lines throughout the sides it worked out well since I could pass them off as wood grain.