loading
Picture of My Arduino Binary Clock
DSC_0081.JPG
DSC_0087.JPG
Hi from Italy
Although many watches are created binary, my project was inspired mainly to this:
http:// http://www.instructables.com/id/LED-Binary-Clock-1/, very smart and funny.
I tried to improve the design and to add something personal.
I think it's a good result at the end.
The project is not difficult, requires patience, it requires a little knowledge of electronics and the use of Arduino.

Ok, check out the video and if you like it lets start!

 
Remove these adsRemove these ads by Signing Up

Step 1: List of materials

-n.1 IKEA frame called "Ribba" 13x18 cm
-LED to mark hours and minutes (You have seen the first images of the LEDs that there are different colors, but of course you can change them as you like, now is the reference of the project.):
n.8 green 5 mm
n.3 red 5mm
n.2 yellow 5 mm
-LED to light the words "Hours Minutes"
n.7 white 5mm
-LED to light the numbers 1/2/4/8
n.4 pink 5mm
-LED to light the words "binary clock"
n.4 pink 3 mm
-n.24 Resistor 220 ohm (for 5mm led)
-n.4 Resistor 150 ohm (for 3mm led)
-Cartonboard thicker to make LED holder
(we will Insert the cartonboard between the glass and the bottom of the frame supporting)
-Some acetate (4-5) sheets (for inkjet or laserprint) to create the mask
-a flat wire 26 wire
-3 micro button to set hours and minutes and on/off
-A small piece of prototyping PCB to make the shield (see later)
-Some double strip
-n.1 Arduino Uno/2009 or clone or self made. I've used one Luigino assembled by me
-Power supply 6V 500ma or other Arduino compatible.

Step 2: Goals

Picture of Goals
DSC_0045.JPG
At the beginning we try to understand how reading the time, I think it's important to understand the electronic connections.

The first two columns correspond to the hours, the third and fourth to the minutes.

The first column are the units of hours and the second the tens, the same thing for minutes.

For each column must add the corresponding value (displayed on the right with the numbers 1-2-4-8) and reading the following you have the time in 24h format.

It 'very simple, we take the example of the first photo you see above:
HOURS
-first yellow spot= 10
-3 green spot= 7 (4+2+1)
MINUTES
-first and third red spot= 50 (40+10)
-2 green spot= 5 (4+1)
So , 17:55 ok?

So we have to create a set of LEDs to display the time in this way, the circuit and the program will be managed by Arduino.

The remaining lights (Hours, Minutes, 1/2/3/4, binary clock) are embellishment for the clock (also improve the general understanding) but still managed by Arduino.

Step 3: Schematic

Picture of Schematic
This is the pattern that we must achieve.

ALL LEDS ARE CONNECTED TO A DIGITAL PIN BY ARDUINO
ALL MICRO BUTTONS ARE CONNECTED TO A ANALOG PIN BY ARDUINO

All LEDs who rule the time are connected with the cathode (negative -short leg) and a 220 ohm resistor to digital pin, all the anodes (positive-long leg) are connected together with 5v by Arduino. (see photos in the next step)

All LEDs embellishment (words "Hours / Minutes / BinaryClock") are connected in parallel and that all the anodes are connected together with a resistor and goes to the PIN 0 (see photos in the next step), all the cathodes are connected together and go to the GND

The micro buttons are connected to one side to the Analog pin and the other side to GND.

More precisely (see the schematic picture):

LED1-LED2-LED3-LED4 to ARDUINO DIGITALS PIN1-PIN2-PIN3-PIN4
units of Minutes

LED5-LED6-LED7 to ARDUINO DIGITALS PIN5-PIN6-PIN7
tens of Minutes

LED8-LED9-LED10-LED11 to ARDUINO DIGITALS PIN8-PIN9-PIN10-PIN11
units on Hours

LED12-LED13 to ARDUINO DIGITALS PIN12-PIN13
tens of Hours

LED14/LED15/LED16/LED17/LED18/LED19/LED20/LED21/LED22/LED23/LED24/LED25/LED26/LED27/LED28
to ARDUINO DIGITAL PIN 0 (all toghether)


MICRO BUTTON
As you read above we will have 3 micro button.
1th Button will change minutes, adding one for each time you press it. ANALOG PIN 0
2th Button will change hours, adding one for each time you press it. ANALOG PIN 5
3th Button (optional) will turn ON/OFF the clock LEDs, but keep counting the time. ANALOG PIN 4

Step 4: Lets start the constructions

Lets see the pictures in sequence

-Cut the cardboard exactly the same size of the interior of the frame.
-Printed on a sheet of paper the positive mask (as does the attached file), this will help you make the holes in exactly the desired position.
-Attach the sheet printed in a positive view at the center of the frame considering the white passepartout of the IKEA frame.
-Make a hole for each LED you need to installI, i've used a a drill with a bit of 5mm for all LED except those that make up the word "BINARY CLOCK" where i've used a bit of 3 mm.
Always test the operation of the LED before proceeding with the next

SOLDERING POSITION OF THE LEDS THAT RULES THE CLOCK

-As shown in the picture, bend down the anode and up/bended left the cathode.
-Trip leaving 2-3 mm the cathodes and the 220 ohm resistor and sold it toghether.

SOLDERING POSITION OF THE SECONDARY LEDS
-For these LEDs you can find the layout you like best, the important thing, as explained in a previous step, is to cut a portion of the anodes and solder one 220 or 150 ohm (depends the led size) resistor, the goal is to have all the LEDs in parallel connection, all the anodes soldered together, and all the cathodes soldered together.
All the secondary lights are switched on simultaneously.

Write on the cardboard the number of each pin and the words, it will help to sold the wires later

Add some buffles to prevent the light from bleeding between words and number.
Cut the buffles about 1 cm hight, the goal is to have enough space for the wires and the back of the frame.
I've used hot melt glue to do attach these.

Step 5: Connect the wires

Picture of Connect the wires
DSC_0060.JPG
I've used a flat wire of 26 wires removed to an old computer.

You need 23 wires for this project, I chose this solution for comfort but of course you can use a single wire for each pin or group.

Be careful to count in sequence to connect the wires on the right LED, wire 1 on LED1 to Pin 1, wire 2 on LED2 to Pin 2 and so on.

Let the last wire (6) to connect the micro buttons on the left (see in later)

Add some separators with rubber adhesives, cutting them (adjust the height) so that the back of the frame is perfectly suited to the edge (see the pictures later)

Step 6: Insert the mask

Picture of Insert the mask
Print the attached picture (negative) on a lucid (acetate) paper with a Laser print (better) or Ink Jet printer .

Cut out the attached picture (negative) leaving 0.5 mm for side and place on the passepartout of the frame with some piece of adhesive tape.
Make the first tests of illuminating LEDs to get the perfect alignment with the mask.

For a better spread of light and have a solid black I have three layers overlapped acetate, at the end I put a layer of gray and a white matt for better light diffusion.

Step 7: Layout

Picture of Layout
BinaryClock5.jpg

Step 8: Create the Arduino shield

Picture of Create the Arduino shield
DSC_0063.JPG
DSC_0064.JPG
DSC_0062.JPG
DSC_0065.JPG
DSC_0067.JPG
If you want you can buy a card that is already ready, but it is very simple and useful to make it at home.

Cut a piece of prototyping PCB exactly the width of the pins on the card.

Sold only the strips those that correspond exactly to the pins we're going to use: Pin0 to Pin13- Analog 0-4-5- 5v- GND

The position of the pins can change, depending on the card we're going to use, Arduino, Luigino and so on, but the goal is clear.

Once you have made the shield, you will have more space to sold each wire on the corresponding pin.

Will also be much more convenient to leave the Arduino connected on the back (see later) only by detaching the shield if you do the maintenance in.

Go on!

Step 9: Connect the micro buttons

As you have read, the micro button are 3:
-set hours
-set minutes
-set on/off light (but the clock goes on) (optional)

Choose the location of the buttons, personally I preferred the one you see in the picture for a better use and arrangement of internal wires.

The buttons are of 6 mm square, draw a picture in trackbacks for precise positioning.

Drilled in the center with a 4 mm tip of the squares drawn.

Use a little square file and patience, it is better to close that hole too wide, go step by step and try the size.

When the buttons are positioned solder the wires as explained in the previous step

Cover with hot glue the buttons to prevent from leaving the site and protect the solder joints.

Step 10: Place the Arduino

Picture of Place the Arduino
DSC_0003.JPG
DSC_0004.JPG
Make four holes on the back of the frame pannel to match up the card, and fastened with screws and little bolts under the frame stand.

Step 11: Upload the sketch

The method can be different, depending if you use an Arduino (USB), Luigino (I removed the chip and I programmed with another arduino), and so on, but this is another instructables..

Thanks for watching
Clapoti made it!2 months ago

I finally made it... with some small modifications, and I credited your Instructable.

http://www.instructables.com/id/Arduino-Binary-Clock-2/

IMG_20150513_220115.jpgIMG_20150520_155909.jpgIMG_20150520_173247.jpgIMG_20150521_192533.jpg
Cello62 (author)  Clapoti2 months ago
Great job! Very nice. Thanks for sharing
FariidaY5 months ago

I am trying to do a simulation before making this to make sure I am doing it right, but the leds keep blinking no matter what I do. Right now I don't have the hour and min leds given that they really don't need coding. http://123d.circuits.io/circuits/559138-binary-met... Just click "start simulation"

SebastianB28 months ago

I made it after your good instruction. I made also a small circuit for the atmega 328. I soldered the led the other way, cathode (negative -short leg) to GND and the anodes (positive-long leg) to the to digital pins, didn’t read carefully, so I had to switch digitalWrite in the sketch.

P1040378.JPGP1040377.JPGP1040376.JPG
msimonaƶƶi9 months ago
Grazie. gentilissimo! E complimenti per i tuoi progetti di orologi. Sono bellissimi.
msimonaƶƶi9 months ago
ciao, non mi è chiaro"a layer of gray and a white matt" te lo chiedo in italiano perché in inglese non ho capito :-(.
Sono due ulteriori strati? Quello bianco è la carta da disegno opaca, mentre quello grigio?
grazie
Cello62 (author)  msimonaƶƶi9 months ago
Ciao
In sostanza devi fare in modo di evitare che la luce dei led si "diffonda" e si concentri solamente solo sulla lettera da illuminare. Per ottenere questo io ho adottato del bianco opaco, che limita la diffusione, e uno o più strati di grigio che smorzano l'intensità, fai le prove comunque. A presto
livoyema3 years ago
that is really beatiful, I made it, but I have some problems with the software. effectively, my clock is low, I lost 7minutes in 3days! have you a solution? have you modified the soft? thx for all
RickyO1 livoyema10 months ago

The loop is losing time. Imaging that lastTick is on 901 and the next loop() doesn't come around for 101 ms, then you'll be at 1002ms by the time you reach the if condition. What happens to the 2ms? They are lost. It can be even worse; you are at 999ms and the next time takes 101ms, you would end up at 1100ms, losing a whole 100ms!

Also, since you are calling millis(); twice in the original, there is a chance that the second call is further forward than the first comparison.

Try this fix:

int temp = millis();
if (temp - lastTick >= 1000) {
lasteTick = temp;
second++;
}

Clapoti livoyema10 months ago

I saw online that when creating a clock this is "normal" because of voltage difference and things like that... there is a "Real Time Clock" module that exists that makes sure that the time stays accurate, I don't know how it works exactly, but it could fix your problem... but hopefully you fixed your problem in the last 2 years ;)

Cello62 (author)  livoyema3 years ago
Hi
Ty for reply
No, i'm sorry, as explained there is a version 12 hours and at 24, I used the version in 24 hours and is perfect.
Sometimes there can be problems if there are changes in Arduino voltage double check if the power supply is ok.
Thx for responding so fast!
My power supply is 12V for my arduino, but I don't know how it can be the problem?
you have no delay problems on yours?
excuse me, I'm french, and my english is not fluent!
May be I can see inside the following boucle to send lasTick by serial port.
"if (millis() - lastTick >= 1000) {
lastTick = millis();
second++;"
Like that, I'll see if it is really 1000 between two values.
Cello62 (author)  livoyema3 years ago
>>Thx for responding so fast!
I'm in Italy, yours email comes faster here....;-)

>>you have no delay problems on yours?
No, i'm sry
I told you about power supply is important because it is stabilized by 7 to 12 volts, power surges can cause delays.

Elec22032 years ago
Great, it looks like a bought clock
sibi.20093 years ago
Can u explain about micro switch connection between led and arduino
Cello62 (author)  sibi.20093 years ago
Hi
All i think has explained above. What isn't clear? All the micro switch have two pin, one is connected to an Analog pin of Arduino (see what) and one to GND. If you have a question again let me know. Thanks
Regards
ok ok thanks.......i also have problem with opening the code file
Cello62 (author)  sibi.20093 years ago
Is a web site problem, if you have installed Arduino IDE correctly try to rename the file as .ino or .pde , the last methods is to copy and past the text into an arduino clear sketch
Regards
thanks for your help problem has been solved
Whether v need to connect the switch with pull down resistor as given in this page

http://arduino.cc/it/Tutorial/Button
Cello62 (author)  sibi.20093 years ago
not necessary in this case isnt the same like your tutorial
Nice! I can see that you have successfully completed your project.
Cello62 (author)  Emiliano Valencia3 years ago
Yeah
Thanks for the advice, I just tried to do something that is also visually beautiful.
Hey, I built a new version of my clock, be sure to check it out.

http://www.instructables.com/id/LED-Binary-Clock-20/
drj1133 years ago
That is a beautiful rendition of a LED clock - I love the care you have taken in making it.

:-)
Cello62 (author)  drj1133 years ago
Never like yours, I can improve .. thanks
kenyer3 years ago
Really beautiful, and much easier to read than I thought it would.
Cello62 (author)  kenyer3 years ago
Thanks very kind