To build this clock you'll need the following hardware and tools:
- An Arduino Uno or compatible like the Metro 328. You can actually use other Arduinos like the Leonardo, Mega, etc. but you might need to make small changes to the code when using GPS (see the GPS guide and examples).
- A 7-segment LED backpack display. Either the 1.2" (big one, at the top of the photo above) or 0.56" (middle display in image) will work. You could also use a 14-segment quad alphanumeric display, but it doesn't have a colon so it won't make a great clock (but it is great for displaying text or more complex output). The code for this project is made to use the 7-segment display.
- A time source, one of the following:
- The ultimate GPS shield or breakout. If you use GPS then the clock will set itself based on the time from GPS satellites. You'll need to make sure the clock can get a good view of the sky for it to get a GPS fix. You also probably want to add a coin cell battery to the GPS board so that it remembers the time even when it loses the satellite signal.
- A battery-backed real time clock like the DS1307. This is a cheaper option than GPS but it will need to have its time set once ahead of time (then it will remember the time as long as the battery lasts, which is usually many years!). The ChronoDot is another nice real time clock. This guide will show how to use the DS1307. Be aware the DS1307 requires a little more soldering and assembly than the GPS shield or breakout.
- Breadboard and jumper wires.
- An enclosure for the clock--the box your parts arrive in or any other small cardboard box works great. You can get as fancy or as simple as you want with an enclosure. You could even leave everything bare to showcase your work!
- Soldering tools. You'll need to solder the 7-segment display together, and solder the GPS or real time clock module. If you're new to soldering don't worry it's not difficult--with a little patience and practice you'll be a pro in no time. Be sure to read the Adafruit guide to excellent soldering and practice on some spare parts to get the hang of it.
- Power supply for the Arduino. You can plug in any 7-12 volt supply or even a small battery pack to power the clock. I recommend a plug in power supply since the clock won't run for very long on batteries.
Once you have all the parts you'll first need to build the 7-segment display and GPS or real time clock module. Carefully follow the guides for each of these components to assemble and test them:
- Adafruit LED Backpack Guide
- Adafruit Ultimate GPS Breakout Guide
- Adafruit Ultimate GPS Shield Guide
- Adafruit DS1307 Guide
Be sure to check that the basic examples for each component work before you move forward with assembling the clock. It will be much easier to debug issues with each component in isolation instead of when they're assembled into the clock!
Once you're ready to wire up the clock follow the right section below depending on the hardware that you're using, either the GPS or DS1307 real time clock.
GPS Clock Wiring
To build the clock with GPS support wire the components together as shown in the diagram below.
Note that this diagram only shows the ultimate GPS breakout. For the GPS shield ignore all the wires going to the GPS breakout and instead connect the GPS shield to the Arduino and then connect the 7-segment display to the GPS shield/Arduino as shown in the diagram (you might need to solder the wires to the open row of GPIOs next to the GPS shield's headers, or solder stacking headers to the GPS shield).
- Connect Arduino 5V to 7-segment +/VIN power pin and ultimate GPS breakout VIN pin (red wires).
- If using the larger 1.2" 7-segment display connect Arduino 5V to 7-segment IO pin (don't worry the 0.56" display doesn't have this pin).
- Connect Arduino GND to 7-segment -/GND ground pin and ultimate GPS breakout GND pin (black wires).
- Connect Arduino A5 or SCL to 7-segment C/clock pin (yellow wire).
- Connect Arduino A4 or SDA to 7-segment D/data pin (orange wire).
- Connect Arduino D8 to ultimate GPS breakout TX pin (blue wire).
- Connect Arduino D7 to ultimate GPS breakout RX pin (green wire).
Once you've wired everything together it should look something like the following:
Now jump to the software page to learn how to install the software and run the clock sketch.
DS1307 Real Time Clock Wiring
To build the clock with the DS1307 real time clock wire the components together as shown in the diagram below:
- Connect Arduino 5V to 7-segment +/VIN power pin and DS1307 5V pin.
- If using the larger 1.2" 7-segment display connect Arduino 5V to 7-segment IO pin (don't worry the 0.56" display doesn't have this pin).
- Connect Arduino GND to 7-segment -/GND ground pin and DS1307 GND pin.
- Connect Arduino A5 or SCL to 7-segment C/clock pin and DS1307 SCL pin.
- Connect Arduino A4 or SDA to 7-segment D/data pin and DS1307 SDA pin.
Once you've wired everything together it should look something like the following:
Now continue on to the software page to learn how to install the software and run the clock sketch.
Page last edited March 14, 2024
Text editor powered by tinymce.