Introduction: Simple Binary Clock Using Attiny85
In this instructables I show how to make a minimalist and simple binary clock using an arduino uno and a attiny85.
If you never used your arduino to program other microchips, you'll see it's very easy to do (I tried it for the first time for this project and it was quite simple) and pretty handy as you can shrink the size of your projects!
Step 1: Gathering the Material
For this project I used basic and easy to find materials. There are two categories of materials, one for the clock's case and one for the circuitry.
All of these items were found in a crafting shop
- Wood panels
- Wood Glue
- Black and Red spray paint
- Press drill
- Jig Saw
- 13 red 5v Leds
- 4 x 220 Ohms resistors
- 2 x 10k Ohms resistors
- Pin holders
- 1 x 74hc595 (shift register)
- 2 push buttons
- Circuit board
- 3.3v coin cell
- Arduino uno
- Soldering tools
Step 2: Building the Wood Case
In the next steps, I show how I built the case for the clock. I used wood panels and wood glue and it worked well. The panels had a height and width to my liking, so there wasn't much cutting to do.
Also, At first I wanted to display the seconds, but later on, when I built the circuit I found the led switch at each second to be actually distracting, so I cut those Leds out and rearranged my code and case accordingly later on.
Step 3: Wood Case: Cutting the Case Pieces
First off, I measured and cut all the pieces i would need to build my case.
I decided to make it as a box with no bottom. I sanded the edges if needed.
Sides: 2 x ( 7.4cm x 3.8cm)
Front & Back: 7.4cm x 9.5cm
Top: 8.8cm x 3.8cm
Step 4: Wood Case: Drilling the Led Holes
I drilled the holes on the face panel of my case using a press drill. I indicated on the panel where to drill the holes and, since I used cheap crafting wood, I had to drill slowly so the wood wouldn't chip off. Now when I realized I want to take out the Leds for the seconds I had to cut this panel to remove the unnecessary holes. I realized this after painting my case, so the that's why the in last picture is my panel painted
Step 5: Wood Case: Painting
Once I had every piece of my clock case, I proceeded to paint them. I chose red and black paint, as my Leds were already red. I used shiny spray paint, to give it a finished look after two layers of paint. I waited till everything dried.
Step 6: Wood Case: Assembling
After the paint dried, I glued everything together using fast drying wood glue, making sure everything was straight every time I glued two pieces together. I waited till it dried, before gluing the next pieces together.
Step 7: Circuit
The next part of this project is for the circuit. For this part, you will need your Arduino or any microchip programmer and the Attiny85. As I previously stated, I cut out the Leds for the seconds as I found the seconds too distracting. So in the beginning, the pictures show all the leds, and later on, the seconds are absent.
To program the Attiny with the Arduino as ISP I followed this nice tutorial from instructables by randofo:
The code I uploaded in the Attiny:
*The code is based on an internal clock of 16Mhz but it can be changed
*I used Timers and Interrupts of the chip to make the clock.
Step 8: Circuit: Soldering the Leds
I proceeded to soldering the Leds together using my soldering iron and the already drilled case to position the leds properly while soldering.
Each Led of a column are soldered together by their cathode
Each Led of a row are soldered together by their anode
Step 9: Circuit: Building the Circuit
With the Attiny programmed with the code, all there is to do is to build the circuit first using a breadboard to test out my program and make sure everything worked before soldering the full circuit.
The use of the shift register is necessary as the Attiny does not provide enough output pins for the 8 endpoints (4 rows, 4 columns) and the two push buttons.
The plan and the circuit I made are in the pictures.
I tested my circuit on the breadboard and when it was good to go, I soldered it on the circuit board.
I did not have a battery holder for a cell so I used my imagination to build a temporary one (very sketchy..). I recommend using an actual battery holder.
Step 10: Assembling
The final step was to assemble everything, which is to simply fix the circuit in the case and the Leds in the corresponding holes. Then you can set the time using the push buttons and let the Attiny track time.
For example, in the second picture:
Hours2 = 2 and Hours1 = 1
Mins2 = 1 and Mins1 = 6
so the time is 21:16
And that's it!
Feel free to leave comments and suggestions!
This is an entry in the