Arduino-powered LED Clock




Introduction: Arduino-powered LED Clock

About: Collaborative workspace with digital and traditional fabrication tools, 3D printers, CNC machines, classes, events, and professional consulting services.

A fun, simple LED clock, that will give you the time to the nearest half hour using single-color LEDs. Parts needed are as follows:

  • Arduino Nano
  • 400 tie-point Breadboard
  • Ribbon Cable
  • DS1307 RTC IC
  • 32.768 kHz Crystal
  • (12) 10mm LEDs
  • (12) 180 Ohm resistors
  • (2) 10k Ohm resistors
  • 0.1" spaced, 12 wire ribbon cable, 7" long
  • Jumper wires
  • 18" x 6" 1/8" acrylic

The tools needed for this job are:

  • Laser Cutter
  • Soldering iron, flux, solder
  • Wire cutter
  • Wire stripper
  • Needle-nose pliers
  • Vice (optional)
  • Hot glue gun
  • Arduino IDE installed on a computer

Step 1: Laser-cut Clock Casing

The first thing that needs to be done for this LED clock is to design the clock case! This gives the layout of your LEDs as well as a good housing to use to help keep the assembly very neat and simple. I attached my illustrator file that can be used on a laser cutter with 1/8" acrylic and is designed to snap together.

Step 2: Place LEDs in Holes

The easiest way I have found to assemble this clock is as follows:

  1. Clamp the clock face in a vice and angle it so the engraved side faces downward
  2. Drop the 10 mm LEDs in the back of the clock in each of the 12 holes

Step 3: Solder a Common Anode

Once your LEDs are in the holes, you should notice that on each LED, one lead is longer than the other. The longer of the two leads is called the anode. The laser file was designed with the holes far enough apart that if the anode of each LED is bent to be horizontal, it can reach out to make contact with the anode of the next LED when it is horizontal as well. Bend all of the anodes 90 degrees and lay them out in a circle with all of the anodes touching each other. These leads can now be soldered together, but making sure not to touch these to the cathodes when they are soldered! To solder them, first apply a bit of flux to the joint you are soldering and wet the tip of your iron by melting solder onto it and then scrubbing it off on a brass sponge. Apply the iron to the joint being soldered and then put solder to the joint. The solder will melt and when enough has been applied, remove the solder, and then remove the iron, and the joint should cool and harden.

Step 4: Hot Glue

Once these have all been soldered, apply some hot glue on the bottom of each LED. This should keep the two lead from shorting and should also help prevent the leads from breaking at the base of the light from stress. Once this is done, you can apply a little hot glue to fillet the acrylic with the side of the LEDs to keep them from falling out.

Step 5: Add Current-limiting Resistors

We will now be soldering a current-limiting resistor to the cathode of each LED so that we don't burn out the LEDs when we run our clock! With the wire cutter, snip the cathode to about 3/8" and do the same to both sides of the resistor leads. Hold one lead of the resistor with the needle-nose pliers and solder the other lead to the cathode. Do this for all 12 LEDs.

Step 6: Solder on a Ribbon Cable

Take your 7-inch ribbon cable and separate the wires apart to about halfway down the cable. Strip both ends of the cable as well, exposing about 1/4" on each side. Starting at the LED for 1:00, solder the first wire in the ribbon cable, and follow all the way around the clock with the second wire at 2:00, third wire at 3:00, and so on. Once all the separated wires are soldered, we can take a look at the other end. Separate just the wire connected to 1:00 from the rest of the wires and solder a single pin header to it. Then take the remaining 11 headers and solder them to the 11 exposed wires on the ribbon cable.

Step 7: Attach a Wire to the Common Anode

Here we can just take a jumper wire or any wire that is solid-core and solder it anywhere along the common anode.

Step 8: Set Up Breadboard

  1. Place the Arduino on the breadboard with the Micro-USB port facing out of the board
  2. Set up the RTC circuit
    1. Connect pin 1 of the RTC to pin 2 of the RTC with the crystal (non-polarized, so direction doesn't matter)
    2. Connect pin 3 of RTC to positive terminal of the battery
    3. Connect pin 4 of RTC to negative terminal of battery and ground
    4. Connect pin 5 (SDA) of RTC to pin A4 on the Arduino with a 10k resistor
    5. Connect pin 6 (SCL) of RTC to pin A5 on the Arduino with a 10k resistor
    6. Ignore pin 7 of RTC
    7. Connect pin 8 of RTC to the 5V pin on the Arduino
  3. Plug the wire from the common anode in the 5V pin on the Arduino
  4. Plug the ribbon cable into the Arduino pins 2-12
  5. Plug the stray wire from the 1:00 LED into pin 13 on the Arduino
  6. Connect ground to the ground pin on the Arduino

Step 9: Set Time on RTC

Once the wiring is all set, download these files and go to your Documents > Arduino > libraries and create a folder called DS1307RTC and place all these files in there. Now open Arduino and load the sketch "SetTime". Upload this to your arduino and check in the COM Port that it is printing the correct information.

Step 10: Upload Code to Arduino

Download the Clock code I uploaded and upload it to the Arduino. If everything is wired properly, it will be interpreting the time from the RTC and rounding to the nearest half hour and lighting up the appropriate LEDs. Now that this works, have fun playing with the code and see what else you can make it do! Try adding a minute hand that flashes as it goes around, or turn it into a kitchen timer! The possibilities are endless!

Step 11: Attach Sides and Back Plate

Using the pinch tabs on the side panels attach them to the face plate, with the hole lining up with the Micro-USB port. Grab a more permanent base if you'd like and stick the bottom of the breadboard down to it. Lastly, use the pinch tabs on the other side to attach the back plate, and you are good to go with your Arduino-powered LED clock!

Be the First to Share


    • Big and Small Contest

      Big and Small Contest
    • Make It Bridge

      Make It Bridge
    • For the Home Contest

      For the Home Contest



    6 years ago

    very cool.....
    But how to change time


    6 years ago

    Hi. I have a question.

    I would need that they are all lit LED. as they pass the hours apagen LEDs. example if they are 5 must be lit LED 7.

    this can be done based on this project?

    thank you very much


    Reply 8 years ago on Introduction

    Great tutorial! I love it. Thanks for the time and efforts. :)

    Just a question... What would be neccesary to upgrade the invention with LED minutes? :)

    Thanks! I'm a very rookie ^_^


    Reply 8 years ago on Introduction

    Really enjoy your visits to make with us, Lavon!

    • The Inventor •

    Very neat and great project, but I have a question: why can't we just use an arduino uno to light up each led alone one after the other with time interval of one hour and then loop the code to be fully working clock? And another question, what's the use of the crystal and the ic? Thank you


    Reply 8 years ago on Introduction

    Well the Arduino cannot, by itself, maintain accurate time information. The IC is a Real-Time Clock (RTC) and it is used along with the crystal oscillating at 32.768 kHz to keep perfect time. Thanks to the CR2032 battery, the RTC keeps the time even after the Arduino is unplugged, which prevents the need for reprogramming every time the Arduino loses power. This RTC is accurate at storing the second, minute, hour, day, month, and year. While this clock only displays the time accurate within a half-hour, the code is storing the full time and date data so this Instructable was designed with extra features allowing other makers to take this design and build onto it. For example, using RGB LEDs, you can use different colors for the hour and minute hand and display much more precise data, or an LCD screen can be added to display the date.