Introduction: LED - Mega Clock
LED - Mega Clock
Step 1: Bill of Material (All You Will Need)
For the Housing
- Three 300x300mm x 3mm thickness Acrylic glass (black)
- One 300x300mm x 3mm thickness Acrylic glass (trasparent)
- Acrylic glass adhesive and polish
- Twenty 15mm spacers M3 thread
- Twenty M3 screws + washers
- One 300x300 picture frame
For the Electronic
- 480 3mm LEDs (color of your choice)
- Sixty 120 Ω resistors
- One 4-Digit 7-Segment Display common anode
- Eight 74HC595 Shift Registers
- Eight BD139 NPN Transistors
- One Arduino ATMEGA 2560 Board
- One TLC5940
- 1m RGB-LED-Strip
- One LM317 voltage regulator
- One 0.1μF capacitor
- One 1μF capacitor
- One 1 kΩ resistor
- One 330 Ω resistor
- One 2.5 mm DC Jack
- Ribbon Cable
- Header Strips
- One I2C RTC DS1307 AT24C32 Real Time Clock Module For Arduino Mega2560
- Lot of Copper Wire and tin solder
- Eight 750 Ohm Resistors
- Four circuit strip boards
- One 12V 1A Powersupply or one 11,1 1000-2000mAh Lipo rechargeable battery
Step 2: Building the Housing (Part1)
- Cut and drill the 3mm acrylic plates as shown in the sketch
- Glue front housing plate (black plate), bonding part (transparent plate) and LEDs slice plate (black plate) together
Step 3: Building the Housing (Part2)
- Glue one 300x300mm 3mm thickness acrylic plate to the back paperboard of the picture frame for more stability, if the picture frame has a glass you can take it out, we dont need it
- Screew four 15mm spacers to the acrylic plate like shown in the pictures
- Now you can glue the four spacers from one side of the picture frame to the front plate (tip scratch the plate first before gluing the spacers, they will fix better)
- Unscrew the glued four spacers for the next step
Step 4: Inserting LEDs to the Front Plate
- First insert the 3mm LEDs in the first row of the drilled plate (first 60 LEDs)
- Bend the anodes to the side and solder the cathodes arround the plate together with 0.8mm copper wire
- Repeat this for the other 7 rows
- Now solder anodes of the same column together
- You should have a matrix of 8 rows (cathodes) and 60 columns (anodes)
Step 5: Soldering the Matrix Together
- Solder one 8-pol cable connector to the 8 rows (cathodes) of the matrix
- Solder eight 8-pol cable connectors to the 60 columns (anodes) of the matrix. I have used 8-pol connectors now I have 64 cables available but we only need 60, on the left four I put rubber tape. You can also do best and use seven 8-pol connectors an one 4-pol connector so you have exact 60 connections
Step 6: Inserting the 4-Digit 7-Segment Display
- Cut the LEDs Slice plate at the center and glue the 4-Digit 7-Segment display (tip solder wires to the display before glueing the display)
- I had to scratch the back side of the plate and glued the spacers again, because it was not realy fixed like I mentioned before
Step 7: Building the Electronic
- Cut the circuit stripboards so the fit inside the picture frame
- You will need some connectors you can built your owns like I made
Step 8: Building the Electronic and Code Explanation
Here is the complete circuit and the code
I put also a 11,1V 1000mAh Lipo rechargeable battery so I can power the clock without external DC cable.
Code explanation:
After connecting all the electronic downloading the zip 3 zip-Files one is the code an the others are the libraries.
First you have to put both libraries folders for TLCs and RTC-Module into your arduino library folder otherwise you will get error when opening the code, or you can also download the libraries from the arduino site.
The code include 3 folders:
The SetTime Folder with SetTime.ino: use this file to set the time manually for your RTC-Module for the first time, for this you have to change the byte variables in the setDateTime() function with your local Time, then load this code to your arduino and the RTC-Module will store your local Time, you only have to do this the first time to set the time or if you change the battery of your RTC-Module. The TestTimeFolder with
TestTime.ino: use this only to check if the RTC-Module stored the correct time, load this code and open the serial monitor to check it.
The LED_Mega_Clock Folder: with 6 files, all this 6 files have to be in the same Folder, open only LED_Mega_Clock.ino and you'll get all 6 files in different Taps.
- "LED_Mega_Clock Tap": here is the setup for the pins and definition of global variables and arrays for the registers and the loop() function. I have made 3 functions in the "programs Tab" with 3 different animations choose one of them and put it into the loop function.
- "RTC Tab": here is the setup of the RTC you don't really need to edit this tab but for more information visit arduino site. Here I made the function checkTime() to begin transition between RTC-Module and arduino. I use this before each animation and also don't forget to read the time before the animation and convert this binary coded data to normal decimal with the byte bcdToDec() function I made. For example: int second = bcdToDec(Wire.read()); "RGB_LED_Strip Tap": here I made 2 functions one that change the whole color-spectrum from red to magenta very 20 min and one that change each color every second use PWM outputs of your arduino to do this. you can make your own functions.
- "blue_LEDs Tap": here I made 3 functions using multiplexing one to set the blue LED-Matrix with second, minute, and hour indicator the other do the same but with a swinging point from right to left as second indicator. and the shift() function to shift data. You can make your own animations.
How to shift data: http://arduino.cc/en/tutorial/ShiftOut
- digit_display Tap: here are 3 functions one to set the the digits (anodes or arduino pins defined in the CA [ ] array in the "LED_Mega_Clock Tap") one to set the segments (cathodes or TLC pins to sink the current to GND ) and one to reset the TLC That means you have 4 digits that you set high or low with your arduino pins and 7 segments in each digit that you set high or low with the TLC using Multiplexing. How to use the TLC library: http://arduino.cc/en/tutorial/ShiftOut
You can optimise the clock for example by connecting a Foto-Resistor in the circuit to automatically controll the lightness of the clock depending on the ambient light of your room, or you can use a 10k Potentiometer to control the brightness manually.
You can also insert a button to switch betteew different programs or put another LED Strip inside the clock to illuminate the transparent Plastic Part in the front panel.

Participated in the
Make it Glow!
42 Comments
Question 1 year ago on Step 1
i cant understant what code is for arduino nano circuit shematic pdf . con you help me?
i need to make it with just arduino nano.
Answer 1 year ago
Hi, you need arduino mega for this project
5 years ago
In the past I was able to get to a higher resolution image of the circuit schematics, but now I don't seem to be able to. Can you upload a high res version of the schematic so I can see the details in it. Thanks :)
Reply 3 years ago
Schematics are nor in higher resolution sorry for the delay
4 years ago
I really like to build this Mega Clock but I cannot see the circuit schematics, Can you upload a higher resolution image of the schematics please. Thanks
Reply 3 years ago
Schematics are nor in higher resolution sorry for the delay
Question 5 years ago
In the LED_MEGA CLOCK program, in the void loop, what do I have to put in information for the program to work?
5 years ago
Problem (1)
You have mentioned below mentioned arduino mega pin for shift register
int dataPin = 2; // The Serial Data Pin to the Shift Register
int latchPin = 3; // The Latch Pin to the Shift Register
int clockPin = 4 ; // The Clock Pin to the Shift Register
while you have mentioned arduino mega pin no. 47 89 49 for shift register in schematic.
Problem (2)
arduino mega's pin 9,11,12, 51 & 52 are not mentioned in the arduino code.
Is it ok ??
Plz help
With Regards
Mahendra Yadav
Reply 5 years ago
Problem 1:
int dataPin = 48; // The Serial Data Pin to the Shift Register ||| 74hc595(pin 14) ||| Mega (pin D48)
int latchPin = 47; // The Latch Pin to the Shift Register ||| 74hc595(pin 12) D47
int clockPin = 49 ; // The Clock Pin to the Shift Register ||| 74hc595(pin11 )D49
Problem2 :
The Pins (PinOuts) of the TLC5940 are defined in the file \\ libraries \ Tlc5940 \ pinouts \ Arduino_Mega.h
I hope I have been helpful, forgive my English. Greetings
5 years ago
Is there a hires version of the schematic for this project?
6 years ago
Hello,
I have everything ready for your clock. I tested your software and it works great. But before I build the ectual thing I test every elecronic peace on a breadboard. Everything works, the led strip, the time hands, the power supply etc. There is but one problem. The digits assembled to the TLC5940 flicker. I have tried the following things:
1) I changed the software where i tried to change the interval. Changing it in number 20 the displays refresh each after another.
2) I have tried to use several digits (CA) but nothing changed.
3) I bought a TLC5940 break-out board from sparkfun but this gives all the digits to light op at once (so all the digits are 8). But no flickering.
What am I doing wrong? Do you have an idea? It would be great if I could solve this, because this is the only thing that keeps me from starting.
Thank you.
Emil Bakker
6 years ago
Hello, I assembled Watch Led Mega Clock, everything works, but the hour hand is not short. Tell me what's wrong?
8 years ago on Introduction
How do you set the date and time.thanks.also can i use a arduino duemelonave..thanks.
Reply 8 years ago on Introduction
setting time is described in step 8
If it has enough outputs u can use it
Reply 8 years ago
Thank you for your reply.also I'm trying to compile it but I just can't.what do I do.
8 years ago on Introduction
how do i compile.i get errors..
8 years ago on Introduction
Hello ur Part list is different to the wiring diagram.
In Part list stand 1 x 1k Ohm and in the diagram is it 8 x 1k Ohm from it.
In Part list stand 8 x 750 Ohm and in Diagram is it 10k Ohm
What is right?
Reply 8 years ago on Introduction
Hello take the diagram, maybe I forgot some parts in the bill of material
Reply 8 years ago on Introduction
Ok Big thanks and have a nice day !!!
8 years ago on Step 8
Really, really good ! Fantastic !
Congratulations,
Luís Antonio