Close

Integrated 32KHz clock source

A project log for Yet Another (Discrete) Clock

I HAD to finally do this basic "exercice de style" in digital electronics, using some hundreds of transistors and diodes...

yann-guidon-ygdesYann Guidon / YGDES 03/28/2016 at 14:020 Comments

I received integrated chips :-) Some DS32KHZ and its successor the DS3231 (with calendar and I²C interface) from www.ebay.com/itm/221895843046

It's SOIC and requires soldering. However I happen to have a couple of them already soldered. They are sold as RTC for the RPi and Arduino boards, and they are cheap... like 1€ each ? http://www.ebay.com/itm/400985300995

However the 32KHz output is not soldered, it appears. This requires some extra soldering. I've marked the right pin with the red arrow.

The green arrow might be useful for solving a little problem I had : how to reset the clock at midnight ? If I can configure the /INT pin to send a strobe every day, that will solve synchronisation issues that I have with DCF77, GPS and others...

Otherwise, the /INT pin can be configured as an open-drain 8K/4K/1K/1Hz square wave. Handy, too.

The /RST open-drain output can also be useful for a clean power-up and battery-low detection (it becomes active at about 2.5V (avg 2.57V, min 2.4V, max 2.7V) so it's a decent battery health indication).

For added flexibility and longevity, I'll unsolder the coin cell battery and connect a CR2032 or Lir2032.


There's a catch though : the square wave outputs are not enabled by default during powerup... I can preset the chip at home with a RPi but once the power is lost, the whole thing gets bricked. no clock output. A solution would be to add a simple µC...

I'm not feeling like I want to program an I2C stack so I better use a DS32KHz first, then ! It directly outputs 32768Hz with no pull-up, the pinout is compatible it and can be directly powered from Vbat between 2.7V and 3.3V (Vcc grounded).

So far it's very easy to assemble, even with 0.1" perfboard (just one pad is cut in half).

And the scope trace is happy !

Conclusion : I can move on with other aspects of the project.

Discussions