Micro Radio Time Station Keeps Watch in Sync

The US National Institute of Standards and Technology (NIST) broadcasts atomic clock time signals from Fort Collins, Colorado on various frequencies. The WWVB signal on 60 kHz blasts out 70,000 watts that theoretically should reach the entire continental US. Unfortunately for [Anish Athalye], the signals do not reach his Massachusetts dorm, so he built this GPS to WWVB converter to keep his Casio G-Shock self-setting watch on track.

Not a repeater but a micro-WWVB transmitter, [Anish]’s build consists of a GPS receiver module and an ultra low-power 60kHz transmitter based on an ATtiny44a microcontroller’s hardware PWM driving a ferrite rod antenna. It’s not much of a transmitter, but it doesn’t need to be since the watch is only a few inches away. That also serves to keep the build in compliance with FCC regulations regarding low-power transmissions. Heavy wizardry is invoked by the software needed to pull time data off the GPS module and convert it to WWVB time code format, with the necessary time zone and Daylight Savings Time corrections. Housed in an attractive case, the watch stand takes about three minutes to sync the watch every night.

[Anish] offers some ideas for improving the accuracy, but we think he did just fine with this build. We covered a WWVB signal spoofer before, but this build is far more polished and practical.


Filed under: clock hacks, radio hacks

Set Your Clocks to Decimal Time

Many stop lights at street intersections display a countdown of the remaining seconds before the light changes. If you’re like me, you count this time in your head and then check how in sync you are. But did you know that if the French had their way back in the 1890s when they tried to introduce decimal time, you’d be counting to a different beat? Did you know the Chinese have used decimal time for millennia? And did you know that you may have unknowingly used it already if you’ve programmed in Linux? Read on to see what decimal time is along with the answers to these questions.

How We Got Where We Are

Babylonian numerals
Babylonian numerals, By Jose117 [CC BY-SA 4.0], via Wikimedia Commons
First off, just why do we have 60 seconds, 60 minutes and 24 hours in a day? The 24 hour day started with the Egyptians breaking the number of daylight hours into 12. One possible reason for using 12 is that it’s the number of segments we have separated by knuckles on the four fingers of each hand. Notice how easily you can count them using your thumbs, something you should be comfortable with in these days of thumb-manipulated mobile phones.

The use of 60 minutes in an hour and 60 seconds in a minute didn’t come into everyday use until the invention of mechanical clocks in the 16th century. Prior to that their use just wasn’t practical. The selection of 60 for the divisions stems ultimately from the Sumerians with their sexagesimal (base 60) number system, though it’s difficult to find just when they were chosen for the units of time. The words minute and second come from the latin pars minuta prima, which means “first small part”, and pars minuta secunda, or “second small part”.

The second was for a long time defined to be 1/86400 of a mean solar day (60*60*24 = 86400). It was recently defined more precisely as “the duration of 9,192,631,770 periods of the radiation corresponding to the transition between two hyperfine levels of the ground state of the cesium 133 atom”.

But as you can see above, though necessary and useful, all our units were derived from fairly arbitrary sources and are of arbitrarily selected lengths.

Metric Time Vs Decimal Time

Before getting into decimal time, we should clear up what we mean by metric time, since the two are often used incorrectly. Metric time is for measurement of time intervals. We’re all familiar with these and use them frequently: milliseconds, microseconds, nanoseconds, and so on. While the base unit, the second, has its origin in the Sumerian base 60 number system, it is a metric unit.

Decimal time refers to the time of day. This is the division of time using base 10 instead of dividing the day into 60, 60 and 24.

French Decimal Time

French decimal time clock
French decimal time clock, By Cormullion, Own work [CC BY-SA 3.0], via Wikimedia Commons
There were a few attempts in France to switch to decimal time. The first began use in 1794 during the French Revolution (1789-1799). They divided the day into 10 hours, each hour being 100 minutes long, and each minute containing 100 seconds.

This allowed for time to be written as we would, 2:34 for 2 hours and 34 minutes, but also as the decimal numbers 2.34 or even 234. For timestamping purposes we’d write 2016-12-08.234. We could also write it as the fraction 0.234 of the day or written as a percentage, 23.4% of the day. The seconds can simply be added on as an additional 2 digits.

That’s certainly simpler than what we currently have to do with our standard system. To convert 2:34 AM to a single number representing the duration of the day in minutes we have to do:

(2 hours*60 min/hour)+34 min=154 minutes

As a fraction of the day it’s:

154 min/(60 min/hour * 24 hours)=0.1069

And finally, 0.1069 as a percentage is 10.69%. Summarizing, that’s the time 2:34 AM represented as 154 minutes, 0.1069, and 10.69%. You can hardly blame the French for trying. Vive la revolution!

Decimal time went into official use in France on September 22, 1794 but mandatory use ended April 7, 1795, giving it a very short life. Further attempts were made in the late 1800s but all failed.

Swatch Beat watch
Swatch Beat watch

If you do the math, each hour in the French decimal system was 144 conventional minutes long, each minute was 86.4 conventional seconds and each second was 0.864 conventional seconds. If you can get used to an hour that’s twice as long, probably not too difficult a feat, the minutes and seconds are reasonably close to what we’re used to. However, science uses the second as the base of time and that’s a huge amount of momentum to overcome.

Incidentally, in 1998, as part of a marketing campaign, the Swatch corporation, a Swiss maker of watches, borrowed from the French decimal time by breaking the day into 1000 ‘.beats’. Each .beat is of course 86.4 seconds long. For many years they manufactured watches that displayed both standard time and .beat time, which they also called Internet Time.

Chinese Decimal Time

China has as long and varied a history as that of the West, and for over 2000 years, China used decimal time for at least one unit of its time system. They had a system where the day was divided into 12 double hours, but also a system dividing it into 100 ke. Each ke was further divided into either 60 or 100 fen at different times in its history.

Fractional Days

But decimal time is in use today. The fractional day is also a form of decimal time and is used in science and in computers. The time of day is expressed as the conventional 24 hour time but converted to a fraction of the day. For example, if time 0 is 12:00 midnight, 2:30 AM is:

((2*3600 sec/hour) + 30*60 sec/min) / 86400 sec/day = 0.10417

As many decimal places as needed can be used.

One example where fractional days are used is by astronomers for Julian days. Julian days are solar days in decimal form with 0 being noon Universal time (UT) at the beginning of the Julian calender, November 24, 4717 BC. For example, 00:30:00 UT January 1, 2013 as a Julian date is 2,456,293.520833.

Microsoft Excel also uses fractional days within dates similar to Julian dates but called serial dates. The time of day is stored as a decimal fraction of the 24 hours clock starting from midnight.

Unix/Linux Time

We may be repulsed by the idea of switching to an unfamiliar decimal time in our daily lives but many of us have used it when calling the time() function in Unix variations such as Linux. This function returns the current time in seconds since the beginning of some epoch. The Unix epoch began on 0:00:00 UTC January 1, 1970, a Thursday. But at least those seconds are of the length we’re used to — no need to resynchronize our internal counter there.

Vive La Revolution!

But while the French revolution is in the past, rebels do exist here at Hackaday. [Knivd] is one such who has devised a decimal time called C10 that’s slightly different from the French’s. And he already has at least one fellow conspirator, [Danjovic], who’s already made a decimal clock called DC-10. How long before we’re all counting to the beat of a different drum, and crossing those intersections before the light has changed?


Filed under: clock hacks, Featured, Interest

These Sands Of Time Literally Keep Time

Hour glasses have long been a way to indicate time with sand, but the one-hour resolution isn’t the best. [Erich] decided he would be do better and made a clock that actually wrote the time in the sand. We’ve seen this before with writing time on a dry erase board with an arm that first erases the previous time and then uses a dry erase marker to write the next time. [Erich]’s also uses an arm to write the time, using the tip of a sea shell, but he erases the time by vibrating the sandbox, something that took much experimentation to get right.

To do the actual vibrating he used a Seeed Studio vibration motor which has a permanent magnet coreless DC motor. Interestingly he first tried with a rectangular sandbox but that resulted in hills and valleys, so he switched to a round one instead. Different frequencies shifted the sand around in different ways, some moving it to the sides and even out of the sandbox, but trial and error uncovered the right frequency, duration, and granular medium. He experimented with different sands, including litter for small animals, and found that a powder sand with small, round grains works best.

Four white LEDs not only add to the nice ambience but make the writing more visible by creating shadows. The shells also cleverly serve double duty, both for appearance and for hiding things. Shells cause the arms to be practically invisible until they move (well worth viewing the video below), but the power switch and two hooks for lifting the clock out of the box are also covered by shells. And best of all, the tip that writes in the sand is a shell. There’s plenty more to admire about the cleverness and workmanship of this one.

We also have to wonder at what other dioramas are possible with this setup. How about a Halloween setting with a skeleton emerging from the sand? Perhaps white sand would make good snow for a Christmas setting?

Here’s the sandclock at an earlier testing stage but where you can better see the workings in action.

[via Adafruit]


Filed under: clock hacks

Daylight Saving Time – Whys And Why Nots

We recently went through our twice yearly period of communal venting called adjusting for daylight saving time (DST), or British Summer Time (BST) as it’s called in the UK. But why are we changing the time? Seriously, who caused all this? Does it do any good? Do we still need it? And what can we do about it? As it turns out, most of us want it, as you’ll see below.

We Live In Good Times

Ancient Roman time keeping
Ancient Roman time keeping, By Darekk2 – Own work [CC BY-SA 4.0], via Wikimedia Commons
It might help you to know that we have it easy, or at least programmers do. In ancient Roman times, rather than subtract or add an hour twice a year, they changed the length of the hour itself, on a daily basis. The period of daylight from dawn to dusk was divided into 12 hours, but since the length of daylight varied throughout the year, the length of those 12 hours would adjust accordingly. And since the length of daylight varies by latitude too, the length of the hours would also vary by latitude. Imagine having to account for that in your software, and without the aid of a GPS to tell you your latitude.

Fallacies of Daylight Saving Time

A common misconception is that DST is for helping farmers. However, farmers have actually opposed it. Farmers have to do much of their farming based on when the sun is up. Setting the clock back in the fall, which is harvest time, means less time to get crop to market. Cows also don’t adapt well to the change in milking schedule, but hired workers work according to the clock.

Another misconception is that Benjamin Franklin invented daylight saving time. In an anonymous letter, Franklin suggested only that his fellow countrymen work during daylight hours and sleep when it was dark. This was to save on the expense of candles during the early morning. However, he didn’t mention adjusting the clocks.

The first modern proposals for saving daylight came from New Zealand entomologist George Hudson in 1895 and independently, William Willett, a builder and outdoorsman in England in 1905. Both were fond of time spent in daylight outdoors in the evening. Hudson proposed advancing the clock by two hours on October 1st and back again March 1st. Willett, interestingly, proposed moving the clock by 80 minutes in increments of four 20 minute weekly steps. Neither succeeded in getting the changes to occur.

Going to War and Saving Time

1918 poster - US Congress passes DST
1918 poster – US Congress passes DST

Wide adoption of the time change had to wait for World War I. In April, 1916 the German Empire and Austria-Hungary both were the first countries to adjust the clock forward in order to conserve coal. By 1918 many other countries had followed suit. However, with some exceptions, including Canada, the UK, France and Ireland, the practice was abandoned after the war. Over the years that followed various countries occasionally adopted and dropped it again, including during World War II.

In the US, from 1945 to 1966 there was no federal law regarding daylight saving time and so it was up to localities to decide if they wanted to keep using it. But in 1962, the transportation industry was finding the patchwork of different times problematic and pushed for federal legislation, resulting in the Uniform Time Act of 1966. As of 1967, standard time was mandated with time changes on the last Sunday of April and the last Sunday in October, though states could opt out.

The Uniform Time Act was amended in 1986 to have the daylight saving time last longer by having the change occur in the first Sunday in April instead of the last. Among the biggest lobbyists for the 1986 change were the barbecue grill and charcoal industries as well as the golf industry, all of whom would benefit from the extra outdoor evening activity.

Then in 2005 another month was added to DST in the US, this time by moving it to the 2nd Sunday in March and first Sunday in November. Lobbyists for the change included the Sporting Goods Manufacturers Association, the National Association of Convenience Stores (NACS) and, interestingly, the National Retinitis Pigmentosa Foundation Fighting Blindness (retinitis pigmentosa’s symptoms include decreased night vision). The NACS serves both convenience stores and the fuel retailing industry, the implication again being that having more leisure time in the evenings with daylight would cause more people to venture outdoors and away from home doing outdoor activities, benefiting those industries.

So in summary, why do we have daylight saving time? Initially it was to save energy resources during wartime. In the US it was later spurred on to clean up a patchwork of different times and more recently to benefit industries that make money from outdoor evening activities.

Do We Still Need It?

Some may say that with increasing technological and urban society, we may not need it anymore and that farming is becoming ever more automated. However, as we’ve pointed out above, the reasons for introducing daylight saving time have had to do with energy savings and encouraging evening outdoor activity, and not with farming.

Does it really result in an energy savings? In response to the 2005 change in the US, extending it by a month, a study was done by the Department of Energy for Congress looking at the effect 2007 had compared to prior years without extended daylight saving time. From analyzing data of the output of 35 utilities, statistical analysis showed an electricity savings of 0.03% of the total national electricity consumption of 3,900 TWh in 2007, amounting to 0.46% to 0.48% for each day of extended daylight. Comparing the regions, the North saved 0.51% and the South 0.42% daily. So though there are regional differences in savings, overall the savings is small.

The study also found through statistical analysis that there was no measurable impact on passenger vehicle gasoline consumption or traffic volume in 2007.

Enjoying the outdoors
Enjoying the outdoors

As for evening outdoor activity, one way to measure it is by TV viewership. Every year TV viewing in the early evening drops in lock-step with the clock going forward. This is measured with TV ratings in the US. Most telling is that this happens even for News shows, which have a fairly constant subject matter. In March 2015 it was reported that ABC, CBS and NBC evening news programs collectively lost three and a half million viewers compared to the previous, pre-DST week. Clearly people do take advantage of the extra hours of daylight.

If the numbers from convenience stores that sell gas are to be relied on, the 2005 change resulted in an added $1 billion in gasoline sales. Similarly, the barbecue grill and charcoal industries say they earn an extra $200 million.

So rather than say we still need daylight saving time, it looks more like we still want it, no matter how much we groan about adjusting the clock. We use it to go to sporting events, golf, or visit friends for a grilled steak. At least that’s what the data indicates.

Health, Happiness, and Even Crime

Turning back to standard time
Turning back to standard time

But that’s all to do with the latitudes of the US. At more northern latitudes such as those in Canada, England and even further north, Scotland, the winter hours become more of a focus. The shortest day in Edinburgh, Scotland, December 21st, is just six hours and 57 minutes long. People go to work in darkness and return home in darkness. In that case the argument could be made for keeping daylight saving time, called British Summer Time (BST) in the UK, all year round.

Daylight saving does appear to have an effect on crime. A 2012 study from Stanford University about the effect of the spring time change on crime found that robberies decreased by 40% when comparing the period with more evening daylight to that with less.

There are also studies that show it can have a negative medical effect. A study in Denmark of depression cases in psychiatric hospitals of cases from 1995 to 2012 found an 11% increase in severe depression during the period immediately after the change when the clock is moved back and darkness comes earlier at the end of the day, with a gradual decrease after 10 weeks. There’s also a study by the University of Alabama that found a 10% increase in the risk of a heart attack on the Monday and Tuesday following setting the clock ahead in the spring, some attributing it to sleep deprivation.

There are also multiple studies showing increased injuries in the workplace on the Monday following the switch to daylight saving time. One study by doctoral students at Michigan State University, analyzing injuries reported to the Mine Safety and Health Administration, found that on average 3.6 more injuries occurred on the Monday and 2,649 more days were lost as a result, a 68% increase.

Image source: Wikimedia Commons
Image source: Wikimedia Commons

And what about the rest of the world? Some of us are so caught up in our obsession with these twice-yearly changes that we don’t realize that much of the world doesn’t make them, as the following map shows. The blue and orange are the areas that do make them (the different colors are for the different hemispheres), the light grey areas don’t anymore but did at one time, and the dark grey areas never have.

The Hacker Opportunity

DST compensation Ping Pong Clock

And so it appears there’s an opportunity here. We want daylight saving time for spending time outdoors in the evening but we don’t like adjusting our clocks. Who better is there to modify all those clocks to be self-adjusting than the Hackaday community?

Searching Hackaday brings up surprisingly little on this though. There’s a fix for a Heathkit clock that forces you to cycle forward only, fixing what would otherwise be a cumbersome adjustment. And then there’s our own fearless leader [Mike Szczys]’s automatic daylight compensation for his delightful Ping Pong Clock, and that’s about it! Where’s the robot arm that playfully reaches out from inside the cuckoo clock to give the minute hand an extra rotation? Or how about a master clock to rule all your other clocks so that there’s only the one adjustment to be made?

Conclusion

To end on a personal note, I like fooling myself in the fall by waking up without having adjusted the clock back, and then adjusting it back and being silly with delight at having gained an extra hour for the day. Conversely, I don’t like setting it forward in the spring — groan, lost an hour in my day. But I take advantage of the extra time cycling or reading outside in the evening. As I write this, however, it’s winter, 4:30 PM and it’s dark outside, and to keep active outdoors in the evening, I have to keep reminding myself that it’s not night. There clearly are both whys and why nots to this issue.


Filed under: Featured, Interest