The Corona Clock

Schools are closed here in Germany until after Easter vacation, and that means that our almost-six-year-old son Max is staying at home with us. The good news is that my wife and I work from home anyway, so it’s not too stressful as long as he can look after himself for eight hours per day. The bad news is that there’s no way a kindergarten kid can take care of himself for such long stretches, and we don’t want to just park him in front of the boob tube. At least there’s two of us.

The new stay-at-home life has required some adjustment, but for at least the first five days (and counting) it’s working out pretty darn well. One trick: my wife came up with the idea of a visual schedule to help Max divide his day up into kindergarten-sized chunks, and then we added an LED strip behind it to turn it into a linear clock of sorts. And we did it with stuff we had lying around the house.

Granted, it’s not a super deep hacky-hack, and some of you out there could probably get it done with a handful of 555 timers. But it was quick, gets the job done, and heck, with NTP sync, it’s the most accurate kiddie clock in the world! So those of you out there who are stuck like we are, trying to balance childcare and working from home, here’s a quick project that can increase familial harmony while giving you an excuse to order more LED strips.

Ingredients

There isn’t much to the Corona clock. An ESP8266, in my case running NodeMCU firmware, connects over WiFi and displays the time on a WS2812 strip, connected on pin 4. In our case, I had a meter-long 60-LED strip, and we needed to cover approximately 15 waking hours, so it’s just a matter of lighting up one LED every 15 minutes. We spent more time coming up with a day-plan and looking for clip art than we did coding or soldering. I tried to think of cool things to do with the colors, but in the end just went with my son’s favorite: blue. (Any good ideas? Feel free to fork it and let me know.)

I mounted the strip to what I had in the basement: a conveniently 1 m aluminum U extrusion. If you’ve got a yardstick, or even a long-enough piece of cardboard, you’re in good shape. The LED strip had a sticky backing, but there’s no small amount of “magic” tape used to keep everything else together and in place. You can probably think up something smarter. On to the clock face!

Art, Aesthetics, and User Experience

The one trick was printing out the cells for the clock to match the spacing of the LEDs. They’re a maddening 1.66666 cm center-to-center, which means that I had to open up Inkscape to get the art done. But then you’re home-free, because in Document Properties, aside from setting up for landscape printing, you can set up a grid of any size that you want, and even darker lines every four grids, or one hour. Enabling snap-to-grid made all our boxes exactly the right sizes, and I imported and scaled all of the clip-art that my wife found.

If you’re looking for a nice diffused LED look, a 20 mm deep U channel with a paper front as diffuser is probably pretty close to ideal. I ran some rainbow fades up and down the length of it, and they look great. But for an “accurate” clock that doesn’t require color mixing, it’s probably a little blurry. Anyway, it works. Max can tell when it’s the last LED in his blocks of playing-alone time and hasn’t missed one yet. For a kid who can’t yet tell clock time, it’s a pretty neat experience for him to be able to say “Dad, come look at the clock, it’s time to go out with the dog!” and order us around for a change. I’ll get my revenge when kindergarten opens back up again.

Corona Clocks and Co.

It’s funny how small things like this can change what would be a daily conflict — the fight over Max’s schedule, and his feeling that it’s out of his control — into a pleasure. Granted, Max will be happier when he is back to playing with his friends, and we’ll be happier not working nights to make up for the “lost” couple hours of childcare during the day: free time got pushed somewhere off the timeline for the moment. But it’s also been a sincere pleasure to take an hour off to go on a bike ride in the forest with Max. Quality corona time?

Are you quarantining or working from home with kids? Got any cool projects, hacks or not, to help out? Post ’em up in the comments.

19 thoughts on “The Corona Clock

  1. In a world where the fragility of the Internet is exposed, this lacks one thing, frameworks!

    we need druffle to communicate to the puffle server, to frabbelize the data for the babble servers, communicating with the grabble infrastructure, hosted on the drabble servers, running the booble framework, which are hosted on the bablezon servers.

    More connectivity is what we need, not less! more dependence, not less!

    seriously though, nice!

    1. Aw c’mon! It relies on getting to an NTP server on power-up. If that fails, it’s hosed! How’s that for a dependency?

      Of course, as long as our power doesn’t go out, it runs just fine thereafter without WiFi. In fact, I should probably add some code in there to turn it off… it’s on (b/c lazy) and not doing _anything_. It’s not much power, but it’s stupid to leave it radiating anyway.

      But it’s funny that you mention frameworks, b/c I usually write a _lot_ closer to the metal than NodeMCU, and I was already feeling dirty that I had just pulled in all the drivers I needed and didn’t even have to consult the datasheet once. :)

    2. Your post brought to us by –

      OS – Operating System – framework
      Browser – Client application
      NS – Name Server – protocol
      SoA – Start of Authority – protocol
      DNS – Domain Name Server – protocol
      A Record – from DNS – protocol
      IP – Internet Protocol – protocol
      TCP-IP – Transmission Command Protocol / Internet protocol – protocol
      HTTP – HyperText Transfer Protocol – protocol
      SSL – Secure Socket Layer – protocol
      HTTPS – the above two together
      Linux – Operating System – framework
      Apache – framework
      PHP – framework
      MySQL – Structured Query Language – protocol / framework
      Wordpress API – Application Protocol Interface – custom protocol / framework
      DOM – Document Object Module – rendering framework
      HTML – HyperText Markup Language – protocol
      Javascript – framework
      jQuery – framework

      Many of these are repeated. There are more, like the rendering protocol between the browser and the graphics card but that can be considered a feature of the OS.

      As you can see, most of these are protocols and not framworks. Most protocols are human readable and easy to learn. I know most of the above.

      As is the case for IoT, most of these are for compatibility and many are optional.

      Protocols last forever for compatibility reasons. When you program your Arduino via a USB serial bridge you are using a protocol that started with teletext machines decades ago.

      When you are using the AT command set for Bluetooth you are using a protocol that started with the very early Modems.

      The bottom line is that while framworks are to some degree avoidable, protocols are not. If you learn some of the protocols then you can build your own framework.

      Protocols are surprisingly easy to learn. Once you learn one, only the namespace really changes for others.

    1. Actually yes. Did you know that there’s a heck of a lot of original VW bugs still running around? Never mind the odd Porsche painted green.

      Actually Elliot that’s an amazing idea. But where’s ET? He’s there someplace?

    2. Philips had the same “issue”, the 70’s Philips stuff is so massively overengineered, it still works fine.
      Living in the Eindhoven area (where Philips started out), it’s easy for me to pick up well loved test equipment complete with manual (fold out schematics included), basically in an almost NOS state for next to nothing.

    1. When I was a kid, we got time offbat Easter, I can’t remember if it was a full week.

      I can’t even remember when it became “spring break” though sometime after 1976. Thiugh, when “spring break” happens it usually isn’t spring here, it’s earlier than when we got time off at Easter.

  2. This helps him keep track of events coming up, but does this help him learn how to read a clock? Maybe add an analog clock face, without hands, next to each item – let him draw the hands in when you do that event.. tie this together with reading a digital clock and he’ll have it down in no time.

Leave a Reply

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