💾 Archived View for benjaminja.info › projects › tix_clock captured on 2023-04-19 at 22:22:30. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-03-20)

➡️ Next capture (2023-09-08)

🚧 View Differences

-=-=-=-=-=-=-

TIX Clock

2018-11-16 | #clock | @ttocsneb

⬅️ Back

TIXClock on Github

🖼 TIX Clock

I am very proud of this project. It is the fastest project I have done from start to finish. I was in the middle of a digital logic class which inspired me to design a clock using some of the principles we were learning in the class.

Hardware

Designing the case for the clock was pretty easy, I just needed groups of 3, 9, 6, 9 leds for each digit of the time and since there is a popular layout already for a tix clock, there isn't much that needs to be done in the way of design.

The problems came in the form of how the leds looked during testing. There would be a very bright circle in the center of each cell. To fix this, I just added a sheet of paper to act as a diffuser. The next problem was that of bleeding light from one cell to another. Here, I printed black dividers that would go around the leds.

🖼 The frame with difuser and blockers

Design

🖼 A stack of pcbs

The plan was to lower the outputs required of 27 leds to work with an Arduino Pro Mini. The idea is was to use a matrix to reduce 27 outputs into 12 outputs which are still too many for the microcontroller. A demultiplexer can be used to reduce the 9 columns into 4 outputs with a total of 7 outputs used to drive the 27 leds.

When implementing this, you would idealy be running as many leds as possible at a time. With the above setup, you would be able to control up to 3 leds at a time. The problem is that I have different colors for each section and I want each color to have the same brightness. I put a unique resistor value on each column for each color which would make each led in a column share an led. When driving leds, you must have each led have their own resistor to keep brightness independant of each other. So because of this limitation, I am only able to light one led at a time.

🖼 The clock with a picture of the pcb

Software

Once I got the the circuit board printed and wired; all that was left was programming the thing. I separated the software into two abstractions:

1. matrix driver

2. modes

The matrix driver handles all of the logic and timing for controlling the display. You can set the number of leds to light up, set a specific row's leds, and randomize the locations of the lit leds within a section.

The modes abstraction is where the main logic is located for the program. There are two main modes: time and settings. The time mode displays the current time, while the settings mode allows you to change preferences stored in eeprom. You can change the time, brightness (I don't think brightness works), or the update interval.

🖼 The clock with the finished pcb