February 10, 2021

Fuzzy Logic Clock

Need to know the exact time? Nah. My attempt at a clock that's also art!

Fuzzy Logic Clock

So... unashamedly... I visited a work mate's house over Christmas and saw a clock that I was absolutely amazed by. He'd received it as a present from his wife many years ago and practically designed his house around accomodating it in the main living area. I'm hoping he sees this as a tribute rather than plagiarism!

I'd seen word clocks online before - https://words.onlineclock.net/fuzzy/ - but never had I seen one that had a corten steel face and was practically art.

So - spurred on by my dear friends Shelley and Morgan - I decided I should design and make one.

If you're wondering why I've called it a "fuzzy logic" clock - I did part of my university honours thesis on fuzzy logic so I feel a longstanding attachment to it. If you want to read up (or sleep) check out this article on Wikipedia.

Status Prototype
Platform ESP8266 Custom PCB
Budget $200 ea
Date Completed March 2021
Fusion360 3D model screenshot.

Summary of operation

Basically there's a whole heap of words hidden until they're illuminated by the LEDs behind to loosely describe the time. E.g. "IT IS TWENTY TO FOUR" in the image below.

I though I should try to make it more clever - so I tried to set about solving all the things I don't like about clocks. Which sounds silly... but what's the point if you're not doing it better than what's already out there! So I added a few features:

  • Wi-Fi - for the small added cost of about $9 this clock sets the time itself when it's first powered up! So it doesn't use the internet all day every day to keep time, it also has a normal clock chip and crystal that keeps time in between.
  • Circadian lighting - rather than just read the time, you can feel the time. Warm red-ish tones in the morning - blue-ish tones during the day - back to warm at night. No blue light before bed, and mimics the way your body naturally senses time. Light is mixed by 3x LEDs on one chip behind each square (White, Warm-white and Amber).
  • Ambient light adjustment - you don't want a clock that's so bright it's distracting and constantly draws your attention. I've included an iPhone-style light sensor to automatically dim the LEDs to maintain appropriate relativity to the surrounding lighting levels. It's hidden behind one of the letters that's not commonly used!
  • Hidden words - yeah... so... I couldn't resist using some of the extra letters to add phrases like "BEER O'CLOCK" if you chose to enable this feature!

The biggest disadvantage of an LED clock is it uses power to illuminate the letters. I would have liked it to run on batteries - but no such luck. This baby has a plug-pack with the option to hardwire- hidden behind as best as possible.

Development process

Electronics are done and it has been running now in my living room with a temporary paper letter mask to make sure there's no fundamental issues!

Software is all done, with all the features described above including Wi-Fi, circadian lighting and automatic light level adjustment. I do need to make a little web page to change the settings more easily (e.g. local timezone, special phrases etc.)

Laser cutting of the face and body are currently underway thanks to Nick at Perth Creative Industries - thanks mate!

Temporary paper mask to check the wording...

Some engineering detail

The hardware and software used is as follows:

  • Parts designed by me in Autodesk Fusion 360 including the printed circuit board (Autodesk EAGLE)
  • PCB manufacture was done by NextPCB. Great service, fast turnaround
  • PCB was ordered with a thin stainless solder paste stencil for quick application of solder to the device pads
  • Components placed and reflow soldered by hand.... fun.
  • It's coded up in the Arduino IDE

Parts used

Electronics

  • ESP-12F (ESP8266) microcontroller with on-board Wi-Fi
  • 120x WS2812B 5050 White-Warm White-Amber addressable LEDs
  • PCF8523 real-time clock and calendar chip with 3V lithium battery backup
  • ISL29023 digital light sensor
  • LM2596 5V 3amp DC-DC power supply for LEDs
  • ME6211 3.3V power supply for ESP, clock and light sensor
  • All on a custom designed PCB with white solder mask for improved reflectivity.
Screen clip of PCB design from Autodesk EAGLE

Body components

  • Face is cut from 1.6mm dark bronze aluminium sign panel
  • Body components are laser-cut birch plywood

Finished Product Assembly

Future improvements

There's some technical elements of the printed circuit board I could have spend more time to design better - e.g. thermal relief to avoid needing to put heaps of heat into the LED pins on the ground plane.

Other changes that I intend to make:

  • The light sensor is now obsolete and was difficult to solder. Need to select an alternative. The VEML7700 looks promising.
  • Swap the ESP8266 processor for a newer ESP32, maybe ESP32-S2.
  • The clock crystal isn't that accurate - look to swap for an oscillator.
  • Better way to glue/attach the clock face. I worry about the longevity of the glue.
  • Consider 3D printing the case instead of the plywood. Needs a big 3D printer though!
  • Consider changing away from the addressable LEDs to individual discrete white, warm-white and amber LEDs with a matrix controller. Just to reduce the cost.

I have 10 circuit boards total (thanks to the minimum order at NextPCB) so I intend to make a few for my friends!