This is one of those projects that is either an over-engineered solution to a non-problem, or a really brilliant idea! Anyway, I had a lot of fun tackling it, and I guess that's what really counts. It went through three revisions using different approaches. I am happy with the final solution, and an itch has been put to rest.
The question is: can you engineer an analog clock that grabs accurate time from the Internet and controls the clock movement so that it will always be on time? It needs to run on ordinary household batteries for a significant period of time before replacement. It also needs to remember its current state when the battery runs out so that when the batteries are replaced, it automatically catches up to the current time. It goes without saying that daylight saving changes will be taken care of automatically.
The initial prototype uses the ESP-12E dev board. It was a proof-of-concept, and gave me an excuse to butcher a $2 Ikea analog clock to see if it can be controlled via the MCU. The prototype was very easy to build, but not very power-friendly. Even with a 10, 000mAH USB battery pack, it would only last for a day or so.
My next protoype (V2.0) uses the WeMos D1 Mini and ATtiny85 to try and develop a more power-friendly solution. The idea is to use the WeMos D1 Mini as the Internet gateway sparingly. The ATtiny85, which consumes far less power, will be used to run the clock. The final implementation was a vast improvement over the initial prototype. It was estimated to be able to last about a month on 4xAA 2300mAH rechargeables.
I should have stopped there and then, but I kept wondering if there was a way to increase the runtime even more on the same set of rechargeables. Finally, I yielded to the itch, and started working on the final prototype (V3.0). This version uses the barebones ESP0-07 (with vastly improved sleep drawdown), the same ATtiny85, and a PCF8563 CMOS RTC to help with timekeeping instead of the crazy software gymnastics used in V2.0 to get the ATtiny85 to generate accurate 1-second clock ticks.
After much head-banging and research, I also realized I need to use a H-bridge to generate 1.2V signal to the analog clock levet stepper for maximum power reduction and more consistent clock movement. This was the breakthrough that finally reduced the power sufficiently so that the clock is able to run for about 4 months on 4xAA batteries while getting accurate time from the Internet every 2 hours.
Recently, the clock went through its first daylight savings and passed with flying colours. I woke up in the morning and found it had automatically fast-forwarded by 1 hour. I had an irrational but emotional moment of pride and satisfaction when I saw the result.
The project from V1 to V3 took over 3 years. Sometimes I put it aside and worked on other stuff, but the itch kept returning to me, so I kept prodding at it. Is it over-engineering? Haha! I think so, to have 3 pieces of complex ICs driving this cheap, simple analog clock. Yet I probably would have done the same thing if I had to do it all over again.
Would there be a V4.0? As of now, probably not, because I have totally run out of ideas on how to decrease the power usage significantly. WiFi access is a power hungry activity, so unless another universal time source can be found, I can't think of anything else that will reduce the power draw. Some people have used the GPS signal to implement accurate analog clocks, but GPS chips are comparatively much more expensive. Some regions broadcasts time information using radio waves, but that is not available everywhere.
Comments