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” →

A Glorious Mechanical Seven Segment Display

If you’ve ever wondered why you’ve never seen a mechanical seven-segment display, now you know. They’re fairly complicated and most likely absurdly expensive, especially when a few light bulbs or LEDs would do the same job equally well. This didn’t stop [kiu] from completing his mechanical seven-segment clock he calls SevenBlocks, and for that we are thankful.

Each of the 28 segments in [kiu]’s clock is made of three layers of acrylic and a short section of a rack gear. Unlike every seven-segment display you’ve ever seen, tiny hobby servos provide the indication for each segment. For the electronics, An ATMega8 is used for the brains of the outfit with a 74HC595 shift register to expand the number of I/O lines. A DS1307 RTC module provides accurate timekeeping, and the dozens of servo outputs visible in the ‘guts shot’ makes you realize why you’ve never seen a mechanical seven segment display before – they’re really friggin’ complex.

If you want to build your own mechanical seven-segment clock, [kiu] put all the files up on Github. Everything is there, from the .DXF files ready to feed to a laser cutter to the schematic and board files for each of the three PCBs. A video showing this clock in action is sort of necessary, so you can check that out after the break.

Continue reading “A Glorious Mechanical Seven Segment Display” →

Quieting A Pendulum Clock Every Night

[Vinnie] has a wonderful old clock from his grandmother; it’s an exquisite antique with a real mechanical movement and a charming set of bells that ring every hour. Unfortunately, those chimes are a bit of a disturbance to neighbors at 2 o’clock in the morning. Previously, [Vinnie] had been stopping the clock every evening, and hoped he would remember to start the pendulum in motion 12 hours later. This was a chore, so he decided to automate the process.

The build is simple and clever; a small stepper motor is mounted in the clock just underneath the pendulum. Every 12 hours, the stepper motor moves a lever and slowly stops the pendulum over the course of a dozen or so seconds, silencing the clock movement. Twelve hours later, the motor turns again setting the pendulum in motion.

The parts count for this build is very low – basically just an ATmega88, a Darlington array to drive the stepper, and a 32.768kHz crystal. We can think of a few friends and relatives with loud clocks in their house, so we might have to build a few of these to give away.

Take a look at the demo video after the break to see how [Vinnie] stops his grandmother’s clock every night.

Continue reading “Quieting A Pendulum Clock Every Night” →