Introduction: World Clock in German Using Arduino

While in Germany last year, I saw a world clock in a store similar to this one in a store that was priced at 900€. I read several instructables online on how to create a World Clock so I decided to give it a shot. I want to thank the following Instructables that I used as a starting point to create mine:

I also want to thank Dee for all the input and advice along the way. This is my first complete Arduino project so please feel free to leave comments or feedback for improving the build. I'll also provide some comments on things I would do differently in the next version.

You can easily follow these steps and make an English (or any other language) version as well. The steps will all be the same, you'll just need to create an English template in Step 2.

Step 1: Ordering Materials

The following list of materials are specific to this project- beyond the standard tools for electronics projects (like solder, a soldering iron, 22 gauge wire). I ordered almost all of the materials from Amazon and Mouser with the exception of the laser-cut lettering board. The laser-cutting board was the part I spent the most time researching as many instructable offer varying alternative methods (such as using printed transparencies). I ended up going with which allows you to upload a vector template file and select your material, dimension and color. They're a little pricey but their customer service was great when I had questions and it shipped quickly even though I didn't order it expedited. Here's the rest of the materials specific to this project that I had to order:

  1. Hardware:
    1. Laser-cut Lettering in Acrylic Board from Ponoko (link) - $30 laser-cutting + $20 shipping
    2. IKEA Ribba Frame 20"x20" (link) - $19.99
    3. Custom cut frame mat (local framing store) - $22.00
    4. 2 x Rubber Foam Weatherseal (link) - $5.14
  2. Electronics:
    1. Arduino Uno R3 (link) - $25
    2. SainSmart Tiny RTC I2C DS1307 AT24C32 24C32 memory Real Time Clock Module for Arduino (link) - $6.20
    3. 5 Meter Flexible LED Light Strip with 300xSMD3528 and Adhesive Back, 12 Volt (link) - $11.77

    4. 110VAC to 12VDC 24W LED Power Adapter (link) - $9.99

    5. 3 x Addicore 74HC595 8-bit Shift Register 16-pin (link) - $5.10

    6. 3 x Darlington Transistor Arrays ULN2803A 18-pin (link) - $3.06

    7. Component Sockets for 74HC595 Shift Registers & ULN2803A Transistor Arrays (link & link) - $2.22

    8. Prototype Stripe Board (link) - $2.00

Overall, the hardware total was close $100 and the electronics total was around $66. Still under the original.

Step 2: Designing the Laser-cut Board

To build the template, I tested out the layout of the lettering. I then downloaded the free open source vector editing software InkScape (Win/Linux/Mac link) and the vector template provided by to create the my design. They have How-To videos that explain how to create a template.

A quick note about fonts- I google searched "stencil fonts" and after browsing and testing out several, I ended up deciding upon the free "Stardos Stencil" on Google Fonts (link). Make sure you choose a font that will maintain shape after cutting; specifically that interior parts of letters with closed loops (letters like Q, R, O, P, A, D, B) will persist and not break off.

The attaced .svg file was my final version that I uploaded to their site. After uploading, I then selected the following options:

  • Material: Acrylic
  • Color: Black
  • Size: 15"x15"
  • Depth: 9mm*

*Regarding the Depth, I select 9mm, but in the future would probably select 5.6mm which is $13 cheaper.

Once the laser-cut acrylic board arrived, I punched out all the lettering but left the protective paper on. I kept the paper on through the entire build to ensure the acrylic would not get scratched or damaged.

Step 3: Building the LED Light Array

With the laser-cut board ready, I then proceeded with building the LED lighting array. I used a piece of cardboard cut to the same size as the laser-cut board as the base to attach the LED light strips. I lined up the laser-cut board with the cardboard and punched tiny holes with a pen into the cardboard through the letter holes. I used those holes punched as temporary markers and then wrote the corresponding letter over the punched hole on the cardboard. This was to ensure the LED lights would line up appropriately with the laser-cut board.

Using the LED spool I purchased from Amazon, I cut sections of the the LED strip to size. The LED strips come with built-in resistors on each strip section so you don't need to add resistors. The downside to these LED strips is they are extremely difficult to solder. I found some videos on YouTube that explain best practices for soldering to LED strips- short version is you want to heat up the contact on the LED strip and wire and then apply the solder. Sounds easy but it's a lot of work.

After soldering wire to the LED strips, I punched a hole through the cardboard and ran the wires through the back. I then pulled back the adhesive backing to the LED strip and stuck it in place to the cardboard.

You will want to run all the LED strips to a single positive voltage wire (or rail). You'll turn on the LED lights by grounding the circuits you want turned on (aka "sinking current") but I'll go into this in more detail in the next step.

Next, I sectioned off the LED lights with weather stripping from Home Depot (thanks to my brother, Robby, for this idea). This ensures that light will not bleed over to other letters. It was way more effective and easy to work with than cardboard strips that I was going to try.

**IMPORTANT NOTE ABOUT LED VOLTAGE: The LED lights I purchased are extremely bright and require 12V. The Arduino only outputs 5V by default, like when powered by USB. That being said, you can get 12V output from the Arduino by using a 12V adapter. You'll get 12V from the VIN port on the Arduino and will also get 5V through the 5V ports (which is very helpful). If you can, try to buy 5V LED strips if possible because 12V is extremely bright.

Step 4: Building the PCB

Using one of the Prototype Stripe Boards, I began to layout my circuit on the board. Because I have 24 LED lights to light up, I decided I had to use three 8-bit Shift Registers connected directly to three Darlington Transistor Arrays.

Here's a quick summary of how the 74HC595 Shift Registers work:

  1. Because the Arduino has a limited number of digital output pins, you must you Shift Registers to increase the number of digital outputs.
  2. Basically, you send 8 data bits (like 01101100) out a single pin of the Arduino to the Shift Register. Each bit corresponds to one of the 8 ports on the Shift Register and determines whether to turn it on or off.
  3. You can also daisy-chain Shift Registers together and, in my example, I send 24 bits out at once (like 01101100 01010000 11001100) from the Arduino. The bits get pushed out the first Shift Register and into the next and so on.
  4. To send bits to the Shift Register or many Shift Registers from the Arduino, you must use 3 digital pins on the Arduino. One for data (as mentioned) and then one for the clock and latch (which handle timing to send the data).
  5. To daisy chain, you re-use the clock and latch connections to the additional Shift Registers. Data, however, has a separate output on the Shift Register to connect to the next Shift Register's data input.
  6. Arduino's website has a great tutorial for more details on 74HC595 Shift Registers (link).

The downside to using 12V LED strips is that the Arduino only outputs 5V from the Shift Registers. For this reason, you must increase the voltage to 12V otherwise the LED strips will not light up. To increase voltage, you must use a transistor, or specifically a transistor array to increase voltage to multiple connections.

I went with the ULN2803A Darlington Transistor Array and the inputs line up with the output of each 74HC595 Shift Register. The ULN2803A took a little longer to understand so hopefully this will clarify for you:

Here's a quick summary of how the ULN2803A Darlington Transistor Arrays work:

  1. The Transistor Arrays have 8 corresponding inputs and outputs and when you supply a positive voltage to the input (ie a "1" from the Shift Register) then you kind-of "turn on" the output.
  2. The being said, the Transistor Arrays only SINK CURRENT on the output pins. What this mean is that the Transistor Array will complete a circuit and GROUND whatever is connected to it's output pin (sounds a little backwards but stay with me).
  3. For all 24 LED strips, I had them connected directly to a single +12V source all the time (aka "positive voltage rail").
  4. Then every LED strip's GROUND wire was connected to each of the outputs from the Transistor Arrays.
  5. When Transistor Array's input went positive, it told the corresponding output to complete the LED's circuit and then grounded the connection (hence it "sinks current" to ground instead of "sourcing current").
  6. Here's a great blog post that helped me understand (link).

Step 5: Getting Time From the Real Time Clock (RTC)

I used a $6 Real Time Clock (DS1307RTC) from Amazon to store the time even when the Arduino is without power. It's easy to set and get time from using the pre-written libraries.

PJRC has a link to download the DS1307RTC library (link) and the Time library (link) along with example code and list of the function calls to the libraries. It's very easy to use and I started with basic examples of just reading and setting the time on the clock chip. Download the both libraries and import them into Arduino software (Sketch -> Import Library... -> Add Library).

The RTC chip I used required only +5V, GND, and two analog connections to the Arduino. In the diagram above, the upper part shows the RTC along with it's connections.

Step 6: Writing the Code

I wrote the code in incremental stages. I started with reading time from the Real Time Clock (RTC) and displaying it in Arduino's serial output window. Remember, you MUST have the DS1307RTC and the Time library from the previous step loaded into your Arduino environment.

Next, I created three bytes, one for each shift register, and every bit is mapped to a specific LED light:

byte registerByte1 = 0;           // 0 ES IST | 1 FUNF  | 2 ACHT | 3 VIERTEL | 4 DREI  | 5 ZEHN | 6 UND  | 7 ZWANZIG

byte registerByte2 = 0; // 0 VOR | 1 NACH | 2 HALB | 3 FUNF | 4 EIN | 5 NEUN | 6 ZWEI | 7 DREI
byte registerByte3 = 0; // 0 VIER | 1 SECHS | 2 ACHT | 3 SIEBEN | 4 ZWOLF | 5 ZEHN | 6 ELF | 7 UHR

I then turn on or off the specific bits using Arduino's bitSet() function. For example, to turn on registerByte1's last bit, ZWANZIG (twenty), I would use this:

bitSet(registerByte1,7);	// Set registerByte1's seventh bit to ON (1) for ZWANZIG

I created a large If / Then structure to set the correct registerBytes to the correct on/off positions based on the time from the RTC. Once all the registerBytes were set correctly, I would then push them out by calling updateShiftRegisters():

void updateShiftRegisters()
{ digitalWrite(LATCH, LOW); shiftOut(DATA, CLOCK, MSBFIRST, registerByte3); shiftOut(DATA, CLOCK, MSBFIRST, registerByte2); shiftOut(DATA, CLOCK, MSBFIRST, registerByte1); digitalWrite(LATCH, HIGH); }

Attached is my code. It could definitely be optimized but runs correctly without issues.

Step 7: Putting It All Together

I placed the store-cut mat into the frame, trimmed off the excess and then tapped down the laser-cut lettering board. I added another layer of plastic to help diffuse the super bright LED lights (again, try to get 5V LEDs instead of 12V).

Next, I attached my LED array with the circuit board to the frame. There was just enough room for the circuit board and Arduino at the bottom of the frame.

Warning about Soldering: When I was bending the wires to get the circuit board to fit in the frame, most of my soldered connections broke from the circuit board. It was a headache. I'd highly suggest you use a ribbon cable and solder a ribbon cable port to the circuit board. This would allow for better flexibility when installing all the parts.

In the photos I'm using masking tape just for staging and to make sure all the light line up properly. I then used heavy duty tape to make sure everything would stay in place. I also added cardboard spacers to make sure everything stayed in place.

In the last photo, you can see a shot with all the words lit up (except for one). I wrote a test program that would turn on all the LED strips to show if any of the connections were broken. And as you can see from the example, the top-right word "fünf" (five) was loose from the circuit board.

Step 8: Finishing Touches

As you may have seen from my hand-drawn wiring diagram, I am planning on adding buttons to change the minute and hour. This is a simple addition that requires 5V, GND, and an Arduino digital input for each button.

Most of the pictures show blurry lettering due to my camera not focusing on the light. In reality, the lettering is very sharp and looks great in both daylight and in the dark.

Good luck with your project. Feel free to leave feedback or ask questions- I'll try to help out.