One problem I’ve come across a couple of times is trying get a microcontroller to keep accurate time. In the past I’ve managed to get an ATMEGA168P with an external 16MHz (same as Arduino) to be accurate to within about 5 minutes over a month.
Lately, I’ve been working on a clock where the digits will be separated except for 3 wires connecting them; 2 for power and one for serial communication to the next digit. The master module will keep time and display the first digit then transmit the remaining digits over serial to the next module. That module displays the first digit received and passes the rest along to the next module and the process continues until there are no more modules to receive data. This way the clock is modular, and you only display the number of digits you want to.
Being a clock, I need to get it to keep accurate time. This time I wanted to go the step further to make it more accurate by using a RTC (real time clock), I chose the DS3232S# by Maxim. The RTC is only included in the master module because the slave modules don’t actually keep time, they only display what they are told to. The module should keep accurate enough time that any variance won’t matter. As well, the RTC has a battery backup that keeps time when the power goes out.
I designed the circuit in Fritzing, a free simple to use software. It’s not as powerful as other software such as Eagle or KI CAD, but I find it easy to design new footprints because you can use Inkscape (free vector drawing software). This circuit does push the software to close to its limits though.
The First prototype design is seen in the picture above. I designed all of the modules as a single circuit board that can later be separated, this will hopefully make assembly easier.
I’ll be posting again when I get the finished board and have time to assemble and test it. I am also still working on designing the mechanical modules that will display the time. I have made a first prototype, but some parts didn’t work as planned. Apparently, laser cut acrylic binds easily if you try to make prismatic joints using two screws that slide in a slot.