Tiny Berlin Clock Replica Also Counts Seconds

A wristwatch similar to the Berlin Uhr, with the actual Berlin Urh in the background

If you’re a clock aficionado and have ever visited Berlin, you’re probably familiar with the Berlin Clock on Budapester Straße: a minimalist design of yellow and orange lights that displays the time in a base-5 number system. This clock has been telling the time to the few that can read it since 1975, and is but one of several unusual clocks that can be found in the city.

Berlin resident [jjoeff] decided to make a miniature replica, appropriately called the Berlin Uhr Nano, in order to watch the unusual display at any time of day. Built around a Wemos D1 Mini, it connects to WiFi in order to synchronize its internal clock to an NTP time server. It then drives a custom PCB that holds 39 WS2812 LEDs to display the time in its proper format. Unlike the original though, it also includes a full counter to tell the number of seconds; the bigger clock just flashes a single lamp to show the seconds passing.

Powered by a 500 mAh lithium battery, it can be converted into a wristwatch by simply threading a strap through slots in the PCB. With no buttons for adjustment or any functionality other than displaying the time, it serves the same purpose as the original, just in a portable format. We’ve seen a slightly larger Berlin Clock replica made of wood before, as well as a round one that uses the same base-5 encoding scheme.

7 thoughts on “Tiny Berlin Clock Replica Also Counts Seconds

  1. So the “Berlin-Uhr remastered” Hackaday.io page has no code and no files – or am I missing something?

    If it’s true the Hackaday.io page is just a shell, then please allow me to add some value here. I started studying a Berlin Clock build myself and was rapidly sucked down a temporal rabbit-hole:

    “Mengenlehreuhr” (German for “Set Theory Clock”) a.k.a. Berlin-Uhr (“Berlin Clock”) explained, with an animated time-lapse example.[1] Off the top of my head, mimicking (sp?) the Berlin Clock via a microcontroller might be to convert the standard base-ten (hours) plus base-sixty (minutes and optionally seconds) real-time clock (RTC) output time to base-five using the modulo operator [2][3] then output the time to LEDs via a latching serial-in parallel-out shift register such as the 74HC595 chip.[4][5] After a couple minutes searching I see that’s the very same approach [mr_fid] took in building his version of the Berlin Clock, which is very well documented in both a YouTube video and an Instructable.[6][7]

    To add NTP time and eliminate the hardware RTC, use an ESP32 with its on-chip RTC set over the internet via NTP. The lbernstone / ESP32_settimeofday example [8] shows how to set the ESP32’s internal RTC to local time from a UNIX/POSIX UTC timestamp and POSIX TZ code (this is code only, not a library). Get your POSIX local timezone from [9]. Rui Santos of Random Nerd Tutorials has two tutorials on getting time via NTP with an ESP32. One uses a library and is more complex.[10] The second ESP32 NTP tutorial is relatively simple and does not use a library.[11] Since to set the ESP32’s internal clock just requires the UNIX/POSIX time-stamp and time zone, the simpler of the two ESP32 NTP tutorials is probably good enough. Assuming you will be coding in C/C++, you will inevitably find yourself lost in the /(time.h) ratsnest; see [12] for some help with that.

    A couple of final things on the ESP32 internal RTC and public NTP servers: I have found the ESP32 internal RTC to be a little unstable. In a climate-controlled room I found the internal RTC is good for within +/-one second if I set it two times a day via NTP. Please do NOT abuse the public NTP server pool! Read and follow the NTP Pool Project’s Terms of Service for End-Users (TOS).[13]

    * References:

    1. https://en.wikipedia.org/wiki/Mengenlehreuhr

    https://en.wikipedia.org/wiki/Mengenlehreuhr

    2. Modulo Operator (%) in C/C++ with Examples

    https://www.geeksforgeeks.org/modulo-operator-in-c-cpp-with-examples/

    3. Modulo Operation

    https://en.wikipedia.org/wiki/Modulo_operation

    4. SN74HC5958-bit shift register with 3-state outputs.

    https://www.ti.com/product/SN74HC595

    5. SN74HC595N @ Mouser PDIP-16, Qty.-1 $0.68 each, 57,664 In-Stock

    https://www.mouser.com/ProductDetail/Texas-Instruments/SN74HC595N?qs=IEl3ej0IqwBTHkYa8XPoMQ%3D%3D

    6. [Video] Copy of the Berlin clock, arduino Nano, DS1307 RTC, 74HC595N serial shift register.

    https://www.youtube.com/watch?v=SgrjEpEWO7k

    7. [Instructable] Berlin Clock, Arduino Nano, DS1307 Real Time Clock. 74HC595N 8 Bit Shift Register.

    https://www.instructables.com/Berlin-Clock-Arduino-Nano-DS1307-Real-Time-Clock-7/

    8. lbernstone / ESP32_settimeofday

    https://github.com/lbernstone/ESP32_settimeofday

    9. Posix Timezones @ nayarsystems / posix_tz_db

    https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv

    10. ESP32 NTP Client-Server: Get Date and Time (Arduino IDE) [Simpler]

    https://randomnerdtutorials.com/esp32-date-time-ntp-client-server-arduino/

    11. Getting Date and Time with ESP32 on Arduino IDE (NTP Client) [Library]

    https://randomnerdtutorials.com/esp32-ntp-client-date-time-arduino-ide/

    12. (time.h) @ cpluscplus.com

    https://cplusplus.com/reference/ctime/

    13. NTP Pool Project’s Terms of Service for End-Users (TOS)

    https://www.ntppool.org/tos.html

  2. Note that the minutes are NOT shown in true base-5, that would require a third power level from the 25th minute of the hour, with 59 minutes past the hour being represented as 2-0-4.

    Instead, it uses a hybrid base-12/base-5 counting system, such that 59 minutes is represented as 11-4.

    Except both of those levels are represented in base-1 so 59 is represented as
    1-1-1-1-1-1-1-1-1-1-1
    1-1-1-1

    1. Correction: 59 in true base-5 would be 2-1-4.

      Addition: the current base-1 representation at the second power level has “ticks” as well. Every third segment (15 minutes) is more red than the amber segments in between, making counting easier. It has no semantic meaning.
      So 59 past is more akin to
      x-x-X-x-x-X-x-x-X-x-x
      x-x-x-x

  3. Isn’t the top led/light supposed to only be on during odd minutes (or in this case seconds)? Or does it not matter? Seems to be lit on the even seconds in the video.

Leave a Reply to Michael AyresCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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