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

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

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.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • 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
    Level 22  
    Offline 
    efi222 wrote 770 posts with rating 1211, helped 12 times. Live in city Toruń. Been with us since 2019 year.
  • ADVERTISEMENT
  • #2 20854270
    krzbor
    Level 29  
    Posts: 1765
    Help: 41
    Rate: 1065
    Very nice design, but the diagram looks interesting - only a few elements!
  • #3 20854324
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    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.
  • #4 20854341
    michcz
    Level 11  
    Posts: 41
    Help: 1
    Rate: 35
    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 screen by exposing them to acetone vapor.
  • #5 20854445
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    There is no problem with providing *.stl. I`ll tidy it up a bit and share it. I didn`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 of 0.3. Thickness about 0.17 - 0.2. A lot depends on the table setting. All elements printed on glass.
  • ADVERTISEMENT
  • #6 20854489
    madamsz1
    Level 42  
    Posts: 5861
    Help: 1053
    Rate: 1702
    efi222 wrote:
    After unsuccessfully searching for white PVC for matte screens

    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.
  • ADVERTISEMENT
  • #7 20854706
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    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 is 0.6 mm thick with 1 mm masking. I tested the elements of the laptop`s LCD matrix and none of them were very suitable. But thanks for your interest :)

    @michcz. I uploaded the *.stl files to the main topic.
  • #8 20854711
    CMS
    VIP Meritorious for electroda.pl
    Posts: 8460
    Help: 258
    Rate: 2598
    Very nice construction. I think that in this case these stripes add charm.
  • #9 20854724
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    Photo in higher resolution. By the way, there were some artifacts that needed to be cleaned around the dots.. :)
    Attachments:
    • demo_hi_res.zip (2.28 MB) You must be logged in to download this attachment.
  • #10 20854796
    robig
    Level 23  
    Posts: 459
    Help: 61
    Rate: 143
    michcz wrote:
    You can get rid of striations on the focusing screen by exposing them to acetone vapor.

    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 and project!
  • #11 20854806
    LA72
    Level 41  
    Posts: 6593
    Help: 647
    Rate: 1654
    robig wrote:
    michcz wrote:
    You can get rid of striations on the focusing screen by exposing them to acetone vapor.

    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.


    Spray plastic works great with PLA.
  • #12 20854913
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    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 slightly different. While this does not matter in normal prints, here you can immediately see the changes when the element is highlighted. The layer and pattern must be even. The backlight of such an element does not forgive any mistakes.

    In my opinion, further chemical operations can only worsen the effect. But these are only theoretical speculations :) Maybe someday I`ll mess around with chemistry. I`m also thinking about a print with a smaller nozzle passage and a narrower printing line.
  • #13 20855115
    Anonymous
    Level 1  
  • #14 20855139
    krzbor
    Level 29  
    Posts: 1765
    Help: 41
    Rate: 1065
    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 in low light, because this is when dimming is necessary.
    It is very easy to make a mistake when connecting the ADC. Such a NodeMCU has a divider at the input and the module pin actually works in the range of 0-3.3V, but this does not apply to the ESP8266 itself, which works in the range of 0-1V
  • #15 20855209
    gulson
    System Administrator
    Posts: 29415
    Help: 150
    Rate: 6079
    A wonderful effect, contact me with information about the Parcel Locker and I will send you a small gift.
  • #16 20855310
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    Mr. @Jarząbek 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 glass, so it does not work very well in the bright resistance range.
    I selected the resistor at the ADC input to the ADC value. In a bright room it was about 800. So with some room. In the dark it was down to a dozen or so.
    The fact is that this range worked strangely in very bright rooms.
    So, after your comments, I measured... And now, in bright surroundings, I have 1.9 V, which is almost twice the range.
    But see for yourself in the video how it works. I only sped up the ADC reading interval from 300 to 100ms. Nothing suspicious :D
    I turn the lights on and off in the workshop.
    Thank you for your attention and perceptiveness :)




    Added after 19 [minutes]:

    krzbor wrote:
    I used a large resistor to ground (1M) to achieve high resolution in low light, because this is when dimming is necessary.

    In this system, the PWM changes exponentially. (in the code "curve_w[]") . At low values there is greater precision (less changes). This is due to our eyesight, which sees light logarithmically.
  • #17 20855376
    krzbor
    Level 29  
    Posts: 1765
    Help: 41
    Rate: 1065
    efi222 wrote:
    In this system, the PWM changes exponentially. (in the code "curve_w[]") . At low values there is greater precision (less changes). This is due to our eyesight, which sees light logarithmically.

    That`s the point - vision works logarithmically and the ADC doesn`t (it`s linear). Using a large resistor gives reasonable results in low light conditions. Of course, in higher lighting there is almost a maximum ADC reading, but it does not matter. When 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).
  • #18 20855504
    Anonymous
    Level 1  
  • #19 20855565
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    This is beyond my scope of knowledge at the moment. But I`ll try to educate myself. Thank you for your tips :)
  • #20 20855680
    urkotrebor
    Level 21  
    Posts: 335
    Help: 37
    Rate: 81
    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 I used made it possible to read the values on individual diodes, so a feedback signal of 5V is tolerated by the ESP?
  • #21 20855710
    Andrzej42
    Level 32  
    Posts: 1534
    Help: 177
    Rate: 321
    As a matte, foil for insulating wires in engines. You can get it at any rewinding plant - I also have a lot of it, if anyone needs a few kilos...
  • ADVERTISEMENT
  • #22 20855734
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    In earlier designs, I used CD4050 as the driver between ESP and WS2812B. Here I tried without a driver. and It works without any problems.
    I read somewhere that earlier versions of WS2812, without the letter "B", had problems with 3.3V control. But now I won`t answer how reliable a source it was...
    The oscillogram shows the GPIO14 output with the WS2812B connected. 3.52V at peak
    Oscilloscope waveform from GPIO14 connected to WS2812B, showing peak voltage of 3.52V.


    @Andrzej42 I was interested in my friend`s information. Can you take a photo, at least for reference?

    Added after 3 [minutes]:

    urkotrebor wrote:
    If I remember correctly, the library I used made it possible to read the values on individual diodes

    Maybe it was about reading the status of the RGB WS2812B controller, what is currently set there?
  • #23 20855747
    Anonymous
    Level 1  
  • #24 20855749
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    You can also measure the voltage at the tape input in a static state. Only when power is connected.

    Added after 4 [minutes]:

    khoam wrote:
    What is the actual supply voltage to the ESP?

    3.29. On an oscilloscope, this is a software measurement. Well, it shows... Maybe it needs to be calibrated :) (oscilloscope)
    Well, there is no 5V there.
  • #25 20855763
    Anonymous
    Level 1  
  • #26 20855767
    efi222
    Level 22  
    Posts: 770
    Help: 12
    Rate: 1211
    I even had space on the board for this driver. I`ll leave it as it is for now. The watches work for about a month.

    Added after 22 [minutes]:

    I also measured the static voltage at the input of the WS tape powered by 5V.
    Not counting individual millivolts, it is 0V.
  • #27 20855979
    krzbor
    Level 29  
    Posts: 1765
    Help: 41
    Rate: 1065
    efi222 wrote:
    The oscillogram shows the GPIO14 output with the WS2812B connected. 3.52V at peak

    Unfortunately, this may be the effect of the "clamping diode" in ESP (3.52-3.29) = 0.23V, it looks like a Schottky protection diode. The problem is that there is no resistor between the ESP and the WS2812B. If there are feedback signals (of course 5V), some current may flow through this diode. I haven`t found what the max is in ESP8266 for these diodes. But it is safe to assume 1mA or less, so you would need a resistor of at least 2.2k. As @khoam mentioned, the WS2812B chip is slightly outside the high input voltage range. I also had such a problem once and I powered the system with 5V through a rectifier diode. A lower supply voltage will bring us within the range of 0.7VDD
  • #28 20856116
    Anonymous
    Level 1  
  • #29 20856139
    krzbor
    Level 29  
    Posts: 1765
    Help: 41
    Rate: 1065
    khoam wrote:
    krzbor wrote:
    Unfortunately, this may be the effect of the "clamping diode" in ESP (3.52-3.29) = 0.23V, it looks like a Schottky protection diode.

    The permissible supply voltage for ESP8266 is 3.6V, so the "clamping diode" will probably not work at a voltage of 3.5V. That would be weird.

    "Clamping diode" is a diode connected between the pin and the power supply:
    Diagram showing two diodes connected between a pin and power supply and ground.
    It will always work when the pin potential is approximately 0.3V higher than the supply voltage. Therefore, if we power the ESP with a voltage of 3.29V, this diode will work with a voltage on the pin of approximately 3.59 - everything depends on the forward voltage of this diode. What is important - the diode is connected directly - there is no current limit. It`s easy to damage.
  • #30 20856164
    Anonymous
    Level 1  
📢 Listen (AI):

Topic summary

✨ Discussion of a large LED clock built from WS2812B addressable LEDs and controlled by an ESP8266, with time synchronized from NTP servers and automatic daylight-saving adjustment. The design uses printed segment masks, smoked/tinted front material, and optional STL files for 3D printing. The clock also displays the day of the week, and brightness is automatically adjusted using a photoresistor and ADC input. The thread covers practical issues such as WS2812B signal level compatibility with 3.3 V GPIO, whether a level shifter is needed, ESP8266 ADC voltage limits, and the effect of oscilloscope measurements. Several construction details are discussed, including print quality, masking material thickness, and alternatives such as tinted glass or foil to improve contrast.
Summary generated by AI based on the discussion content.

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.
ADVERTISEMENT