Close

A more precise clock with RTC

A project log for Epaper Deepsleep digital clock

Powered by an ESP32 this inefficient, imprecise and over-engineered digital clock can be a great learning resource for ESP-IDF beginners

martin-fasaniMartin Fasani 09/14/2022 at 19:070 Comments

This was an experiment to make an easy, no external components, simple clock.

But of course they are dedicated chips when you want to have precise time.
One of them is the popular DS3231, also not the cheapest if you add in a PCB, you can find it for around 3 USD in Aliexpress or eBay.

The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature- compensated crystal oscillator (TCXO) and crystal.
Using this nice RTC that do are 2 Wire I2C and do not consume time, you can sync the controller chip with WiFi to get the NTP time and then you can set it on the DS3231. After this it will keep the time for long since it comes with a small coin battery, that can keep it up for at least 5 to 10 years.
In my latest project:

Epaper weather station where I aim to design an open source controller PCB but also the code to drive it, I've designed an ESP32S3 PCB, that acts as a master SPI but also has a DS3231 on board. So you can have both things directly available in case you need to make an industrial clock.
This RTC chip due to the compensated crystal allows also to read ambient temperature.
If you are interested in the Epaper weather station project please follow it in Github to be aware of the new additions.

And now would be someone interested in having a demo code with one of this cheap RTC modules like the one below?

Discussions