Network Time Clock For A Home Media Center

[Derek] wanted a clock for his media center. A simple wish, but he had a few requirements: he didn’t need an alarm, wanted it to automatically set its time after a power outage, needed a big display, and also wanted it to look good. After shopping around [Derek] couldn’t find a clock that would fit his requirements so he decided to build one.

[Derek]’s project is called the SNTP clock. As you might expect, it gets its name from the protocol used to automatically synchronize the clock in your computer with other network time servers. The clock itself is built around an ATMega168 gathering time data from the Internet with the help of a Lantronics XPort. One inch seven segment LEDs serve as the display for the clock, and everything, from the time offset from UTC, the brightness of the display, and whether the clock displays 12 or 24-hour time is controlled by an infrared Apple remote.

A bare PCB or bundle of wires would look out of place in [Derek]’s media shelf, so he used a metal picture frame and smoked acrylic to dress up his clock. Now he’s got a beautiful and elegant clock that fits right in to his media servers and receiver.

Lite Brites Fade, But LED Clocks Are Forever

litebrite-clock

Ahh, the Lite Brite.

What could be more fun than pushing dozens of little plastic pegs through a piece of black paper in order to create a pixelated, though colorful image? Well, I can think of quite a few things more engaging than that, and luckily so can [Lonnie Honeycutt] over at MeanPC.

While contemplating what to build with a pile of LEDs, his daughter came into the room with her portable Lite Brite. He thought that the pegs she was using looked awfully similar to the LEDs on his desk, so he did some test fitting and was surprised to see that they fit almost perfectly.

[Lonnie] thought that the toy would make an excellent clock, and his daughter happily agreed to let Dad do some tinkering. A few hours, an Arduino, and some Charlieplexing later, he had a nice looking clock that his kids were sure to enjoy.

If you’re interested in seeing more about how constructed, be sure to check out his YouTube channel and Instructable, where he happily provides all of the build details.

How’s The 60Hz Coming From Your Wall?

If you’ve ever wondered why NTSC video is 30 frames and 60 fields a second, it’s because the earliest televisions didn’t have fancy crystal oscillators. The refresh rate of these TVs was controlled by the frequency of the power coming out of the wall. This is the same reason the PAL video standard exists for countries with 50Hz mains power, and considering how inexpensive this method of controlling circuits was the trend continued and was used in clocks as late as the 1980s. [Ch00f] wondered how accurate this 60Hz AC was, so he designed a little test.

Earlier this summer, [Ch00f] bought a 194 discrete transistor clock kit and did an amazing job tearing apart the circuit figuring out how the clock keeps time. Needing a way to graph the frequency of his mains power, [Ch00f] took a small transformer and an LM311 comparator. to out put a 60Hz signal a microcontroller can read.

This circuit was attached to a breadboard containing two microcontrollers, one to keep time with a crystal oscillator, the other to send frequency data over a serial connection to a computer. After a day of collecting data, [Ch00f] had an awesome graph (seen above) documenting how fast or slow the mains frequency was over the course of 24 hours.

The results show the 60Hz coming out of your wall isn’t extremely accurate; if you’re using mains power to calibrate a clock it may lose or gain a few seconds every day. This has to do with the load the power companies see explaining why changes in frequency are much more rapid during the day when load is high.

In the end, all these changes in the frequency of your wall power cancel out. The power companies do the same thing [Ch00f] did and make sure mains power is 60Hz over the long-term, allowing mains-controlled clocks to keep accurate time.

Automatic Daylight Saving Time Compensation For Your Clock Projects

Pretty early in development of my Ping Pong Clock I came up with the idea of automatic Daylight Saving Time compensation. It’s an interesting feature, but it’s a luxury and so I figured I could add it as a future improvement. Now’s the time and I’m reporting back on what I’ve learned and how you can add this to your own projects.

There’s two things to think about before adding this feature. Is it worth the effort and does it make the clock more confusing rather than easier to use?

As to the latter, if you are responsible for setting the time initially but you are not responsible for resetting the clock when we fall back or spring forward will it cause confusion? Perhaps initially, but the battery-backed RTC that I used in my project should mean that you set it once and never have to reset it again. The one exception is DST and that’s what I’m compensating for.

Whether it is worth it or not is difficult to answer until after the fact. You should take into consideration that the DST rules are not set in stone, they change from time to time. Add to that the fact that not all parts of the world observe the practice. This means that not only do you need to implement the compensation, but you should add a method of switching it on and off as well as changing the rules for when it is observed.

Join me after the break to learn the method and code I use to make time adjustments automatically twice a year.

Continue reading “Automatic Daylight Saving Time Compensation For Your Clock Projects”

Building A CMOS Clock On A Breadboard

If you’re going to learn digital logic, why not aim high? That’s what [Easton] and his friend did when they built a clock using only 4000-series logic chips. On a breadboard, no less.

For a 1 Hz clock, [Easton] and his friend used a 4060 counter paired with a flip flop. This counts off 59 seconds until, with the help of an AND gate, the seconds counter rolls over to zero. After repeating that again for the minutes and building a similar circuit for the hour, and [Easton] had a working 4000-series 24-hour clock.

The breadboard clock may not be the prettiest thing, or a textbook example of how to prototype circuits,  but that was fixed with [Easton]’s friend’s PCB layout of a 12-hour clock. We couldn’t find any pics of this, but we’re sure it’s awesome and a great way to learn about logic and design.

Light Programming For A Clock

+

So at first glance we were thinking there wasn’t much special about this clock. It’s based on an Arduino and displays the time using a character LCD screen. But then we realized that there’s no battery-backed RTC and no buttons. How the heck do you set the time on this thing? [Mossblaser] is using a light programmer to set the time using a computer screen.

We’ve tried nearly the same data transfer technique before, using a white and black flashing computer screen to push Manchester encoding to a light dependent resistor. We were met with limited success, but you can see that [Mossblaser’s] rig is much more reliable and we think there’s a few reasons behind this. First, he’s only sending five bits per seconds, a very slow speed when it comes to digital transmissions. This helps to make up for slow LCD screen refresh. Also, the LDR is surrounded by material on the back of the case that will help to block out ambient light. And finally, he’s using a smaller part of the screen instead of flashing the whole thing. This may result in more accurate timing. You’ve got to admit, this is pretty slick!

Continue reading “Light Programming For A Clock”

A Novel Binary Clock From Hackaday’s Own

Hackaday’s very own [Mike Szczys] just shared an awesome binary clock he’s been working on. Unlike a normal binary clock that is only readable by self-admitted geeks and nerds, [Mike]’s clock is nearly comprehensible by the general population.

There are 12 lines of three LEDs around the face of [Mike]’s clock. These LEDs represent the time in minutes in binary – the inner LED is 1, the middle LED is 2, and the outer LED is 4. Adding up each of the LEDs around the clock face gives the number of minutes passed since the top of the hour.

To display the hour, [Mike] used a red/blue bi-color LED in the center of each line of LEDs. For example, at 1:03 the one ‘o clock hand will have a blue LED in the first position and a purple LED in the second position. A minute later at 1:04, this changes to blue, red, blue.

If that is a little confusing, there’s a wonderful video demonstrating the pattern of LEDs throughout the hour.

For such an interesting clock, the build is fairly simple – just an ATtiny44 with an STP16CP05 LED driver. Time is kept with a battery-backed MCP7940 real-time clock, and power is provided by a simple USB port.

[Mike] had enough boards manufactured for several dozen clocks, but only had enough parts (and patience) to solder up four clocks. You can check out the time-lapse of him going to town with a soldering iron on one of these boards after the break. As with all good builds, the code and schematics are provided on GitHub if you’d like to make your own.

Continue reading “A Novel Binary Clock From Hackaday’s Own”