Greetings!
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!
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.
Wood Case:
All of these items were found in a crafting shop
- Wood panels
- Wood Glue
- Black and Red spray paint
- Press drill
- Jig Saw
Circuitry:
- 13 red 5v Leds
- wires
- 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
- Attiny85
- Arduino uno
- Soldering tools
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.
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
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:
https://www.instructables.com/id/Program-an-ATtiny...
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.
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.
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!