Build a Clock with the arduino due

Hi

I want to build a clock with the arduino due. I have some ideas and some questions.

  • Should i use the internal 32kHz or an external with the RTC? which accuracy has the internal quartz? or an external one?

  • Should i use a gps module to get the time, its easier because you don't have to initialize anything, but the connectivity indoors might be bad. Maybe someone has experience with gps modules indoor?

  • can i supply the arduino with a small chip battery or is it not strong enough to keep it counting on even when i unplug the device. There are some low power possibilities.

Best regards Allinev

The Due is a poor choice for this. While the chip does have an internal Real Time Clock and a dedicated Vbatt pin for a coin cell, both of those are inaccessible on the Due board.

Start with a Teensy 3.2. It will do all you want. I'm currently using a Teensy 3.6 to do a similar job.

GPS usually functions well enough indoors for clocks. There was one advertised on Sparkfun that could work inside a metal filing cabinet in a basement. I think they took that description off the product.a few years ago, if they still sell the product.

The DUE has an accessible internal real time clock RTC and there is a library for that(page 242, Chapter 14 of Sam3x datasheet)

The Real-time Clock (RTC) peripheral is designed for very low power consumption.
It combines a complete time-of-day clock with alarm and a two-hundred-year Gregorian calendar, complemented by a programmable periodic interrupt. The alarm and calendar registers are accessed by a 32-bit data bus.
The time and calendar values are coded in binary-coded decimal (BCD) format. The time format can be 24-hour

To be useful, check that your board has the external 32.678 Hz crystal and note that there is no battery on the DUE for the internal RTC.

Plus this thread, from reply #15:

I just checked the official Due schematic. It does show a 32.768 kHz crystal. Y2 is on the centerline of the board between pin 12 and the reset pin.

It is almost useless without the battery. That is why I never used it when I was building projects with Dues. You really don't want to keep your Due powered all the time when you might bump the erase button accidentally and erase your program.

There are a few other neat features on that chip which are inaccessible on the Due board.