Introduction: 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)

  1. Cut and drill the 3mm acrylic plates as shown in the sketch
  2. Glue front housing plate (black plate), bonding part (transparent plate) and LEDs slice plate (black plate) together

Step 3: Building the Housing (Part2)

  1. 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
  2. Screew four 15mm spacers to the acrylic plate like shown in the pictures
  3. 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)
  4. Unscrew the glued four spacers for the next step

Step 4: Inserting LEDs to the Front Plate

  1. First insert the 3mm LEDs in the first row of the drilled plate (first 60 LEDs)
  2. Bend the anodes to the side and solder the cathodes arround the plate together with 0.8mm copper wire
  3. Repeat this for the other 7 rows
  4. Now solder anodes of the same column together
  5. You should have a matrix of 8 rows (cathodes) and 60 columns (anodes)

Step 5: Soldering the Matrix Together

  1. Solder one 8-pol cable connector to the 8 rows (cathodes) of the matrix
  2. 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

  1. 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)
  2. 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

  1. Cut the circuit stripboards so the fit inside the picture frame
  2. 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.

Comments

author
emilbakker (author)2017-02-19

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

author
andry25 (author)2016-11-16

Hello, I assembled Watch Led Mega Clock, everything works, but the hour hand is not short. Tell me what's wrong?

author
domdomgin (author)2015-07-18

How do you set the date and time.thanks.also can i use a arduino duemelonave..thanks.

author
Michalsky (author)domdomgin2015-07-19

setting time is described in step 8

If it has enough outputs u can use it

author
domdomgin (author)Michalsky2015-07-19

Thank you for your reply.also I'm trying to compile it but I just can't.what do I do.

author
domdomgin (author)2015-07-19

how do i compile.i get errors..

author
Freakydna (author)2015-06-23

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?

author
Michalsky (author)Freakydna2015-06-24

Hello take the diagram, maybe I forgot some parts in the bill of material

author
Freakydna (author)Michalsky2015-06-25

Ok Big thanks and have a nice day !!!

author
lagsilva (author)2015-03-24

Really, really good ! Fantastic !

Congratulations,

Luís Antonio

author
andrey.vusik.9 (author)2015-01-22

Luxury work! The author is a genius! So much work and time spent. I also want to repeat your invention. Could you please help me. I need drawings acrylic sheets in AutoCad or Solid Works. I would be very grateful !!!

author
Michalsky (author)andrey.vusik.92015-01-23

Hi, nice that you like it.

drawing of the front panel is in the tutorial step 2. This panel is the most important so I made a drawing for this it consist of 3 parts that are glued (front housing plate, bonding part and LEDs slice). But for the the other panels I only made holes for the spacers and a big hole in the center for the wires while making the housing without drawing. You don't really need drawings for the back panel, just glue the spacers in the front panel and drill holes in back panel for the screws.

author
andrey.vusik.9 (author)Michalsky2015-01-26

A friend you got me wrong ... I would like to receive your files with the extension * DWG or similar in order to be able to open the program to the drawings.

author
Lecture (author)2015-01-25

Great work man! I'm building a simple version for myself, but i have a doubt about your schematics, the transistors, the drawing shows 3-1-2, and the emitter is the 2 but, i searched the bd139 and the emitter is the 3... can you help me understand?

20150125_211715.jpg
author
Michalsky (author)Lecture2015-01-25

Hi Thanks,

Here is the datasheet I used

https://www.fairchildsemi.com/datasheets/BD/BD135....

in my schematics there are numbers for the NPN Pins but those doesnt mean the pins in the datasheet. Unfortunatelly this is a default setting of the software Fritzing which I used to design the shematics and I dont know how tho edit those numbers, if you maybe know let me know please, but the symbol is correct use this as reference and take the numbers of the pins from the data sheet

If you find other mistakes let me know please

Your clock looks good too!!!

author
emilbakker (author)2015-01-14

Great clock!!! I have only one question. Do I have to put all the .ino files in one big file and if so, in which order do I have to put them. The electronics will be easyt for me. But the code.... please help!

Thanks and again, my compliments.

author
Michalsky (author)emilbakker2015-01-14

Hi thanks!,

Well I can't explain every single detail in the code because it will be too much but I'll try to summarise ass good as I can.

ok 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://playground.arduino.cc/Learning/TLC5940

ok I know there is a lot of code in this code but I thing now you have lot more information about the it but if I forgot something let me know.

author
ВасилийР made it! (author)2014-12-28
author

looks good well done

author
roanbuma (author)2014-12-16

Nice, but can't see the video in the netherlands, you should change the settings on youtube!

author
Michalsky (author)roanbuma2014-12-17

This is the new link of the same video with music it should work now:

https://www.youtube.com/watch?v=3TqG_ZHDNqA

author
roanbuma (author)Michalsky2014-12-28

Thanks a lot!

author
Michalsky (author)roanbuma2014-12-16

Please let me know if the new link works for you,

otherwise I will upload an extra video without music for you

author
Michalsky (author)roanbuma2014-12-16

Try this other link:

Im not sure if it will work

https://www.youtube.com/watch?v=BkkX4l0qX0M


it is because of the music youtube unfortunately blocks everything that don't have your own music in some countries

author
dbreithupt (author)2014-12-22

Would someone who has no experience with electronics be able to make this?

author
magnuswf (author)2014-12-18

Seriously cool clock! Many hours of programming, I believe :)

BTW. The first video didn't work in Denmark, but the second one did :)

author
Dj Hacker 93 (author)2014-12-16

Video doesn't work (I'm from Italy), could you please upload a version of it without the "indicted" track? =)

author
Michalsky (author)Dj Hacker 932014-12-17

Hi,

I have uploaded an extra version of the same video with the same music "edited"

It should work everywhere

here is the link:

https://www.youtube.com/watch?v=3TqG_ZHDNqA

author
paulindallas (author)2014-12-16

Very impressive and professional looking. I know you spent a lot of time in the design and making of the clock and the Instructable about it. Excellent work.

author
Michalsky (author)paulindallas2014-12-16

thanks!

author
tomatoskins (author)2014-12-15

This is amazing! I love all sorts of clocks! Anything that lights up and tells time is more than awesome!!

author
Michalsky (author)tomatoskins2014-12-16

thanks!

author
SerialQ (author)2014-12-16

Impressive! How long did it take to solder all the LEDs. BTW very good and accurate soldering-work :-)

author
Michalsky (author)SerialQ2014-12-16

about 2 or 3 weeks the complete project :)

About This Instructable

23,476views

219favorites

More by Michalsky:Arduino and Python Serial Communication - Keypad DisplayControl Servos with Arduino and RC Receiver/TransmiterSpace Shuttle Discovery + Booster Rockets
Add instructable to: