Fubarino Contest: NTP Clock

fubarino-ntp-clock

[Toni] has been playing around with NTP, the Network Time Protocol. This allows the alarm clock build to keep very accurate time by synchronizing with an NTP server on the Internet.

The project serves as a bedside alarm clock. When it comes time to wake in the morning an alarm sounds and the screen switches from using a blue backlight to using a red one. This is show in the video below, but you’ll want to turn down your speakers before watching it; the alarm sound will have no problem waking you up in the morning. After the unwelcomed jolt you’ll get a glimpse at the Easter Egg which reminds you to check for new posts on Hackaday.

Afraid of ending up with a steaming pile of slag instead of a server [Toni] asked us to host the project files. You can find the first-hand description of the project and a link to the code below.


This is an entry in the Fubarino Contest for a chance at one of the 20 Fubarino SD boards which Microchip has put up as prizes!

NTP Alarm Clock

A few weeks ago I’ve built my own alarm clock. For that purpose I used an Arduino Ethernet and an Adafruit LCD Shield. I decided to use an old cardboard box and fixed both things inside and cut a hole for the power connector, LAN and one for a USB cable which lead to a Usb2Serial adapter (Don’t exactly know how they’re called). Then I added a piezo speaker. Now I’ve a cardboard box with holes and a display. (The clock can be powered by the power plug or by usb, just like any arduino)

Lets come to the software part. First I’ve found this sample code for connecting to NTP servers(http://arduino.cc/en/Tutorial/UdpNTPClient). I included the Library for my RGB LCD and defined some colors. Then a navigation menu was coded. It’s very simple to use: Press “key up” to select Timezone, add or subtract with “right”/”left”. “Key up” again for toggle alarm activation. Done with “select”. “Key down” for Alarm Hour, “key down” again for alarm minute, done with “select”. Then it’s time to go to bed, don’t worry about the background illumination, it gets dark after a few seconds of inactivity, the screen is still slightly visible though.

The next morning you’ll wake up to the nasty alarm sound of this clock. But there’s a challenge. There isn’t a “snooze” or “ShutTheAlarmOff” button. To silence the alarm all that needs to be done is to adjust the alarm time. Just add for example 5 minutes to the alarm time. Soon after that the alarm will ring again, set the time back to the original time, now it’s ready for the next day. Or just toggle activity but remember to reactivate on the evening. You’ll never oversleep because navigating through the menu needs a bit of concentration. After silencing the alarm you’re definitely awake.

But there are still thing left to do: the date once displayed a negative number but I hadn’t the time to check what caused this behavior. Also the screen flickers while in the navigation menu which is just not so nice looking.

But you may now ask yourself where the hackaday.com URL hides. The answer is simple: Every morning I get reminded to check the webpage, just while the alarm is ringing. What a nice start into the day!

Arduino Sketch

11 thoughts on “Fubarino Contest: NTP Clock

  1. This looks like a interesting project. I am considering ding something similar. I work a very random set of hours in different departments. there is no pattern. I keep a diary of the hours and days but have to set my alarm manually every night. I an considering a clock build that can automatically set the alarm from a cloud calendar. Then I could use a smart phone at work to enter my hours each week then not have to worry about them again. also showing department,weather and current house temp would be nice. keeping it synced was going to be a problem but now i think that should be simple enough following your NTP example thanks.

    1. An easter egg was defined as:”We figure it’s anything that is not apparently obvious in a piece of hardware”. I haven’t seen any other alarm clock displaying the hackaday.com url, did you?

      1. i take ‘not apparently obvious’ to mean that the url is not apparently obvious in everyday use, it requires a certain unlikely input or combination of inputs to appear, rather than to mean an output that deviates from preconceived ideas based on outward appearance.

        If i wrote the url in felt pen on an alarm clock would that be an easter egg?

        1. I think that since you have to look at just the right time it can count as an Easter egg. (Granted, having the alarm going at the time makes it a bit more obvious.) Clearly, having the URL on the clock at all times would be different though.

          I’ve considered a custom clock for my alma mater that would sometimes show a scrolling message on the LCD (for example when chiming on the quarter hour as the clock on campus does). The first couple of times you might go, “What, what was that?” But after a while it’d feel less Easter-egg. Still I think things like that can count.

    1. Perhaps some words existed before the urban dictionary sicked-up its pearls of wisdom …

      slag noun [U] (WASTE)
      › [U] waste material produced when coal is dug from the ground, or a substance produced by mixing chemicals with metal that has been heated until it is liquid in order to remove unwanted substances from it

      If you wanted to add some juvenile humour to the OP then how about the imagery of ‘a molten pile of slags’.

      Flame all you want. I cannot spare the time to care.
      Please try to stay on-topic like I just didn’t.

Leave a Reply to pffCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.