logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

LED clock on WS2812B (NTP)

efi222  53 14895 Cool? (+55)
📢 Listen (AI):

TL;DR

  • A large WS2812B LED clock shows time and weekdays, with digits 79 mm high and the day line placed above or below the numbers.
  • The enclosure uses PLA-printed parts, a glued two-piece mounting frame, an HDF back wall, and white self-adhesive foil inside the partitions.
  • The display is tuned for the popular 60 LED/m strip, and the current time is downloaded from NTP servers every hour by default.
  • It offers many colors and animations, including nine display colors, a "Patriot" pattern, and a very slow vertical color change.
  • The build depends on access to a 3D printer, and the author still needs to finish the GUI.
Summary generated by AI based on the discussion content.
Digital clock with an LED display showing the time 23:54.

Hello :)
Watches featuring WS2812B have already been published on Elektroda. I would like to present my version. I had some of this tape left over from recent projects and decided to use it. Access to a 3D printer may make this project difficult.

The clock has digits that are 79 mm high. It`s big, but you get used to it. After several experiments, it seems that this height is optimal when using the most popular strip with a density of 60 LED/m. In addition to the dots, there are two diodes (on the tape) per digit segment. I also tested with smaller displays. The minimum height is 45mm (one diode per segment, without removing the LED from the strip).

The clock shows the days of the week in addition to the time. A friend of mine talked me into it and I think it was a good idea. The day display can be placed above or below the numbers. The current time is downloaded from NTP servers every hour by default. Undoubtedly, the advantage of this design is the almost unlimited display in terms of colors and animations. You can also link the display to the calendar and display different patterns on specific dates.

All elements except the back wall (HDF) are printed from PLA. The mounting frame is glued from two parts.

Black mounting frame for a clock, assembled for installation.

And as a finishing touch, a furniture edge is pressed onto it.

Clock frame with LED display and digit segments.

I glued the partition-type elements from the inside with white self-adhesive foil. In my opinion it goes faster than painting white. And the job is clean.

Two black plastic frames for LED clock digits.

After unsuccessfully searching for white PVC for matte screens, I experimented with a white print. I think it looks quite nice. Up close you can barely see the print threads, but from a distance of several dozen centimeters you have to look closely to see them. And if someone doesn`t know about their existence, they don`t notice them :)

White sheets printed on a 3D printer lying on a brown background.
Close-up of an LED display segment with blue LEDs.

connected sections of tape

Close-up of LED clock construction using WS2812B.

installation

Exploded view of LED clock housing with spacer, frame, and base.
Black mounting frame on a flat surface
Digital LED clock with segment display on a table.
Mounting frame for a clock with printed numerical segments.
Black 3D-printed LED clock frame prepared for assembly.
Digital LED clock module with exposed electronics and wires.

More interesting patterns

DIY digital clock with large digits and colorful LEDs.
I called this pattern "Patriot". Good for days off from work :)
Digital clock displaying colorful numbers 23:54 on an LED display.
Very slow vertical color change.
The remaining patterns are different display colors. There are 9 of them.

Digital LED clock on a wooden table.

Electronics:
Rear view of LED clock with visible electronics.

I still have to think about the GUI. I am attaching the development code in the Arduino IDE.

device diagram
Electronic schematic of an NTP clock with WS2812B LEDs.

Well, that`s it in a nutshell :)
Attachments:
  • Zegar_WS2812_Elektroda_STL.zip (321.91 KB) You must be logged in to download this attachment.
  • Zegar_WS2812_Elektroda.zip (5.29 KB) You must be logged in to download this attachment.

About Author
efi222
efi222 wrote 770 posts with rating 1211 , helped 12 times. Live in city Toruń. Been with us since 2019 year.

Comments

krzbor 10 Dec 2023 00:08

Very nice design, but the diagram looks interesting - only a few elements! [Read more]

efi222 10 Dec 2023 01:13

With the exception of the ADC circuit for auto-adjusting the display brightness, these are the basic elements needed for the proper operation of the ESP8266. [Read more]

michcz 10 Dec 2023 01:41

The cock is very cool and aesthetic. Would there be a chance to make STL available? Maybe I`d finally have an excuse this Christmas to dust off the printer. :) You can get rid of striations on the focusing... [Read more]

efi222 10 Dec 2023 08:52

There is no problem with providing *.stl. I t try anything with acetone. But these stripes are really hard to see. Maybe they even add charm :) . Matte is one layer from a 0.4 nozzle with a path width... [Read more]

madamsz1 10 Dec 2023 09:47

Maybe something from a damaged TV matrix would meet the requirements. I used to have these nice 1mm sheets from an older one. Best with CCFL backlighting. Overall, a very nice project. [Read more]

efi222 10 Dec 2023 12:43

In other projects, I used 0.16 mm thick PVC as mats. 1 mm is much too thick. At this thickness, the light from the segments will be scattered onto adjacent segments. Here, the wall between the segments... [Read more]

CMS 10 Dec 2023 12:45

Very nice construction. I think that in this case these stripes add charm. [Read more]

efi222 10 Dec 2023 12:57

Photo in higher resolution. By the way, there were some artifacts that needed to be cleaned around the dots.. :) [Read more]

robig 10 Dec 2023 13:45

Acetone for PLA? It will not work, this method only with ABS and ASA. For PLA, chloroform, which you can`t buy, or sodium hydroxide, a strong base that is better not to play with. Efi222 - great idea... [Read more]

LA72 10 Dec 2023 13:51

Spray plastic works great with PLA. [Read more]

efi222 10 Dec 2023 14:46

I will add from myself (I am writing from practice) that to print such a matting sheet you need to properly set the table and warm up the entire machine. Without this, each subsequent copy may come out... [Read more]

Anonymous 10 Dec 2023 16:47

Well, I`m wondering if a mistake was made there? The ADC in ESP8266 is up to 1V. And from the calculations, the average GL5516 is 7.5kOhm for "bright" to ground 33kOhm, the voltage divider will give 2.9V... [Read more]

krzbor 10 Dec 2023 17:01

You are right - the author did not notice that the ADC is up to 1V. Here is my solution for photoresistor-controlled backlighting Link . I used a large resistor to ground (1M) to achieve high resolution... [Read more]

gulson 10 Dec 2023 17:40

A wonderful effect, contact me with information about the Parcel Locker and I will send you a small gift. [Read more]

efi222 10 Dec 2023 18:51

Mr. @Jarzabek and @krzbor, you are 100% right. You can get confused sometimes with ADC. I remembered this 1V range. But somewhere after that it went into the bushes :D The photoresistor is behind a dark... [Read more]

krzbor 10 Dec 2023 19:13

That t (it s not dark, the LEDs can work at maximum anyway. Basically, what you have done (overdriving the ADC) is just using the lower voltage range (when it is dark). [Read more]

Anonymous 10 Dec 2023 20:24

The characteristics of the ADC in ESP8266 are as below. The maximum input voltage value of 1V should be considered optimistic. https://obrazki.elektroda.pl/9340200400_1702236224_bigthumb.jpg @efi222... [Read more]

efi222 10 Dec 2023 20:51

This is beyond my scope of knowledge at the moment. But I`ll try to educate myself. Thank you for your tips :) [Read more]

urkotrebor 10 Dec 2023 22:04

Some time ago, when I was playing with WS2812B diodes, I read that the control signal is 5V and you connect it directly to the ESP, did you have any problems with it? If I remember correctly, the library... [Read more]

FAQ

TL;DR: With 79 mm digits and hourly NTP sync, this WS2812B clock shows that a large, readable display can be built from leftover LED strip and an ESP8266. The key practical lesson is: "use a driver" for the data line if you want robust long-term behavior. It helps makers who want a big network-synced clock without designing complex electronics first. [#20856198]

Why it matters: This project turns a simple ESP8266 and WS2812B strip into a large wall clock with automatic time sync, day-of-week display, and configurable colors, while also exposing the real engineering limits of ADC scaling, diffusion, and 3.3 V logic.

Option Result in this project Practical takeaway
Digit height 79 mm Author calls it optimal for 60 LED/m Best readability at normal distance
Digit height 45 mm Practical minimum Works with 1 LED per segment
Direct 3.3 V ESP8266 → WS2812B Worked in practice Borderline versus spec
3.3 V → 5 V driver Recommended in discussion More reliable long term
0.16 mm PVC matte Worked in earlier builds Better than 1 mm sheets for segment isolation

Key insight: The mechanical diffuser and front cover affect readability as much as the code. The clock worked directly from 3.3 V data, but the thread repeatedly concludes that a proper level shifter is the safer design choice.

Quick Facts

  • The display uses 79 mm-high digits, and the author says that size is optimal for the common 60 LED/m WS2812B strip. [#20853923]
  • The minimum practical digit height reported was 45 mm, using one LED per segment and no LED removal from the strip. [#20853923]
  • The clock downloads time from NTP servers every hour by default, and it also shows the day of the week. [#20853923]
  • The white PLA diffuser was printed as one layer with a 0.4 mm nozzle, 0.3 mm path width, and about 0.17–0.2 mm thickness. [#20854445]
  • A 1 mm matte sheet was judged too thick because light spilled into neighboring segments; the author previously used 0.16 mm PVC instead. [#20854706]

How do you build a large NTP clock from a WS2812B LED strip and an ESP8266?

Build it as a segmented enclosure around a WS2812B strip and let the ESP8266 fetch time from NTP. 1. Print the PLA frame, separators, and diffuser parts, then glue the frame from two pieces. 2. Cut and join the LED strip into seven-segment digits and weekday bars, then mount everything inside. 3. Drive it from ESP8266 code, sync time every hour, and close the housing with a front cover and HDF back. The finished clock uses 79 mm digits and supports multiple colors and animations. [#20853923]

What is the minimum practical digit height when using a 60 LED/m WS2812B strip for a seven-segment clock display?

The minimum practical height is 45 mm. That version uses one LED per segment and keeps the LEDs on the strip, without removing them. The author tested smaller displays and concluded that 79 mm is more comfortable, but 45 mm is the lower usable limit with the common 60 LED/m strip. [#20853923]

How is automatic brightness control implemented on an ESP8266 clock using a GL5516 photoresistor and the ADC?

It uses a photoresistor feeding the ESP8266 ADC, then maps the reading to PWM with an exponential brightness curve. The author states that the only non-basic part of the circuit is the ADC section for auto-brightness, and later explains that the code uses a curve_w[] table so low brightness levels change more gently. In practice, the sensor sits behind dark glass, which weakens its response in bright conditions. [#20855310]

Why does the ESP8266 ADC input range cause problems in auto-brightness circuits, and how should the voltage divider be chosen?

The problem is that the ESP8266 ADC itself expects up to 1 V, so an ordinary divider can overdrive it in bright light. One commenter calculated about 2.9 V at the ADC with a GL5516 and 33 kΩ to ground, and the author later measured 1.9 V in bright surroundings. A safer approach is to size the divider so bright light stays within 1 V, or bias the divider for better low-light resolution instead of full-range daylight tracking. [#20855139]

What is NTP, and how often should an ESP8266 clock synchronize with NTP servers to keep accurate time?

NTP is the network time source this clock uses, and the project synchronizes once every hour by default. That interval was the author’s chosen setting for keeping the display current without constant network traffic. The same implementation also supports automatic summer-winter time handling, which was cited as a practical advantage over many commercial clocks. [#20853923]

What is a snap-back circuit in the ESP8266, and how is it different from a simple clamping diode on GPIO pins?

"Snap-back circuit" is an over-voltage protection structure that conducts only after a higher trigger point, unlike a simple clamping diode that starts conducting just above the supply rail. In the thread, a commenter quotes the ESP8266 documentation: digital IO pins use a snap-back circuit to ground with typical snap-back around 6 V and holding voltage around 5.8 V. That differs from the earlier assumption of a direct clamp diode from pin to VCC. [#20856494]

ESP8266 to WS2812B at 3.3V vs using a 3.3V-to-5V level shifter — which is more reliable for long-term use?

A 3.3 V-to-5 V level shifter is the more reliable choice. The author’s clock ran for about a month with direct 3.3 V drive, but later admits the design sits at the edge of the WS2812B specification. The thread’s practical conclusion is clear: direct drive may work, yet a proper driver makes the system robust and repeatable. [#20856198]

Why does a WS2812B strip sometimes appear to work directly from a 3.3V ESP8266 data pin even though the datasheet suggests a higher logic-high level?

It appears to work because some real setups tolerate borderline logic thresholds even when the design is outside the stated margin. The author reports stable operation without a driver, and another commenter says 3.3 V control worked flawlessly even at -20°C. The failure fact is that the thread still treats this as out-of-spec behavior, so success on one build does not guarantee long-term reliability on another. [#20857256]

What is the best way to diffuse WS2812B segments in a 3D-printed clock: thin PVC matte, a one-layer PLA print, or material from an LCD panel?

Thin PVC matte or a carefully printed one-layer PLA diffuser worked best in this project. The author had previously used 0.16 mm PVC, then switched here to a thin white PLA print after failing to find suitable white PVC. LCD panel layers were tested and judged unsuitable, while 1 mm material was rejected because it lets light bleed into adjacent segments. [#20854706]

How do you print a thin white PLA diffuser so the backlight looks even and the print lines stay as invisible as possible?

Print it as a single thin layer and control the first layer very tightly. The author used a 0.4 mm nozzle, 0.3 mm line width, and about 0.17–0.2 mm thickness on glass. He also warns that the bed must be level and the whole machine warmed up, because tiny changes that look harmless in normal parts become obvious once the diffuser is backlit. [#20854913]

Which smoothing methods are suitable for PLA diffuser parts: acetone vapor, spray plastic, or other finishing techniques?

Acetone vapor is not suitable for PLA in this thread; spray plastic is the safer suggestion. One commenter explicitly states that acetone works for ABS and ASA, not PLA, and mentions harsher PLA options that are better avoided. The author also says extra chemical treatment may worsen the optical result, because an illuminated diffuser exposes every surface defect immediately. [#20854913]

How do the getPixelColor() and getBrightness() functions in the Adafruit NeoPixel library work if WS2812B LEDs do not send data back to the MCU?

They read the library’s own RAM buffer, not the physical LED strip. The thread explains that there is no reverse communication from WS2812B to the MCU, so these functions report stored state such as pixel color or brightness values already held in memory. That is why a unidirectional 3.3 V-to-5 V converter still works for WS2812B control. [#20864072]

What is the practical difference between WS2812 and WS2812B when controlling them from 3.3V microcontrollers?

The practical claim in the thread is that older WS2812 versions had more trouble with 3.3 V control than WS2812B. The author says he had read that early WS2812 parts, without the “B,” were problematic at 3.3 V, while his WS2812B build worked directly from ESP8266. He also notes that he cannot vouch for that older source, so treat it as field experience rather than a proven rule. [#20855734]

How can you add day-of-week indicators to a WS2812B clock, and how do you change whether the week starts on Monday or Sunday in code?

Add seven separate indicator bars and map one bar to the current weekday in software. This clock places the weekday display above or below the digits, and the author says the day order can be changed in code to start on Monday or Sunday. That makes the feature easy to localize without changing the hardware. [#20863874]

What's the best front cover for this kind of LED clock: smoked plexiglass, black antisol glass, or tinted film over the diffuser?

Black antisol glass is the best premium front cover in this thread, while tinted film is the easiest retrofit. In a later update, the author says he used 4 mm black antisol glass because plexiglass picks up micro-scratches over time, and he glued the housing frame to the glass with black silicone. For an existing build, he suggests adding non-adhesive tinted film between the segment mask and diffuser to improve contrast. [#21794432]
Summary generated by AI based on the discussion content.
%}