Intro: Doctor Who Gallifreyan Clock
Hello humans and other lifeforms! This is my Gallifreyan Timepiece (aka Doctor Who Clock). Unlike Earth clocks, this one displays time in Gallifreyan numbers rather than Arabic or Roman numerals. It takes a bit of getting used to to read quickly, but it works just like any other device that measures wibbly-wobbly timey-wimey Stuff.
This project was a huge learning experience for me. Not only had I never worked with this many LEDs at once, but I learned so much about soldering (I didn't have a lot of practice beforehand), circuit design, and a few things about circuits in general. Building this clock wasn't so much hard as it was long; the soldering alone took probably 20+ hours. Of course, I was doing it for the first time and still figuring things out as I built it, so you all can learn from my mistakes and save some time. I also did the code for you as well!
Some of the pictures are a little unclear since there are a lot of wires bunched together in many of them. I've included annotations on most of them; be sure to check them out for more details! There are also several errors in some of the pictures, mostly because I ended up changing something awhile after I took the picture, so read carefully!
This project did require spending a long time soldering since I assembled the control board myself, so make sure you've done at least a fair amount of soldering beforehand. You'll get a lot of experience from building this!
As far as cost is concerned, the electronic components are not very expensive since most of it came from eBay (the only place I buy LEDs anymore) and the rest from Sparkfun. The frame is quite simple and the most expensive part is probably the 3D printed dials if you are using a printing service.
There are currently 2 issues with this clock that I haven't quite been able to figure out: the RTC clock chip is only accurate when the brightness is turned all the way up (which is more like a "spotlight mode" with these LEDs...). I think this may have something to do with my choice of batteries, so if anyone knows a way to fix this please comment! Also, once the seconds dial reaches 10 it doesn't display properly, but everything else works just fine!
And finally, due to hardware limitations this clock only works in the 21st century, so if you're looking for a new timepiece for your TARDIS you might need some different components. But it would still look good inside!
Step 1: The Parts
162 5mm LEDs - You can buy packs of these on eBay for the price of individual LEDs in stores
12 3mm LEDs - Also from eBay; the ones I used were diffused and not as bright
Arduino Pro Mini 5V 16MHz - Should probably be 5V to power the other components; you could also use the Nano
FTDI Cable/Adapter - Only if you use the Pro Mini or other board without a USB plug
CD74HC4067 Multiplexer breakout board - Available from Sparkfun or eBay
DS1302 RTC Breakout - I've only seen the specific ones I used on eBay. These are not the most accurate timekeeping chips; the DS1307 is supposed to be much better. Additionally, they only function in the 21st century due to hardware limitations, so if you time travel too far it won't be accurate. I had a few of these boards lying around though, so I used them for convenience.
Perfboard/Protoboard - I used the Sparkfun Snappable Protoboard since I didn't know how big it would need to be; you might want something a little sturdier but with about 25x40 holes
Small Potentiometer (or Resistors) - The potentiometer I used goes up to about 8 kOhms at which point the LEDs are quite dim; you can use a resistor if you'd prefer a fixed brightness.
~300 M-F Jumper wires - eBay has them in packs. You could probably make do with less, but you'll need at least 162.
"Plenty" of breadboard wires/M-M jumper wires
4 AA or AAA battery pack
The Frame Components:
2x2 Plywood (I used 3/8" thick)
Bronze Metallic Spraypaint
Brass Metallic Spraypaint - this is for the dials, so make sure it specifically says it works on plastic!
Garden Hose Plugs - Detail piece, not necessary but looks cool!
Several Wood Screws
Soldering Equipment - Iron, solder, etc.
Drill and bits - 3/8" and 1/8"
Marker and/or thick pen - for marking out cuts
Band Saw - Mine wasn't working when I built this; alternatively...
Scroll Saw - This takes longer and is much harder to do circles with, but is useful for cutting out the holes for the number display
Needle-nosed pliers - Very useful for the wiring up the LEDs
Digital Multimeter (DMM) - Very useful for continuity testing the control board
Tape Measure/Ruler - for measuring the frame
3D Printer and (White) Filament - at least 6" square bed
Sonic Screwdriver - for connecting it to your TARDIS (optional)
Step 2: The Gallifreyan Number System
Gallifreyan numbers work just like letters, so if you already know how to read the language it won't take much time to learn. If not, it's still easy but just takes some getting used to.
Every number, word and sentence is enclosed in a circle. A zero is indicated by a smaller circle inside the outer circle, and every number after that includes the zero circle. Numbers 1 through 5 are indicated by radial lines between the zero circle and the outer circle. After 5, numbers 6 through 9 are drawn the same way as 1 through 5 but with a circle tangent to the zero circle and outer circle. Once you get to 10 and up, you add another concentric circle between the zero and outer circles, and every multiple of 10 is drawn the same way as 1 through 5. Also, once you have a 10 circle drawn, the 5 circle is tangent to the zero circle as well as the 10 circle. After 59, you draw another 5 circle between the 10 circle and the outside circle and keep on repeating for tens, hundreds and thousands and so on.
If that sounds confusing, don't worry; it probably is, and you'll get a better idea of how it works from the pictures.
Anyways, the clock only needs to show 59 seconds, 59 minutes, and 24 hours at most, so the dials only go up to 59. It would certainly be possible to expand this if you wanted to do more dials for days, weeks, etc., although the wiring would get quite complicated by then. Words and sentences are read counterclockwise starting at the bottom of the circle, so in the code the dials are arranged by hours on the bottom, minutes on the right and seconds on the left. I've also seen some translations of Gallifreyan writing that have the radial lines animated where they move around the centre of the circles. You could probably manage this on the clock, but it would require some extra coding and possibly rewriting some parts to be more complex; it is possible though!
Step 3: Part 1: the Dials: Printing
The dials (number displays) are capable of displaying any number between 0 and 70, but we only need to go up to 59. Use white filament or something lighter-coloured since you'll be painting it later, or use a colour you'd like for the final version.
The part should fit on a 6x6" print bed and took about 6 hours or so on the printer I used. The original file didn't print quite right, so I had to drill out all the holes to fit the LEDs in. It might have just been a printer or slicer glitch, but if you end up drilling either way use a 3/8" bit for the 5mm LEDs and a 1/8" bit for the 3mm ones; any bigger and the LEDs will be fit too loosely. On the rings, drill far enough that most of the LED can fit into the hole but not up to the top of the ring. For the small ring, be very careful not to break off the part in the centre like I did on my test piece.
Once you're done printing, you can either keep going or skip to the step 12 and paint the dials before continuing. I painted mine later just in case I needed to change anything, but you can do it either way.
Step 4: The Dials: LEDs
The dials fit 46 5mm and 4 3mm LEDs, all of which should be wired to a common ground. To do this, arrange the grounds (short leads) in such a way that you can reduce the number of wires you'll need to connect all the grounds. Try to position the LEDs so that all the grounds are pointing in the same direction around the circle. For the 5mm's, arrange the LEDs in groups that can be twisted together - the obvious choices are the inner and outer radial groups of 2 and 3 (3rd picture). For the rest there are some positions that you can bend pretty close to each other, and there are some without any good way to reach them. The 3mm LEDs are a bit trickier; I ended up twisting all the grounds together in the centre of the circle and bringing a wire to it later. Finally, for the innermost ring I tried twisting the LED grounds around the circle in an octagon, but this requires getting the angles right and usually ends up not looking like a regular polygon.
Once you arrange the LEDs, start soldering the grounds together; the groups are probably the best place to start. Make sure that on at least one of the LEDs you leave enough length on the lead to fit a jumper wire to connect to the control board. Also, try to keep the connections away from the plastic parts of the LEDs so that you don't melt them with your soldering iron.
I found out late that you will save around 40 wires by twisting together the positive terminals (cathodes - long leads) for the radial groups of 2 and 3. You could also wire up the rings to a single jumper wire, but I'll be showing how to do it with them all wired individually.
Once you've got all that done, repeat it for the other 2 displays - writing it in one sentence makes it seem like no big deal, but this does take quite some time...
Step 5: Part 2: the Control Board: Multiplexers
The rest of the electronics are all part of the control board, which is probably the most time-consuming section of this project. The spotlight circuit elements here are the CD74HC4067 multiplexer (mux) chips, which allows the Arduino to control most of the ~150 LEDs with only 12 digital pins. Most of the projects I've seen these used for involve connecting multiple sensors to one input, whereas this project uses the mux in the opposite direction to connect multiple LEDs to one output. These do have a (low?) tolerance for current, but I haven't had any problems yet even with most of the LEDs on at once. I originally tried using transistors to control the LEDs, which worked, but I couldn't find any good way to fit 30+ transistors onto the protoboard without an IC. Anyways, this whole process will go much smoother if you follow the circuit diagram rather than working solely with my descriptions and pictures.
Solder the multiplexers to either end of the short dimension of the board with at least 1 hole between the 8 pin header and the edge of the board. On the protoboard I used (25 holes wide), this leaves enough room to fit the LED jumper wires between the mux boards. The C0 pins connect to 8 M-F jumper wires, which you can arrange in a straight line towards the other mux board. C1 through C11 all connect to a single jumper wire, and C12 connects to 4 jumpers. I found out later that soldering the jumpers directly to the multiplexers saves a bit of space (and quite a bit of solder). To connect all 8 jumpers at C0 (and all 4 at C12), you can either make a solder bridge (which takes more solder) or bend the leads from the jumpers towards each other, using them as bridges instead (which is what I did).
Finally, add another jumper wire on each side next to the each multiplexer's ground pin and solder each one to the adjacent ground.
IMPORTANT: Make sure to leave room between the multiplexers for 32 wires that you'll be soldering in later.
The setup I used for these first 2 mux boards is a little backwards, since it gets difficult to work with the wires between the multiplexers when there are so many bunched up in the middle. Rotating the boards 180 degrees would probably make the circuit easier to put together and just as effective in the final product, but... I put so much effort into the control board before noticing this that it wasn't worth the time and energy to redesign and reassemble the entire board. But now you know and can make your own decision!
Step 6: Control Board: Arduino and RTC
After you get the multiplexers assembled, solder in the Arduino and the Real-Time Clock board. The Arduino is simple enough, but the RTC can be a challenge: on the board I used, the header was originally on the same side as the battery and chip, but the board only had solder pads on the one side of the pins. Thus it was quite difficult to reverse the header since I couldn't solder the header with the plastic guard attached to the bottom of the RTC. I managed to solder a few of the pins on without the plastic, and some by pushing the pins through the other side. However, for the final board I just soldered in a few jumper wires to connect to the same pins on a different chip.
Once you have the RTC header rearranged, solder it and the Arduino at least 2 holes away from the multiplexers with the Arduino's FTDI pins on the row closest to the edge, and [the entire RTC on top of the protoboard, or] just the 5 jumper wires to connect to it. Now connect the multiplexers and the RTC to the Arduino as shown in the pictures/annotations/schematic.
Step 7: Control Board: the Last Multiplexer
Coming soon to theatres! (sorry :P)
For this last component, I used the original setup I mentioned for the jumper wires: solder them directly into the multiplexer (on C0 through C12), making sure they reach the protoboard. To save space, connect the 7 other jumpers to C0 in an L-shape and the other 3 jumpers for C12 either in a straight line or in an L towards C0.
Step 8: Control Board: Power Supply and Dimmer
For these connections I used some M-M jumper wires since I was running out of breadboard wires; use whichever works best for you. Wire in all the grounds in a line to the space between the Arduino and the RTC, with another spare wire for later. then all the VCC pins to another line in that same space. MAKE SURE THE GROUND AND VCC ARE SEPARATE! Note that unlike some other boards, the VCC pin on the Pro Mini is a 5V or 3V supply pin (depending on the board model). Connect the Signal pins on the mux boards to a line at the end of the RTC. Also note that in the pictures the spare ground wire does not connect to the Signal pins.
Next, wire the potentiometer between the Raw pin on the Arduino and the Signal wires. Wire the switch in between the battery's positive terminal and the Signal wires. And finally, wire the battery's negative terminal to that spare ground wire from earlier.
For each of these connections, you can use the same lead-bridge soldering technique I mentioned earlier; it works quite well in this situation.
IMPORTANT: In some of the pictures the Raw wire is connected to the Signal wires. THIS IS NOT CORRECT! If you do wire it up this way, the power supply to the Arduino will be affected by the dimmer, which will cause it to power off if you turn the brightness down too much.
Step 9: Control Board: Always-On Wires
On the dials, the LEDs in the outside and innermost rings should be on at all times, since all Gallifreyan numbers are enclosed in a circle, and all numbers show the ring in the centre for zero. So, the clock needs to have 48 LEDs that are always on: 8 in each outer ring and 8 in each inner ring (16 on each dial). For the first two dials corresponding to the first 2 multiplexers, you can wire in 32 jumper wires between the mux boards and bridge them all together, then connect all 32 to one of the Signal pins. For the 3rd mux board, the 16 jumpers fit nicely in front of the multiplexer if you arranged them well earlier. These should also be connected to the nearby Signal pin.
IMPORTANT: In some of the pictures these 16 LEDs are wired directly to the Raw pin. THIS IS INCORRECT! If you wire the LEDs this way they will heat up, since they are not connected to the potentiometer.
This is about as far as you can go with the electronics so far, so the next step is to build the frame.
Step 10: Part 3: the Frame: Planning the Cuts
Now to make it actually look like a clock! This part of the Instructable is more customizable; you can change it up however you like as long as the dials fit on the frame. Note that I didn't have a band saw or any other good circle-cutting tools, so the frame I made is a bit uneven.
Start by selecting a diameter and finding the center point. Before you cut, measure out how far you want the dials to be from the centre of the frame. This is generally easier if you measure the distance between the centers of the frame and the dials. I used 16" for the diameter of the clock and about 7" for the distance between centers.
To make sure the dials are all evenly spaced, draw 3 radial lines at 120 degrees apart from each other. An easy way to find the angle without a protractor is to start with a right angle from one of the lines and find a 30 degree angle past it using a right triangle and some trigonometry: sin(30)=0.5. You can use 2 rulers (etc.) to measure the hypotenuse to your selected radius, then measure a vertical line to the hypotenuse that is half the length of the hypotenuse. (I know that sounds a bit confusing; hopefully the pictures make it a bit easier to understand.)
Once you find the angles, measure out to your selected radius and mark a point for the center points of the dials. Place the dials on those points and trace them out on the board - you can use a single dial instead to avoid getting ink on all the dials. Now draw out another circle for the outer radius of the clock, making sure to leave at least a couple inches between the edge of the dials and the edge of the clock for stability.
Step 11: The Frame: Cutting
Cut out the frame along your selected outer edge. Spinning the board through a band saw or something similar would probably be the best way to do this, but since my band saw wasn't working I used a scroll saw instead; this makes it harder to get a good circle but is relatively easy.
Cut out your traced circles leaving about half an inch of clearance on the inside - this is especially important so that you can actually attach the dials to the frame. For each hole, place the dial underneath the board in your desired final orientation - for mine all the "5" circles are just left of the top-centre line. Mark out on the top side of the board the area directly above the LED holes in the outer rings of the dials, with a little extra space for wires, then cut out the marked area to make space for the LEDs.
You'll also need to drill a hole in the centre for your potentiometer. Drill it just big enough to fit, and countersink it if necessary to get enough of the potentiometer through, although you don't need too much room on the other side. You can also do this part after painting since the knob will likely cover up the marks from the drill.
Step 12: The Frame: Painting
Unfortunately I forgot a few of the pictures for this step, but the process is quite simple. In keeping with the Gallifreyan design style I used a metallic bronze for the frame and metallic gold for the dials, but you can select whichever colours you like. Apply 2 coats to the dials and make sure to get inside the rings. For the frame, apply 2 coats, either one before and one after you're done cutting or both after cutting. While I'm writing this it's still winter, so make sure you let the paint dry at room temperature.
If you didn't already paint the dials you'll probably need to remove the LEDs from the dial before painting. Ideally you should be able to pop the whole assembly out at once, but make sure your connections are intact when you put it back together. Worst case it's not too hard to resolder individual LEDs and wires back into the whole assembly. I'd recommend waiting until after the next step to do this though.
Step 13: The Frame: Attaching the Dials
Add a bit of Gorilla Glue to the rim of the dials and clamp them to the frame until the glue dries. Don't use too much glue as this stuff expands quite a bit. Make sure you arrange the dials on the frame so that the holes in the outer ring line up with the corresponding cuts in the frame. If you need a bit more space for the LEDs, you can use a Dremel/saw/another tool to cut a bit more out of the slots.
Once you have the dials reattached you can reinsert the LED assembly. If you've accidentally broken any leads it's easier to solder them back together once you've put everything in its place.
Step 14: Part 4: Frame Assembly
Now you've finally got everything you need! There's just a few more things to do to get it working. The final assembly is rather straightforward, but it can be time-consuming to get all the wires right. For my clock I added an extra jumper wire to each LED for thoroughness, but for the most part they turned out to be unnecessary except for the dial furthest from the control board.
Start by connecting the LEDs to their corresponding wires on the control board. Place the board between the top two dials for the best fit. You can arrange the wires in such a way that they hold the board towards the frame a bit. I'd recommend using electrical tape rather than the Scotch tape I used in these pictures.
To wire the dials correctly, start by connecting C0 to the middle ring, and then go clockwise (from the back) starting at the line closest to the group of 4 3mm LEDs, wiring the inside pairs first from C1 to C5, then the outside sets of 3 from C6 to C10, and finish with the group of 4 to C11 (the 3rd picture has a better visual explanation). This will make the LEDs cycle counterclockwise; if you'd like them to go around the clock normally (which is what I originally intended, but these take a while to do) just reverse your direction around the circle from the back.
Step 15: The Frame: Hanger, Wire Holders and Dimmer Knob
This last bit is for the most part extra, except the hanger if you're wanting to put it on a wall.
Add a couple screws near the bundles of wire and then zip tie the wires to the screws to keep them from sticking out past the edge of the clock.
For the hanger, add 2 screws to the back of the board above the top dials and tie a taut wire between them if you want to hang the clock on a wall.
And finally, drill a hole in the garden hose plug just big enough to fit onto the potentiometer for the dimmer.
Step 16: The Code
This step is simple enough, but you'll need to use an FTDI cable or adapter to upload code to the Arduino Pro Mini. Just plug it into the header pins on the back of the board and make sure the black wire goes to the black pin and the green wire goes to the green pin... I thought mine was broken for a few minutes until I realized it was plugged in backwards.
As noted in the code, there are two small annoyances I couldn't really work out. Both stem from the fact that the multiplexers require a small delay when switching outputs in order for each of the selected LEDs to be visible to a human's eye. Because of this, the more LEDs that are on at one time, the slower the main loop will run. This is more noticeable later in the day and towards the end of each hour, where you might see a bit of flickering in the lights. It also has the potential to (over a long time) make the clock less accurate (slow). However, the delays I used in the code are all 1 millisecond long, so it would take awhile for the clock to lose even 1 second; and the flickering is usually not slow enough to be bothersome.
Step 17: Conclusion
This project was a great learning experience for me. There are a few things I had to leave out and a few things I had to rush a bit to finish by the end of Christmas break, but overall I think it turned out quite nicely. I hope you enjoyed the guide and I hope I've explained everything well, and if you have any suggestions I'd love to hear more ideas for changes and improvements!
Enjoy your new temporal measurement device, and thanks for reading!