Simple Binary Clock Using Attiny85

by Chanandler Bong in Circuits > Clocks

3619 Views, 14 Favorites, 0 Comments

Simple Binary Clock Using Attiny85

35026738_397864020729344_7224341042928025600_n.jpg
34984799_397863984062681_194480427015077888_n.jpg
35043482_397864317395981_8865190408821407744_n.jpg
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!

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.

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

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.

Wood Case: Cutting the Case Pieces

DSC_0001.JPG
35050573_778166282375467_6713871011428696064_n.jpg
34962823_778166362375459_5091203814057312256_n.jpg
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.

Measurements:

Sides: 2 x ( 7.4cm x 3.8cm)

Front & Back: 7.4cm x 9.5cm

Top: 8.8cm x 3.8cm

Wood Case: Drilling the Led Holes

34827314_778165669042195_479198980207542272_n.jpg
34847765_778165735708855_6716850726594674688_n.jpg
DSC_0015.JPG
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

Wood Case: Painting

34635579_778166049042157_6478358214919323648_n.jpg
34845481_778166149042147_663026775932010496_n.jpg
34823303_778166435708785_1714511125921398784_n.jpg
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.

Wood Case: Assembling

DSC_0006.JPG
DSC_0008.JPG
DSC_0010.JPG
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.

Circuit

DSC_0022.JPG
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.

Circuit: Soldering the Leds

DSC_0002.JPG
DSC_0003.JPG
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

Circuit: Building the Circuit

350698787.PNG
35159276_397863900729356_2756499573802270720_n.jpg
35050480_397863814062698_107043018946641920_n.jpg
35143332_397864277395985_9168808252635348992_n.jpg
35049183_397864494062630_6437586326601596928_n.jpg
35089301_397864460729300_620307064110972928_n.jpg
34962942_397863914062688_2045856655828058112_n.jpg
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.

Assembling

35078664_397863877396025_4416737117854498816_n.jpg
34984799_397863984062681_194480427015077888_n.jpg
34898998_397863860729360_8246980624485711872_n.jpg
35043482_397864317395981_8865190408821407744_n (1).jpg
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!