Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display


Nicu Florica blogged about his adjusting clock with alarm, hygrometer and thermometer on 1.8″ ST7735 display:

I use feature from article Another adjusting clock with alarm & thermometer using DS3231 on 1.8″ ST7735 display and change reading internal temperature of DS3231 with DHT22 senzor (AM2302), but you can use a cheaper and not very precise DHT11 senzor.
By using educ8stv_rtctft160_alarm_dht.ino or much better educ8stv_rtctft160_alarm_eeprom_dht.ino sketch, on display you can see: name of day, date, hour clock, hour alarm, temperature and humidity

Project details at Arduinotehniq blog.

Check out the video after the break.

NixieBot Films Your Tweets

[Robin Bussell]’s NixieBot is a mash up of new age electronics and retro vintage components and he’s got a bunch of hacks crammed in there. It’s a Nixie tube clock which displays tweets, takes pictures of the display when it encounters tweets with a #NixieBotShowMe hash tag, and then posts requested pictures back to twitter. If a word is eight characters, it takes a snapshot. If it’s a longer message, NixieBot takes a series of pictures of each word, converts it to an animated GIF, and then posts the tweet. In between, it displays random tweets every twenty seconds. You can see the camera setup in the image below and you should check out the @nixiebot twitter feed to see some of the action.

nixiebot_05For the display, he’s using eight big vintage Burroughs B7971 Nixie Tubes. These aren’t easy to source, and current prices hover around $100 each if you can find them. The 170V DC needed to run each tube comes from a set of six 12V to 170V converter boards specifically designed to drive these tubes. Each board can drive at least a couple of nixies, so [Robin]’s able to use just four boards for the eight tubes. Each nixie is driven by its own “B7971 SmartSocket“, a dedicated PIC16F690 micro-controller board custom designed for the purpose. A serial protocol makes it easy to daisy-chain the SmartSockets to build multi character displays.

nixiebot_01The rest of the build is pretty straight forward. A Raspberry-Pi running Twython for Twitter communications, GrafixMagick for GIF creation, Picamera for taking pictures and GPIO libraries for controlling the display. The software to run all of this is hosted on his GitHub repository with some basic instructions on how to put it together.

A more detailed reference is available on the NixieBot blog. He’s designed a Pi shield board to house the high voltage modules, a 5V DC-DC converter and the Pi GPIO header. He’s probably got a few more to spare, so with a bit of luck in finding the elusive Nixie tubes, and some deep pockets, it ought to be relatively easy to build your version of the NixieBot.

And if the NixieBot has got your interest piqued, check out “The Art of making a Nixie Tube” featuring the work of [Dalibor Farnby].

Filed under: Raspberry Pi

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?


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

A Different Sort of Word Clock

Our wonderfully creative community has a penchant for clocks. We have seen so many timepieces over the years that one might suppose that there would be nothing new, no instrument of horology that would not elicit a yawn as we are presented with something we’ve seen many times before.

Every once in a while though along comes a project that is different. A clock that takes the basic idea of a timepiece and manages to present something new, proving that this particular well of projects has not yet quite run dry.

Such a project is the circular word clock made by [Roald Hendriks]. Take a conventional circular wall clock and remove the hands and mechanism, then place LEDs behind the numbers. Add the words for “Quarter”, “Half”, etc. in an inner ring, and place LEDs behind them. Hook all these LEDs up to a microcontroller with a real-time clock, and away you go with a refreshingly novel timepiece.

[Roald]’s clock has the wording in Dutch, and the brain behind it is an Arduino Uno with the relevant driver ICs. He’s provided a video which we’ve put below the break, showing the clock in operation with its various demo modes.

We’ve seen so many word clocks over the years it’s best to give you a stream of them through our word clock tag. It’s good of this one to come along and refresh the genre.

Filed under: clock hacks

Exquisitely Crafted Nixie Tube Weatherclock

The Weatherclock is more than just a clock sporting Nixie tubes and neon lamps. There is even more to it than the wonderful workmanship and the big, beautiful pictures in the build log. [Bradley]’s Weatherclock is not only internet-connected, it automatically looks up local weather and sets the backlights of the numbers to reflect current weather conditions. For example, green for roughly room temperature, blue for cold, red for warm, flashing blue for rain, flashing white for lightning, scrolling white for fog and ice, and so on.

neonixieclock_02The enclosure is custom-made and the sockets for the tubes are seated in a laser-cut plastic frame. While seating the sockets, [Bradley] noticed that an Adafruit Neopixel RGB LED breakout board fit perfectly between the tube leads. By seating one Neopixel behind each Nixie indicator, each number could have a programmable backlight that just happened to look fabulous.

Witpreboxh an Electric Imp board used for WiFi the capabilities of the Weatherclock were rounded out on the inside. On the outside, a custom enclosure ties it all together. [Bradley] says his family had gotten so used to having the Weatherclock show them the outside conditions that they really missed it when it was down for maintenance or work – which shouldn’t happen much anymore as the project is pretty much complete.

It’s interesting to see new features in Nixie clocks. Nixie tubes have such enduring appeal that using them alone has its own charm, and at least one dedicated craftsman actually makes new ones from scratch.

Filed under: clock hacks

Heathkit: Getting Closer This Time?

We’ve been following the Heathkit reboot for a while now, and it looks like the storied brand is finally getting a little closer to its glory days. I was thumbing through the new issue of QST magazine while I was listening in on a teleconference for the day job – hey, a guy can multitask, can’t he? – when I spied an ad for the Heathkit GC-1006 digital clock, which they brand the “Most Reliable Clock”. As soon as the meeting was over, I headed over to the Heathkit website to check out this latest offering.

I had cautiously high hopes. After the ridiculous, feature-poor, no-solder AM radio kit (although they sensibly followed up with a solder version of that kit) and an overpriced 2-meter ham antenna, I figured there was nowhere for Heathkit to go but up. And the fact that the new kit was a clock was encouraging. I have fond memories of Heathkit clocks from the 80s when I worked in a public service dispatch center; Heathkit clocks were about the only clocks you could get that would display 24-hour time. Could this actually be a kit worth building?

Alas, the advertisement was another one of those wall-of-text things that the new Heathkit seems so enamored of. And like the previous two kits offered, the ad copy is full of superlatives and cutesy little phrases that really turn me off. Then again, most advertising turns me off, so I’m probably not a good gauge of such things. Nor am I sure I’m in the target demographic for this product – in fact, I’m not even sure to whom this product is being marketed. Is it the younger crowd of the maker movement? Or is it the old-timers who want to relive the glory days of Heathkit builds? Given the $100 price, I’d have to say the nostalgia market is the most likely buyer of this one.

To be fair, $100 might not be that much to spend on a decent clock. I’m a bit of a clock snob, and I’ve gotten to the point where I can almost tell which chip is in a clock just by looking at the controls. The feature set of a modern digital clock has converged to a point where every clock has almost exactly the same deficiencies. The GC-1006 claims to address a few of my hot button issues, like not being able to set the time to the exact second – I hate that! An auto-dimming display is nice, as is a 12- or 24-hour display, a 10-minute timer (nice for hams, who are required to ID their station every 10 minutes), and a battery backup that claims to last for 4 weeks.

Is this worth buying? At this point, I’m on the fence. Looking at an unboxing video, it appears to be a high-quality kit, and it would be fun to build. But spending $100 on a clock might be a tough sell to my loan officer.

Still, I think I might take one for the team here so we have a first-hand report of what the new Heathkit is all about. And it would be nice to build another Heathkit product. I’ll let you know how it goes.

Filed under: news, rants

ESP Clock Needs More Power

[Victor-Chew] is tired of setting clocks. After all, here we are in the 21st century, why do we have to adjust clocks (something we just did for daylight savings time)? That’s why [Victor] came up with ESPClock.

Based on a $2 Ikea analog clock, [Victor] had a few design goals for the project:

  • Automatically set the time from the network
  • Automatically adjust for daylight savings time
  • Not cost much more than a regular clock
  • Run for a year on batteries

The last goal is the only one that remains unmet. Even with a large battery pack, [Victor’s] clock runs out of juice in a week or so. You can see some videos of the clock syncing with network time, below.

It is easy to armchair quarterback, but we think [Victor] should investigate putting the processor in a deep sleep mode for most of the time. That probably means you’d need a button to wake it up for configuration and there might be some other modifications required.

If you want to waste a few more ESP modules, you could try this clock instead.

Filed under: clock hacks, Network Hacks, news

Really Big Digital Clock Finds Use for Really Big 3D Printer

What does it take to make a really big digital clock? If [Ivan Miranda]’s creation is any gauge, it takes a really big 3D printer, an armful of Neopixel strips, and a ton of hot melt glue.

It looks like [Ivan]’s plus-size clock is mainly an exercise for his recently completed large-bed custom 3D printer, in itself a project worth checking out. But it’s a pretty ambitious project, and one that has some possibilities for enhancements. Each of the four seven-segment displays was printed separately, with a black background, translucent white for the segments, and recesses for five RGB LEDs each. The four digits and colon spacer are mated together into one display, and an ESP8266 fetches the time from a NIST server and drives the segments. What’s really interesting about [Ivan]’s projects is that he constrains himself to finishing them each in a week. That explains the copious amount of hot glue he uses, and leaves room for improvements. We’d love to see this display built into a nice walnut case with a giant red diffusing lens. Even as it stands it certainly makes a statement.

We’ve featured other outsized seven-segment displays before, but few as big as this one.

[via r/arduino]

Filed under: clock hacks, led hacks

Sunrise Alarm Clock with Organic Twist

Most hardware hackers have a clock project or two under their belt. A pretty common modification to a generic clock is to add lights to it, and if the clock has an alarm feature, it’s not too big of a stretch to try to get those lights to simulate a sunrise for a natural, peaceful morning alarm. The problem that a lot of us run across, though, is wiring up enough LEDs with enough diffusion to make the effect work properly and actually get us out of bed without an annoying buzzer.

Luckily for all of us, [jarek319] came up with an elegant and simple solution that should revolutionize all future sunrise alarm clock builds. He found a cheap OLED display and drove it with an LM317 voltage regulator. By driving the ADJ pin on the regulator, he was able to effectively drive the OLED with a makeshift PWM signal. This allows the OLED’s brightness to be controlled. [jarek319] threw some NTP code up on an ESP12E and did a little bit of programming for the alarm, and the problem is solved.

While an OLED is pretty much the perfect solution for a sunrise alarm clock, if you have a problem sourcing one or are just looking for an excuse to use up a strip of addressable LEDs, you can build a sunrise alarm clock out of almost any other light source.

Filed under: clock hacks

Yet another Arduino clock


Sverre Holm blogged about his Arduino clock project:

Its main features are:

  • Controlled by a GPS module outputting data over an RS232 serial interface, and handled with the TinyGPS++ library
  • Shows raw GPS data such as UTC time and date, position, altitude, and number of satellitess
  • Shows derived GPS data such as 6-digit locator
  • Finds local time and handles daylight saving automatically using the Timezone library
  • Finds local sunset and sunrise, either actual value, or civil, nautical, or astronomical. The library is Sunrise.
  • The clock also gives local solar height based on the Sunpos library from the K3NG rotator controller.
  • Finally, the clock also provides the lunar phase based on ideas found here and using a reference new moon on 11 November 2015, 11:47 (UNIX time 1447264020)

More info at LA3ZA Radio & Electronics.