In this Make we 3D print a Doctor Who Tardis (using Printrbot Simple Metal, and Cube3), then add Arduino electronics so we can play the Doctor Who theme (and random sound samples), and flash the light in that famous Tardis way we know and love.
Sound like fun? Let’s do it!
See the finished project: It’s usually more instructive to start with the finished product, so here is a picture of the final 3D Printed Tardis:
Prefer Raspberry Pi?
Got you covered with a much-larger Raspberry Pi-Powered Tardis.
Of course we start with the 3D printing. This is the best Tardis model I have found. Yes, there are a bunch of other lovely models on Thingiverse, but as described in the Tested.com writeup, Sean Charlesworth has the best model I have found, and almost as important, it is a kit so we can modify, tweak and accessorize to our heart’s content.
Sean puts a lot of effort into ensuring his models print well, it is accurate, and just looks good. As it was designed as a kit it also meant I could spread the load between two printers, in this case my Printerbot Simple Metal and my Cube3. On the Printrbot I printed translucent parts in particular, one blue panel in translucent PLA, and I of course printed the light and windows in translucent white PLA ready for the LED lights to shine through. I also printed brackets for the inside which in the end I discarded. The Cube3 has a lot of faults but it does excel at dimensional accuracy and predictability of the outcome, so I printed the parts that most needed accuracy on that machine.
Running PLA at 60mm/second at 195c the whole thing was printed in under a day.
The model goes together very easily, it is all friction fit, and provided your printer is calibrated and has good adhesion (these are flat and thin pieces, liable to curl), it is a fast build.
Now let’s make it come alive!
Electronics and Code
Starting with an Arduino Uno I breadboarded a basic circuit. A lot of the decisions were based on my self-imposed deadline of having this blue box ready for the Calgary Mini Makerfaire. Therefore I went with what I already knew.
This means in some ways it is more complex than necessary, using an SD card is pretty much overkill, and the output is quiet, due to lack of amplification, so we will fix those items in a future update or another noisy prop. It works, that’s the main thing!
Breadboard: Breadboard circuit video:
Optional LED: Add your LED to pin 3
Obviously this is the prototype. The actual finished item uses a smaller Arduino. There are a couple of options there, a Pro-Mini or a Nano. Whichever you end up choosing, you do need to change the pins used appropriately. The above diagram is Arduino Uno as it is a bit easier to see what is happening – View the code at Github for smaller Arduino pins.
Playing the Sounds
The Arduino code requires the amazing PCM library found here. This allows the Arduino to play 8-bit WAV files. Not the highest definition, but for sound effects perfectly usable.
You can get sound files from around the web, but for official Doctor Who sound effects, start here at the BBC education website.
Files must be converted to WAV format, 8-bit, 8-32khz Sample Rate, and in mono. Using iTunes you can do this fairly easily:
Click > Edit > Preferences > Import Settings Change the dropdown to WAV Encoder and Setting: Custom > 16.000kHz to 32kHz, 8-bit, Mono Right click any file in iTunes, and select “Create WAV Version”
Once you have all that in place, with your sounds on the SD card, and everything wired up, it is pretty simple to play one of your audio files:
That takes care of the sound effects, but how do the lights work?
Fading the Light
Fist we need to set up our base. Which pin the LED is plugged into, the start brightness (ie. off), and how much we want to increment the fading by.
When we get to the actual loop, all we do is keep adding/subtracting until the fade needs to change direction.
As I said before, some improvements can definitely be made but it is a decent starting point and the people at Makerfaire enjoyed it, so that’s good enough for me!
In the next post we look at how we can improve the sound quality and volume by replacing the SD card with a tiny $5 module …