Making a digital, binary clock is not very difficult. All one needs is basic knowledge of electronics. Let us see how to make an Arduino binary clock. This clock is based on Arduino, which is an open-source micro-controller meant to make electronic processes more accessible.
This project is moderate in terms of difficulty, as one has to have some knowledge of using software and dealing with electronic circuits.
There is no fixed time for completion of this project. This project deals with numerous processes, such as soldering, itching and programming, which may take different time for different people.
1. IKEA frame called “Ribba” 13×18 cm
2. LEDs of 5 mm to mark hours and minutes:
- n.8 green
- n.3 red
- n.2 yellow
3. LEDs of 5 mm to light up the words “Hours” and “Minutes”
- n.7 white
4. LEDs of 5 mm to light up the numbers 1, 2, 4 and 8
- n.4 pink
5. LEDs of 3 mm to light up the words “binary clock”
- n.4 pink
6. n.24 Resistor 220 ohm (for 5mm led)
7. n.4 Resistor 150 ohm (for 3mm led)
8. Cartonboard thicker to make LED holder
9. Some acetate (4-5) sheets to create the mask
10. A flat wire 26 wire
11. 3 micro button to set hours and minutes and on/off
12. A small piece of prototyping PCB to make the shield
13. Some double strip
14. Arduino Uno/2009 or clone or self made
15. Power supply 6V 500ma or other Arduino compatible.
1. Understanding the project
The first two columns correspond to the hours, the third and fourth to the minutes.
For each column we 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 24 hour format.
We take the example of the first photo you see above:
- first yellow spot= 10
- 3 green spot= 7 (4+2+1)
- first and third red spot= 50 (40+10)
- 2 green spot= 5 (4+1)
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 but still managed by Arduino. They also improve the general understanding
2. Gathering the components
After planning and understanding the project, it is time to get all the components. Try to buy these components from a single vendor, as it will increase the chance of getting added discount or benefit. Check the components in the shop itself, using a multimeter or another concerned circuit, or ask the shopkeeper to show a demonstration of his/ her product.
3. Creating a schematic
This is the pattern that we must achieve.
All LEDs are connected by a digital pin to Arduino.
All micro buttons are connected by an analog pin to Arduino.
All LEDs that 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 / Binary Clock”) 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
to ARDUINO DIGITAL PIN 0 (all together)
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
- 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 install. It is advisable to make a drill of 5mm for all LED except those that make up the word “BINARY CLOCK” which should have 3 mm drill-bit.
Soldering position of the LEDs that rule the clock:
- 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 together.
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.
5. Connecting the wires:
You need 23 wires for this project. 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.
Add some separators with rubber adhesives, cutting them (adjust the height) so that the back of the frame is perfectly suited to the edge.
6. Inserting a 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, three layers of overlapped acetate can be used, with a layer of gray and a white matt for better light diffusion.
7. Creating a layout
Once the construction is done, it is time to create a layout of the output. Using the figure above, arrange the holes to be drilled. These holes will later on be occupied by the LEDs to display binary time.
8. Creating 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.
9. Connecting the micro buttons
As you already know, the micro buttons are:
- 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.
10. Placing the microcontroller:
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. The clock is done.
- Use various LED combinations to make the system even more attractive. Do not add too much color to it, though, as it will become difficult to make the correct time out.
- Use more microcontrollers as well, if you know how to work with them. ARM processor is very good, and can be used in such cases. It will provide better performance.
- If you know how to create a PCB, you can save wiring by creating veins in the board using a software. However, this requires more care and expertise.
Things to watch out for
- Choose LEDs of a trusted company. Always test them before using them for the circuit.
- Be careful while drilling and soldering. Not only will they cost time when handled recklessly, but may also cause injuries.
- Try not to use too many wires. Too many wires will make the circuit complicated, and increase the chances of shorting.
Frequently asked questions
Q. Can I use any other microcontroller?
A. Yes, you can. However, to do that, you must have detailed knowledge about the particular microcontroller.
Q. I have LEDs of one color only. Will that do?
A. Only if you want a plain binary clock.
Q. Are there other ways to make the schematic?
A. Yes, there are other ways. However, the logic for it remains the same.
Q. I forgot to add the GND wire. What should I do?
A. Make a hole in the board away from the circuit, and using wires, add GND to the system. It is a complex process, so it is advisable to be very careful while designing.