Introduction: A Brief History of Time
"People don't understand time. It's not what you think it is. … People assume that time is a strict progression of cause to effect... but actually, from a non-linear, non-subjective viewpoint, it's more like a big ball of wibbly-wobbly... timey-wimey... stuff"
- The Doctor -
Who needs wikipedia when you have a TARDIS? We decided to add a little magic to a Dr. Who figure by giving him an actual TARDIS that works. Well, it "works". In our setup, you can select a day and a month using two dials. The selected day and month are shown on a LCD display. When pressing the "go" button, the TARDIS will make the time-travelling sound, and, after time-travelling, the docter will read aloud a fact from that date, from a random year in history. See this in action the youtube video.
This incredible technology is powered by a Spark Core, to retrieve the information and to co-ordinate all the action, a Musicmaker shield, to play the TARDIS sound and an EMIC2 board, to translate text to speech. With this project, we set ourself the task to show that the above functionality could be build using relative low level electronics. We could have used a raspberryPi to achieve the same effect, but since I use Arduino's in my classes, I thought it would be nice to show how far one can get with Arduino-like devices (I see the Spark as the IoT ready, higher performance big brother of the Arduino)
PS a note on I and we: This build was done jointly by Kiki Woodham and Rolf Hut. Kiki worked on the TARDIS and the console. Rolf worked on the electronics and the code. Whenever I mention we, I mean the two of us. Whenever I say I, I mean Rolf.
PPS I had a lot of help from the community over at spark.io, together we worked (and are still working on) porting the library for the Musicmaker shield, which is designed for the Arduino, over to the Spark Core. See the thread over here.
PPPS Since time travel is a lonely and often boring job, we added a functioning old GameBoy Color to the console.
Step 1: Step 1: Materials
Here, only the materials for the TARDIS, the console and the electronics are listed. Decorations should be added to the console based on once own preference and based on available materials.
Materials TARDIS and console
- cardboard (serial boxes). Amount depends on size of TARDIS
- foamboard (at least 2 mm thick)
- paint (blue and grey, or any other colour you like your console to be)
- shrinky dinks (for the windows in the TARDIS)
- an action figure of The Doctor
- Spark Core https://www.spark.io
- Arduino Uno arduino.cc
- Adafruit Musicmaker Shield. This one.
- EMIC2 text to speech breakout board. This one.
- 16 x 2 LCD screen. I used the one that comes in this Arduino starter kit.
- 2 speakers (2" diameter)
- 3 potentiometers (10 kilo-ohm)
- 220 ohm resistor to regulate LCD brightness
- 10 kilo-ohm resistor as pull down for push button
- push button
- breadboard and assorted wires.
- X-acto knife (for cardboard and foam board)
- regular glue
- hot glue and hot glue gun
- soldering iron and solder (careful: gets very hot! read instructables on how to solder if never done before)
Step 2: Step 2: TARDIS
Decide how big you want your TARDIS to be. Ours needed to fit
the 3.75-inch action figure of The Doctor that we had bought (Amazon is a great source for these). The templates included are tailored to be proportional to that size, but you can shrink or enlarge them to suit your own needs.
The base of the TARDIS panels is made of a thin corrugated cardboard for strength, with the grain running vertically. Kiki used cardboard from some Ikea packaging; you can also use a plain old cardboard box, but may need to cut the base panels slightly narrower to compensate for the additional thickness.
Using the provided templates, cut 4 of TARDIS panel A from corrugated cardboard. The rest will be cut from cereal box-weight cardboard. Cut 4 of TARDIS panel B and glue these on top of panel A, making sure to mark and cut the dashed line for the door opening on one of these panels; set the door aside. Cut 4 each of pieces C and D; carefully glue C down the center of each panel (there will be an overlap over the door opening). Finally glue piece D on top as shown. I’ve painted the pieces each step of the way to make it easier to see the steps, but you can just as well paint it all at the end. Now cut panel E and score or crease each one carefully down the middle (making several hard passes with a ruler and ballpoint pen does the job nicely). These are the joints that will hold the whole thing together. Glue the joints on all corners and paint everything a lovely shade of TARDIS blue. Cut four of the TARDIS windows from Shrinky Dinks and draw on the lines with a Sharpie or CD/DVD marker (most other markers will smudge). Tape these in place, shiny side facing out, with clear tape from the inside. Hinge the door in place with (duct) tape.
Next you’ll want to cut one each of TARDIS base E, roof base F, and roof top G out of foam core. Glue the smaller roof piece centered on top of the larger one; fit this to the top of your TARDIS and glue in place. For the ‘light’ on top, I used the joint of a clear bendy straw, stretched out and cut to about 12mm. Cut a small circle of cardboard to top it off and paint this blue after glueing in place.
You’ll probably notice we did not make the ‘Police Box’ and door signs; there’s no printer in Kiki’s studio. These are not included in the templates, but you can easily make your own in any image editing program and scale them to the size needed.
Step 3: Step 3: Console
Now the important bit, the TARDIS console. Here we used foam
core for extra stability. The panels need to be strong enough to support the electronics and decorations, and also to stand up to use. Also, for this section you’ll need to keep the pieces to scale in order to properly fit the various bits and pieces.
Using the templates provided, cut 6 each of console panel AA and console border BB, making sure to cut each at a bevel to the outer edges will fit together flush when assembled. Since you’re using hot glue to hold the pieces together, cutting too much bevel is fine – not cutting enough will result in gaps. Cut one of console top CC.
Hold the pieces together temporarily with masking tape and apply copious amounts of hot glue to the inside of the seams. When the glue has cooled/dried, CAREFULLY remove the masking tape from the outside. Now you can paint the console whatever color you like. Kiki used standard white gesso and added a little black acrylic paint to make a nice light grey; dabbing this on with a piece of (new) dish sponge creates a nice texture similar to that of powder-coated steel or certain kinds of plastic casings.
Step 4: Step 4: Decorating
Now here’s where you really get to have some fun. Take the time
to make your console totally unique, or copy one of your favorites from the series. Kiki definitely went wild with ours. Decide what kind of style you like (we liked the retro simplicity of Tom Baker’s consoles). Here are the basics.
Required elements (needed for the electronics to be connected properly):
- An opening for the LCD screen; you can cut the included ‘console display/control panel’ from a piece of cereal box. These will also accommodate the potentiometer knobs (to make them easier to reach and turn, we used marker caps, cut them shorter, spray-painted, and hot-glued them onto the potentiometers).
- An opening for the "go" button. This is a small push-button, thinner than most foam-boards, so most likely some extension needs to be made on top of that. Kiki used a small piece of foam core.
- Two 2-inch diameter holes for the speakers. You can use the included speaker grate templates, which were cut from cardboard and then punched with a 2mm hole punch, or create something else.
Optional fun elements to make it look more timey-wimey:
- Assorted dials, knobs, and levers. We’ve included the templates for our lever bank, cut from black foam core. You can use water/soda bottle caps (we spray-painted some), more cardboard or foam, or just about anything else you can think of.
- A Gallifreyan clock. It’s all about time, right? Here Kiki used the guts of a cheap Ikea alarm clock, removed the hands and replaced them with Shrinky Dink Gallifreyan symbols (as well as adding some to the console). Yes, it runs and tells time. You can even use it as an alarm clock, though it’s rather inconvenient. For some inspiration, check this out: http://timeturners.wikidot.com/circular-gallifrey...
- Various indicators. We’ve got some gauges and an oscilloscope screen. Use your imagination here!
Step 5: Step 5: Connect Electronics
The hart of the electronics is the Spark Core. It connects to three units: the emic2 text to speech unit, the arduino with soundmaker shield and finally the LCD and input controls. Pro-tip (I learned the hard way): First build the entire electronics part on a breadboard (this step), and upload the software (step 6), to test if everything works. Only then transfer all the electronics into the TARDIS console.
Spark Core and power
plug the Spark core into the breadboard. Connect the 5V and the GND pins of the Spark with the + and - rails of the breadboard. Through the USB cable, the Spark will deliver all the power, that is why we need to make the 5V line available.
LCD and inputs
Solder wires of about 20 cm to the pins of the LCD. You only need to connect pins 1 through 6 and 11 through 16. Strip the other ends of the wire, but there is no need to solder them. Also solder wires to the three potentionmeters and the push-button. Since the outer pins of the potentionmeters will all be connected to 5V and GND, those can be daisy-chained, as is visible in the picture above. Finally solder two wires to the pins of the push-button.
Connect the outer wires of the potentiometer to the 5V and GND rail of the breadboard. Connect the middle wires of the two potentiometers that you want to control day and month to pin A0 and A1 on the Spark. The middle wire of the 3rd potentiometer should be soldered to pin 3 of the LCD. This wil control the contrast of the LCD screen.
Connect wires on pins 1, 5 and 16 of the LCD screen to the GND rail of the breadbord. Connect the wire on pin 2 to the 5V rail. Pin 15 should also be connected to the 5V rail, but a 220 Ohm resistor should be added in series to limit the current to the backlight of the LCD screen. Finally connect the wires on pins 4, 6, 11, 12, 13 and 14 to D0, D1, D2, D3, D4 and D5, respectively.
One of the wires of the push button should go to the 5V rail. The other wire should go to an unused line on the breadbord. From this line bring a 10 kilo-Ohm resistor to the GND rail and bring a breadboard wire to pin D6 of the Spark Core.
Arduino and MusicMaker
If not already done: solder pin connectors and headers onto the musicmaker. Plug the musicmaker into the Arduino. Solder some wires to one of the speakers. Screw the other ends in the headers. Connect the 5V pin of the arduino to the 5V rail of the breadboard. Connect the GND pin of the arduino to the GND rail of the breadboard. Finally connect pin D7 of the Spark Core to pin D2 of the Arduino. This last line will be used to indicatie the Arduino to play the "time-travel" sound.
The EMIC2 is easy to connect. If not done already: solder pins to EMIC2. Also solder some wires to the second speaker. Plug the EMIC2 into the breadboard. Connect 5V to the 5V rail, GND to the GND rail. Connect SOUT (Serial out) on the EMIC2 to Rx on the Spark. Connect SIN on the EMIC2 to Tx on the Spark. Finally, connect the two cables from the speaker to SP+ and SP-
That is how to connect the electronics. After testing if the software works, Kiki hot-glued all the cables to the breadboard. This prevents the cables from getting loose. Next step: software!
Step 6: Step 6: Upload Code
All the code needed for this project is hosted at https://github.com/RolfHut/aBriefHistoryOfTime.
Connect the Arduino to a computer over USB. Put the file "tardis.mp3" on (root of) the micro-SD card and stick the micro-SD card in the musicmaker shield. Stick the on the Arduino. Upload "soundOnDigitalPin.ino" (found here: https://github.com/RolfHut/aBriefHistoryOfTime/tree/master/soundOnDigitalPin) to the Arduino. Connect a luidspeaker and test by connecting pin 2 briefly to the 5V line.
There are multiple ways to program the Spark Core. I will only explain how to upload the files to the core using the online IDE. If you are using the Spark Dev IDE or the Spark CLI, you most likely do not need me explaining how to flash your Spark.
Go to the online IDE of Spark, found here: https://www.spark.io/build/. If you have not already done so, claim your core. See the Spark documentation (http://docs.spark.io/) for help claiming your core.
Create a new application, then copy-paste the code from WhovianKnoelwedge.ino (found here: https://github.com/RolfHut/aBriefHistoryOfTime/tree/master/WhovianKnowledge) into your new application. Press the "flash" button (lightning icon) in the upper left corner. Your spark should start running the WhovianKnowledge. There is a quite large time delay at the start of the file, so you might have to wait a bit before it really starts. If it does not directly work, you can connect a USB cable from the Spark to a Computer and monitor what happens.
Step 7: Step 7: Add GameBoy
For the last panel, we added a GameBoyColor. Time Travelling can be boring and lonely, so a handheld device to play retro games might come in handy.
The shape of all the buttons was cut out of the TARDIS console. The casing of the gameboy was carefully removed, leaving only the casing around the batteries. The remaining game-boy interior was ducttaped to the inside of the TARDIS console.
Step 8: Step 8: Finished!
That is it! Turn it on, wait for the Spark to Connect to the internet, and give it a go!
Some final thoughts:
- the Arduino, Spark, Musicmaker and EMIC2 hardware could easily be replaced by a single raspberry Pi, which can also run better text to speech algorithms than the EMIC2 has in its hardware. However: our goal with this project was to show that this functionality could be achieved with a device that is closer to "true" Internet of Things. Using an RPi would be like hiding a full blown computer in the console.
- There is still a bug somewhere in the code for the Spark Core. No panic: it works! There is a constant defined at the start of the code called "DEBUG_SERIAL". I use it to send status updates over the serial USB connection for easy debugging. However: when I turn the debugging off, the code does not work anymore: somewhere a timing issue arrises. For now, I leave the debug option on, even when not debugging. Anyone who can spot the error, please create a pull request at my github (link in step 6).
- The title of this instructable is a reference to the most famous book of dr. Stephen Hawking. The EMIC2 hardware is not advances enough (yet) to simulate the exact voice of The Docter. Therefore, our setup talks more with the voice of Brittains (the worlds?) most famous living academic.