Introduction: My Arduino Binary Clock
Although many watches are created binary, my project was inspired mainly to this:
http:// https://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!
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
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
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
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
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
Attachments
Step 8: Create the Arduino Shield
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
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
Attachments
Step 12:

Participated in the
4th Epilog Challenge
37 Comments
20 days ago on Introduction
this instructable made zero sense to me LOL
Reply 20 days ago
Open your mind and find a sense.
6 years ago
how can I add second
7 years ago
I built your clock and it worked perfectly.Then I decided to build another one only this
time displaying seconds as well as minutes and hours. It work perfectly as far as the time goes but
it has one problem that I can’t figure out for the life of me. Maybe someone here who has built this clock
might have an idea.
Here’s the problem. I
am using standard 5mm diffused LEDs.The LEDs
for the hours and minutes work fine. For
the seconds, from 1 second up to 10 seconds, the LEDs light normally but when
it gets to 20 seconds, that LED lights but is quite dull. When
it gets to 30 seconds both the 10second and the 20 second LEDs light
normally. When it gets to 40 seconds,
again, that LED is quite dull but once it gets to 50 seconds, the 10 second and
the 40 second LEDs both light normally.
All of the resistors are the same at 220 ohm.Anyone have any ideas as to what might cause
this problem?
7 years ago
sir may i ask on how did you solder or how did you put the flat wires in the pb or in arduino thanks
7 years ago
Oh,yes thanks.. That was my Issue.
7 years ago
New to arduino, I loaded the sketch to a Nano. I can get the secondary lights to work, but only pin 1 seems to be flashing in some sort of fashion. Is there something I need to change in the sketch?
8 years ago
Hey,i got a problem:
If i´ve already made the Arduino Shield,but where to connect the 26 pin flat wire at the Arduino?(maybe i´m dumb^^) (Sorry for my bad english..) I hope someone can help me..
Reply 8 years ago
Did you read the instructables?
LED1-LED2-LED3-LED4 to ARDUINO DIGITALS PIN1-PIN2-PIN3-PIN4
LED5-LED6-LED7 to ARDUINO DIGITALS PIN5-PIN6-PIN7
LED8-LED9-LED10-LED11 to ARDUINO DIGITALS PIN8-PIN9-PIN10-PIN11
LED12-LED13 to ARDUINO DIGITALS PIN12-PIN13
LED14/LED15/LED16/LED17/LED18/LED19/LED20/LED21/LED22/LED23/LED24/LED25/LED26/LED27/LED28
to ARDUINO DIGITAL PIN 0 (all toghether)
8 years ago
Do i need to steal a supermarket basket? :) haha
Reply 8 years ago
Shure you need to :D haha
8 years ago on Introduction
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"
9 years ago on Introduction
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.
9 years ago
Grazie. gentilissimo! E complimenti per i tuoi progetti di orologi. Sono bellissimi.
9 years 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
Reply 9 years 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
12 years ago on Introduction
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
Reply 9 years ago on Introduction
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++;
}
Reply 9 years ago on Introduction
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 ;)
Reply 12 years ago on Introduction
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.