What makes the WS2812B LEDs so attractive for makers, is how cheap and easy to work with they are. They allow us to include RGB lighting with effects in just about any project. In today’s featured ESPHome project, Thingiverse user Alex18881 modified an existing a seven segment clock using an ESP-01s, some WS2812B LEDs.
This seven segment clock is a nice alternative to the analogue clocks we’ve become accustomed to. Because it uses RGB LEDs it can lend a splash of colour to any room and surely won’t become boring anytime soon.
Not just any boring old clock
Why user Alex18881 decided to place this project on Thingiverse I do not know as it uses the models designed by random1101 and doesn’t provide any of its own. What Alex18881 does provide, and this I am very grateful for, is the valuable code which powers this project.
Perhaps GitHub would have been a more fitting place to store it. Either way, we can count ourselves lucky that someone else has done the heavy lifting.
Because this seven segment clock with WS2812B LEDs uses ESPHome it ties in smoothly with Home Assistant. In Home Assistant you can adjust the colour of the hours and minutes digits and that of the dots. You can also turn off the LEDs which will surely come in useful if you’re planning on placing the seven segment clock in your bedroom.
Hardware you will need for the ESPHome seven segment clock
The creator of this project uses an ESP-01 for their ESPHome seven segment clock. The reason for this decision is not given and the only advantage I can see is that the ESP-01 is much smaller than something like the LOLIN D1 mini (link to the official store on AliExpress). The LOLIN D1 mini or an equivalent ESP8266 has the advantage of USB being built in, and it can be powered 5V, which is what the WS2812B LEDs use.
Speaking of the WS2812B LEDs, you will need 30 of them. Seven for each digit and two for the dots. When it comes to buying LEDs or LED strips online, I suggest nothing other than BTF-LIGHTING (AliExpress). I have multiple different strips from BTF-LIGHTING in my home, including ones using WS2812B LEDs, and have never been disappointed by them.
If you do opt to go with an ESP-01, make sure you also order a buck converter that will step down the voltage to 3.3V. Without such a buck converter you would have to use individual power supplies for the WS2812B LEDs and the ESP-01. It is also crucial that you select an ESP-01 with 1 MB of flash memory and not the 512 kB version.
Because an ESP-01 can’t be programmed directly (it has no USB port) you will also need to make sure you have a programmer adapter on your shopping list. As I mentioned, going with the LOLIN D1 mini to begin with, is the easier option.
The seven segment models
The creator of the models printed theirs on an Ender 3 3D printer which is one of the more affordable options on the market. What you will end up with are four digits, two dots, and a number of bases to stand everything on and hide the wiring in.
- 【Convenient printing】The upgraded ender 3 v2 3d printer can directly use the SD card to print and upgrade the firmware. These upgrades make printing easier. The integrated structure design makes installation faster and easier. 60g filaments(1.75mm) are intimately equipped with the factory, which can be used directly after installation.
- 【Self-developed Silent Motherboard】 Creality Ender 3v2 with TMC2208 stepper drivers and 32 Bits Silent Mainboard of version 4.2.2 always ensures smooth movement below 50dB and no noise during printing. At the same time, ender 3 v2 is equipped with UL Certified MeanWell Power Supply MeanWell power supply meeting all the needs of fast heating and long-time printing.
A couple of M3 bolts and glue will hold the whole thing together. The WS2812B LEDs are attached directly to the back of the digits and are diffused by the white fillament, making it appear as one single light source.
Putting the ESPHome seven segment clock together
With the models printed and the WS2812B LEDs wired up, you can start putting everything together. Because WS2812B LEDs can be daisy-chained, all you need is one free pin on the ESP device you went with. With the hardware ready, all that is left to do is flash the code provided by the creator of this featured ESPHome project. And just like that, you have built your seven segment clock that uses WS2812B LEDs and is powered by ESPHome.