2

I want to make a large clock, 16 inch x 7.5 inch, which will display dd Month yyyy. What would be the best way to do this? Does Arduino have a built in clock, and I'd just need logic to turn on/off LEDs on a display that already has dd Month yyyy? Do such displays exist which I can connect to Arduino?

1

Presuming you intend to have a more or less standard clock the hardest part of project will be accurate timekeeping. This functionality is generally reffered to as RTC i.e. Real Time Clock.

This is probably best offloaded to a dedicated IC, this provides many benefits. The foremost is that small inexpensive modules can be bought that include, a reasonably accurate crystal, the timekeeping IC and a backup battery, so your clock doesn't forget the time when unplugged.

A good place to get started would be here it goes over using one such chip to get the time (and date).

From there you can apply your own creativity for the clock interface.

One possible option is making a wordclock interface but setup for dates.

1

Usually displays with pre-determined shapes for numbers and/or letters are LCD or quite specific parts. It's entirely doable to just use standard Alpha-Numeric LED displays, there's many tutorials and explanations to be found, if that's something you think you need, you can ask more directly towards that and many of us will probably be happy to explain.

The Arduino has its own little clock frequency. Most are probably powered by some manner of crystal making them quite accurate. Some may have an actual watch crystal running some kind of real-time timer/clock. These matters are device dependent and cannot be answered by me, as I never used an Arduino. In the basis every Atmel (the controller brand Arduinos use) can be used to maintain a clock and calendar, even the Tiny10 can, given a stable enough external clock source.

On most simpler Atmels (and as such simpler Arduinos) you will have to maintain the numbers and how they translate to the displays yourself, that last part especially if you want your own design in the display. But you'll probably be able to get a reasonably accurate pulse that you can use to update the values with the right interval. On the larger/more complex chips and/or Arduinos you might get a (near) complete calendar unit that can basically maintain itself and allow you to just read the values. But then those will be more expensive and able to do many, many much cooler things, so that might be a bit of a waste for just a clock and doing the calendar stuff yourself is very good exercise for getting to know the processors you are working with.

For more assistance you will need to be much more specific about what Arduino/Atmel you are using and exactly what manner of display you want: Are blocky number/letter like those in radio's and alarm clocks okay, or do you want something self-designed or more flowy? Are you willing to actually use a dot-type display and learn to use that (no that hard, to be honest, but very different from segment), allowing you to display anything that fits the dots? Like smiley-like graphics, Chinese characters to some extend, etc.

2
  • 1
    Most Arduinos are clocked off a ceramic resonator. Not accurate enough for for making a clock. The Leonardo and the Micro have quartz crystals though. May 22 '15 at 7:46
  • Unless you use a DS3231 RTC. It can also set alarms,: arduino.stackexchange.com/questions/30638/…
    – SDsolar
    May 7 '17 at 21:04
1

If you are willing to go the “barebones” route, you can turn an ATmega328P (the MCU at the heart of the Arduino Uno) into a very accurate RTC by hooking a watch crystal to it's clock pins. Given proper calibration, you can get an accuracy of a few seconds per year.

This would require some coding though, and is not as straightforward as using an off-the-shelf RTC. C.f. this answer for the details.

0

It is possible to use the RTC. Another option is to use the Arduino Yun. This has a OpenWRT (Linux) running alongside the Atmel and is a little bit more expensive than the cosyt of the RTC and an Arduino. However, you can query the Linux side for the time with the Arduino command:

String GetDateAndTime (void) {
  Process time;
  String junkString = "";
  time.runShellCommand("date +\"%F %T\"");
  while(time.available()) {
    char c = time.read();
    junkString += c;
  }
  junkString = junkString.substring(0,junkString.length()-1);
  return(junkString);
}   

And you can update the Linux clock periodically using the code:

/**************************************************************************/
// Update Clock on the OpenWRT Side using NTP
// command kinda swiped from:
// http://karlduino.wordpress.com/2014/01/14/set-clock-on-arduino-yun/
void forceNTPUpdate()
{
  Process date;
  String junkString;
  date.runShellCommand("ntpd -qn -p 0.pool.ntp.org");
  junkString = "";
  while(date.available()) {
    char c = date.read();
    junkString += c;
  }
}

Update the clock when the code starts to set the time and update as needed to keep things as accurate as you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.