DIY Digital Clock From Scratch




In some point in the existence of each gadgets hobbyist the need to make a clock, however in those days I didn't have the correct devices, parts and information to do something like this.


Be that as it may, presently I got all the things I didn't have in those days and I was prepared to make my first advanced clock, and with all the LEDs I had left over from my 8x8x8 LED shape project I chose to make my own uniquely LED clock. 


So go along with me and assemble your own exceptionally LED advanced clock.


Step 1: Apparatus Required

Here are the tools you will need to make this:

1) Soldering Iron.

2) Solder wire.

3) Small needle nose plier

4) Cuter

5) Wire stripe


Now here are the parts needed to make the clock:

1) 130 LEDs.

2) 15 2N4401 transistors.

3) 20 1K resistors.

4) 10 resistors [150Ohms]

5) DS1307 real time clock IC.

6) one coin cell battery holder.

7) 4 Tact switches.

8) Prefboard

9) ATMega328 with arduino bootloader.

10) 7805 voltage regulator.

11) 16MHz crystal.

12) two 22pF caps.

13) 28 pin IC socket for the ATMega328.

14)10 uF cap.

15)0.1 uF cap.

16) 4017 counter

17) 32.768KHz crystal


Step 2: Procedure 

The clock is made of six seven segment displays which make up the display.
Each digit made of seven segments and every segment made of 3 LEDs in parallel.
So a simple calculation gives that there are 21 LEDs in each seven segment display.
And all six digits take 126 LEDs.
But as I said In the parts list you will need 130 LEDs and the other 4 LEDs are going to be used as dots that separate the hours, minutes and the seconds.
I made a common cathode display which means the all the negatives leads are connected together.

Now you will need to choose the right resistor for current limiting to 3 LEDs in parallel.
The calculation is simple and goes like this :
R=(Vcc-Vled)/(Iled*3)
R= the resistor value
Vcc = The voltage that is supplied
Vled = the forward voltage on the LED
Iled =the current the LED takes

You should always take a value a little bit bigger then the one in your calculation just to be on the safe side.


 How It Works?

This kind of display calls for a large amount of pins to power it out so a special technique is needed.
I used multiplexing.
Multiplexing works by switching between the digits one by one very fast and by so creating a illusion that all of the displays are working in the same time.
This works by connecting each segment to the same one on a different digit  and by so you will have only seven segments that are all the same for all the digits.
And you can choose what digit you want to power by connecting the negative leads of the display to ground and sending the data to the positive segment leads.

The scanning of the display is accomplished by the 4017  decade counter because I wanted to save some pins on the arduino, to control it you will need just 2 arduino pins.
The 4017 connects the grounds one by one and by so it scan the display.

Comments