Color Changing Clock Gets A Pi Zero Heart

Hackaday reader [Don] dropped by the tip line recently to let us know about the latest version of his color-changing LCD clock project. This is his second version of the hardware which makes some pretty big improvements over the original, including moving from the Pi B to the Pi Zero and an internal simplification of the wiring. He mentions the next revision of the project will focus on Google Home integration, which should be interesting to see.

As a father of two pre-school age children, he was looking for a way to help his kids understand the concept of time and scheduled activities. Colors and shapes come fairly easy to children of this age, but time and how it relates to the day is a bit more difficult for them especially as their comprehension of numbers is still developing. [Don] reasoned that even if they couldn’t read the numbers on the clock yet, if he had the display change colors to indicate different periods of the day (sleep, play, cleanup, etc), it would not only keep them on schedule, but reinforce the meaning of the numbers on the screen.

ShiftBrite installed in the projector.

The project was made infinitely easier by a lucky find at a local retailer. For $10 he got a kid-friendly looking clock that utilized a simple projector to backlight the LCD display. This meant [Don] would just need to swap out the stock lighting module for a controllable RGB LED, and the hardware modifications would essentially be complete.

Even the Pi Zero fits perfectly inside the case of the clock, the only modification necessary was cutting a little hole in the back for the Pi’s micro USB port. His earlier version used an external Pi B connected to the clock via CAT5, so getting it all integrated into the one device is a huge improvement, especially when little kids are involved. Moving the Pi and its 5 V pins into the clock itself also allowed [Don] to drop the voltage regulator required previously.

With the basic hardware for a color changing LCD clock together, the rest of the project was just a matter of software. After some research, [Don] came across RPi-ShiftBrite by [Hive13] and made his own fork which added some features necessary for his project, namely the ability to quickly set the ShiftBrite to a specific color on the command line. To schedule the color changes, he used the very slick minicron: a web-based tool to create and monitor Linux cron jobs.

The Pi itself does not actually interface with the clock, and with no onboard RTC it’s necessary to keep it updated with NTP or else the times will become desynchronized. It can be necessary to sync the Pi’s clock to the Internet as often as every hour to make sure the colors shift at the appropriate times. The addition of a RTC module like the DS1307 could alleviate this issue and might be something to consider for a future revision.

All told, a fantastic project and something we’ll be sure to keep our eyes on as it progresses. We’ve seen our share of unique Raspberry Pi powered clocks, and even a few color changing ones, but this approach is easily the most straight-forward we’ve seen.

Continue reading “Color Changing Clock Gets A Pi Zero Heart”

Colorful Clock

A Colorful Clock For Toddlers

[Don] and his wife were looking for a way to teach their two-year old daughter how to tell time. She understood the difference between day and night, but she wasn’t old enough to really comprehend telling the actual time. [Don’s] solution was to simplify the problem by breaking time down into colored chunks representing different tasks or activities. For example, if the clock is yellow that might indicate that it’s time to play. If it’s purple, then it’s time to clean up your room.

[Don] started with a small, battery operated $10 clock from a local retailer. The simple clock had a digital readout with some spare room inside the case for extra components. It was also heavy enough to stay put on the counter or on a shelf. Don opened up the clock and got to work with his Dremel to free up some extra space. He then added a ShiftBrite module as a back light. The ShiftBrite is a high-brightness LED module that is controllable via Serial. This allows [Don] to set the back light to any color he wants.

[Don] already had a Raspberry Pi running his DIY baby monitor, so he opted to just hijack the same device to control the ShiftBrite. [Don] started out using a Hive13 GitHub repo to control the LED, but he found that it wasn’t suitable for this project. He ended up forking the project and altering it. His alterations allow him to set specific colors and then exit the program by typing a single command into the command line.

The color of the ShiftBrite is changed according to a schedule defined in the system’s crontab. [Don] installed Minicron, which provides a nice web interface to make it more pleasant to alter the cron job’s on the system. Now [Don] can easily adjust his daughter’s schedule via web page as needed.