LED clock2013-11-28 | Permalink
Another project nearing comple^h^h^h good enough to hang on a wall:
A LED-based clock, with light as hands.
I picked one up (because you know, because), and the best thing to use it for for now was a clock. I had an ATTiny AVR lying around, and wanted to make something to replace my pretty boring standard clock.
Luckily I had a 3d printer to print a clock case at exactly the right size, so I ‘only’ had to make something to set the time, show it, and if possible, adjust colors etc.
Of course it wasn’t as simple as that. For starters, the led strip didn’t work out of the box. When supplied with some power, it would light up randomly for a fraction of a second, then go dark again. My first guess was that it didn’t get enough power (a full 60 LED with controllers for each led can take a bit of power that may not be supplied fully by a small chip such as an ATTiny), but as it turns out, it simply came with wires soldered on the wrong side of the strip.
Luckily it’s not that hard to resolder with the right connections, so once I had discovered that, lighting up the right LEDs was quite simple. Except for one, the last one on the strip. But 59 out of 60 is good enough for now.
It turned out to be more of a challenge to actually show the time with only one AVR that doesn’t have a very accurate internal oscillator, and worse, one that can easily run out of program stack space and start behaving eratically.
After some measurements, tweaking, and rewriting, it still doesn’t serve as a clock very well; it runs fine for about 24 hours, but then it goes haywire and needs a reset.
But it does look mighty fine. It can show the time in different colors, and the second hand is completely optional.
Plans for v2 are in the works. Starting with an RTC, and I’m thinking about adding a light sensor to automatically adjust its brightness.
But first I need to figure out where to hide the electronics then. I guess I really do need to figure out how to make custom form PCBs at some point.