Earlier in the summer I was talking to Bob Baddeley at a Sector67 meeting about my clock problems with the Binary Burst clock. I’m a little bummed out that I didn’t dig down and find the recommended application circuit for the RTC before I sent the board off for production. Bob suggested that it wasn’t a deal-breaker that I didn’t use a clock crystal with the same load capacitance, but that adding capacitors might fix the problem.
I pulled out the Binary Burst Clock and did some more work on the firmware. The big change is that I’m using a different library for the i2c communications. The one I started with had some issues and I didn’t want to work them out myself. Instead I grabbed Peter Fleury’s i2c library. He has two in the package, one is for chips with full TWI hardware (which is not the case with the ATtiny84 I’m using). The other is a software implementation written in assembly. It’s meant to be included in C projects and is super easy to work with.
I also implemented a test to see if the RTC oscillator is running. If not, a ‘first run’ function will start the oscillator and enable the backup battery. The buttons now work for setting the time, and I’ve migrated from a delay-based time keeping tick to one that uses TIMER1 (also used for debouncing the buttons).
At this point I would say the clock is fully functional. I still want to look into some things like how best to calibrate the oscillator for the RTC. Also of interest to me is a deeper menu system that would allow for things like intensity settings and alternate time displays.
The most up to date code is on the master branch of the repository.
I finally got around to taking some pictures and shooting some video of my assembled clock project. Above you can see it displaying time. Minutes are tracked by the blue LEDs in binary code. Each spire has three digits, when the inner and outer digits are lit it shows a binary five and the next spire starts counting. Hours are displayed as a red LED corresponding to the positions on an analog clock. Here it is 12:54.
After the break you can see the video of the clock in action, as well as a description of what went into the build. You’ll also find some close-up pictures and a bit more info.
I received the boards back from Seeed Studios two weeks and four days after placing my order. I’m shocked by the quick turn-around, especially since I selected the slowest shipping option available which itself could have taken three weeks.
I’ve been pretty busy with work lately but finally found a bit of time to populate a board and get some test code running. I’m happy to report that I made no design errors. Everything seems to work as planned! Well, that is after I discovered the tiny trace bridge between two vias which prevented ISP communications with the chip. A sharp razor blade fixed that right up. I understand that this type of manufacturing error is not uncommon and it doesn’t really bother me.
Above is a fast-motion video I made while populating the second board. I’ll be sending this one to my friend Christian who is going to lend a hand adding features to the firmware. Hand soldering the mostly SMD project wasn’t too hard, but it did take about an hour. If I were making any more than two of these it would be worth it to order a stencil and procure solder paste and an old toaster oven for reflow. Perhaps on the next project.
In my next post I’ll talk about adding the LEDs. This took a long time. The first spire took about 45 minutes, by the twelfth spire I had it down to around twenty. Here’s a peek at the final product:
How did I do hitting the mark from my concept?