E-paper displays are great. You can read them from virtually any angle, they look very natural and the power consumption is very low. So I decided to use it to create my own table clock.Idea is simple - you have a PCB with display, you print the case on the 3D printer with your favorite filament, add few screws, common 18650 Li-ion battery and you are done.The schematic, 3D models and the firmware is open, so you can adjust the clock to your needs.More infomation about this project on my webpage: http://www.dadan.sk/agora-clock-en/
I had some complains about the clock is not very accurate so I started to investigate it. A friend of mine borrowed me a HP 5385A frequency counter. It was first time I used one and we weren't sure if it measures correctly.
ATmega328p that is the MCU in Agora clock has no option to tune the RTC XTAL frequency in firmware. It has 32.768 Hz XTAL connected to internal counter that drives the clock. I hooked this counter's output to a GPIO. It had to divide the frequency first so I was looking for precisely 64 Hz frequency on the GPIO where I connected the counter.
Then I started to tune the load capacitors of the 32.768 Hz XTAL to get as closer as possible to 64 Hz at my GPIO.
So I realized that a made a big mistake. I used two XTALs with different load capacitance - the original had 9 pF a the second had one 12.5 pF. That happened in the time when the chip shortage started and I was not aware of the consequences.
Now with the frequency counter I measured the differences and tuned the load capacitors
9 pF - original (mark TBs18)
9 pf - tuned (mark TBs18)
12.5 - original (mark TAV06)
12.5 - tuned (mark TAV06)
Next I wanted to know if I can trust the frequency meter. So I made a cardboard with 4 tuned Agora clock boards. I set the exact time on the clock and prepared to let them go for a month
OK, so I had now 4 clocks that a wanted to watch for.
Then I got an idea to turn them into the kitchen clock. My wife was surprisingly not against it.
So I let the clock to go for a month and then I measured the differences.
After a month it was 2678400 passed seconds. So I did a little math and the results are here:
HP counter ppm
Now I know how important it is to have the RTC frequency of all clocks checked. Because the ATmega328p has no firmware feature to tune the clock I have the only option to tune capacitors on every clock to have good time accuracy.