Colourful Connected Clock

Description

  • A thin beautiful full colour segment display
  • Easy to read from a distance (even when you are half at sleep)
  • Always showing correct time (never set the time again: Wi-Fi + NTP enabled)
  • Auto adjust intensity and night mode
  • Few components
  • 3D printed circuit board – low cost and easy to replicate
  • No visible flickering light (400Hz PWM)
  • Super thin (4mm)

Background

I have been looking for a clock in my bedroom that allows me to read the time during night and day without effort. I have tried a projector clock – which works ok when it’s dark, but is almost impossible to read at daytime.

As always: When you can’t find something that fulfils your needs – build a better version yourself!

Development

I started with the segment design. Personally, I think that most 7 segment fonts have too sharp appearance (curves and corners). I spent way too many hours in redesigning the digits (definitely overkill, but once you are down the rabbit hole…). In the end, I think I got a striking rounded, friendly design that is easy to read and has a retro look without looking dated.

I didn’t use italic digits because I wanted the clock to look calm, plain and neutral (italic segments tend to add speed and futuristic look).

By using an ESP8266 and ws2812 LEDs the electronic design was dead simple. An LDR and a resistor configured as a voltage divider allows light measurement and dynamical light intensity. I also added a 3.3V LDO and two decoupling capacitors. It is truly a minimalistic design using only two I/Os on the ESP. Power, Wi-Fi and light in, time out.

My first idea was to design a custom PCB with LEDs for each segment. I quickly realized that by adopting the spacing between the digits to a fixed distance I could use a strand of addressable LED strip, replacing the need for a custom PCB. This means that 12 LEDs will not be used, but it’s a small price to pay for the gained simplicity. By choosing different LED strip densities (number of LEDs/m) I could adjust the size of the clock. I settled with the standard 60led/m which is easy to get and results in a medium size clock (190x54x4mm)

By using my 3DPCB idea, I integrated the components and wires in the opaque light blocking structure. I separated the electronics from the segments, allowing me to tune the design if needed. The light blocking structure was printed in white PLA (which is far from opaque), but still limits light leakage and at the same time allows background LDR measurement without visible components (through the white front). The segments are printed in transparent PLA which results in a light diffusing plastic that works really great.

Program

Writing the code for the clock was easy due to existing WiFi, NTP and WS2812 LED libraries. I used the “NeoPixelBrightnessBus by makuna” since I’ve had problems with light glitches on other libraries. Once the code connects to WiFi and gets the time from the NTP sever, it’s simply a matter of turning on the correct LEDs.

ledDigit() selects the right segments in ledOut[6] bitmask array.

updateLedOut() reads the bitmask and shows either a slow changing rainbow with a pulsating/breathing “:” in day mode, or a dark purple static light when ambient light reading is below nightMode.

Note that I capped max intensity to 50% (maxIntensity=128) since I want to tell the time, not illuminate the room…

Assembly

Building the clock is rather easy. To configure the code, add network credentials and select correct time zone. Then you need to program the ESP12E module and verify that the OTA firmware upgrade is working. You can google how the programming can be done using a nodeMCU development board with removed module (like I used) or an USB/serial adapter, or an Arduino.

3D print the electronic base, the top and the transparent segments. Only use support for the front part, not the base or segments. Then glue the segments to the front part (I used PVA / white wood glue).

Add thin copper wire in the designated channels and solder the components. Cut 3 pieces of LED strip with 8 LEDs and 2 pieces with 9 LEDs. Place them in the corresponding positions and solder their connections on both ends. Make sure that you have the correct direction (from the ESP in the upper right corner (component side) and zigzag down to the bottom left).

Verify that the clock works by connecting 5V to the bottom right connections (GND at the bottom, VCC above).

If you build it and appreciate the work, I would be happy if you shared your experience in the comments below.

Bill of Materials (BOM)

  • 3x 3D printed parts (counting the segments as one ;)
  • Some strands of 0.3mm copper wire (from RK cable)
  • 1x WS2812 LED strip with 42 bare (no IP rating) LEDs (60 LEDs/m)
  • 1x ESP12E or F module
  • 1x LDR resistor
  • 1x 1k resistor (not SMD)
  • 1x 3.3V LDO SOT-223 >=350mA – like NCP1117ST33
  • 2x 10uF Capacitors (SMD type)

Documents

Licensing

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

2 Replies to “Colourful Connected Clock”

  1. Your designs are very inspirational, thanks for sharing the processes you worked through – really affirms some of my thinking. Some days you tinker about, only to wonder if you’re over complicating something or re-inventing the wheel; I can see you must have had a bunch of trial and error prototypes to work your ideas out. A stack of 3 prints you discard almost immediately when you see you missed something entirely… I know it can make me feel a bit stupid at times when there are obvious lapses in judgement. Anyway, in the end your work is beautiful, really well done.

    1. Thanks, I’m glad you like it!
      As you are guessing, there is a lot of trial and error until I get it right, but that’s the way it should be when you are making something new. It is an iterative process and I’m glad to live in a time with 3D printers that can reduce each iteration to minutes.

      It is truly difficult to make something simple ;)

Leave a Reply to Johan von KonowCancel reply

%d bloggers like this: