A Linear LED Clock for Your Desktop

by andrei.erdei in Circuits > Clocks

1575 Views, 18 Favorites, 0 Comments

A Linear LED Clock for Your Desktop

main4.jpg

One of my favorite types of projects to work on are clocks. Many people are fascinated, and sometimes even obsessed, with the passage of time, and I'm no exception. I love creating new projects and finding interesting ways to display time, or adapting existing ones. Word clock, Color coded clock, Cistercian clock – if you're curious, you can see them among my projects.

Today, I want to share my take on a linear desk clock.

My starting point was Mirko Pavleski's project - DIY Unusual Linear Clock (he also has a video of this project), and then I found two other interesting options: Linear RGB LED Clock, and Linear Calendar Clock.

My idea was to "shorten" the clock's display as much as possible so that it would look good on a desk. I also changed the way the exact time is displayed, compared to the other projects.

I hope you'll stick around to see the final result :)

Supplies

c2.jpg
c3.jpg
c1.jpg
b1.jpg
b3.jpg
b2.jpg
b4.jpg
b5.jpg

What is needed...

  • 3D printed parts (the entire fully editable project is on tinkercad)
  • Wemos D1 mini module
  • WS2812 LEDs, a strip with 35 pieces (60LEDS/m strip)
  • DC plug, female, 2.5mm, with wires
  • Power source 5v/2A
  • A piece of smoked acryl
  • A piece of white paper
  • Some colored wires, hot glue

Time Display Principle

The display consists of a row of 37 isosceles triangles arranged alternately, each illuminated by a WS2812 LED. In the graphic below, you can see that I've defined several groups of three triangles: the first, yellow group represents the tens of hours, followed by three red groups for the units of hours, two green groups for the tens of minutes, and the last three blue groups for the units of minutes.

To make the numbers as easy to "read" as possible, I decided that within a group, the three LEDs would light up as follows:

  • 0 - no LEDs lit
  • 1 - right triangle LED
  • 2 - right triangle LED + left triangle LED
  • 3 - right triangle LED + left triangle LED + middle triangle LED

You can see this in the animated GIF below.

It's true that in this way, the middle triangles in the tens of hours group and the first tens of minutes group will never light up, but I wanted to keep the display uniform and easy to interpret.

So for example 17:48 will be displayed like this:

The remaining 8 triangles, which don't belong to any group, located at the top of the display, will be used as follows: the first and last will blink at the rate of the passing seconds, while the remaining 6 will light up, one by one every 10 seconds (you will see this in the demo video later).

Of course, you can change the display mode as you wish. You can draw inspiration from the projects I mentioned in the introduction – you'll find some very interesting ideas there 🙂

Construction

Schematic_Linear-LED-Clock_2024-05-16.png
a1.jpg
a2.jpg
a3.jpg
a4.jpg
a5.jpg
a6.jpg
a7.jpg
a8.jpg
a9.jpg
a10.jpg
a11.jpg
a12.jpg
a13.jpg
a14.jpg
a15.jpg
a16.jpg
a17.jpg
a18.jpg
a19.jpg

I started by 3D printing the holder for the WS2812 LEDs so that I could work on mounting them while the other components were printing. As mentioned in the materials list, I used a strip with 60 LEDs per meter, meaning the distance between LEDs is 11.66mm. To reduce this distance to 5mm, I pushed the excess strip through the rectangular holes in the holder. You can see this process in the photos above. Every so often, I added a drop of hot glue to secure the strip to the holder.

I paid close attention to the mounting direction of the two LED strip pieces. The data input is at the bottom left, and the output of the 18-LED piece connects to the input of the 17-LED piece at the top right, as shown in the diagram below (and also reflected in the electronic schematic).


After making the connections, I attached the holder with the mounted LEDs to the triangle grid using a few drops of hot glue. I made sure to trim any excess hot glue on the edges of the grid with a cutter so that it would fit easily into the box.

Next, I made all the connections according to the electronic schematic (graphic above). I plugged in the power supply, and the LED on the Wemos module should have lit up. I connected a USB cable to the module and uploaded the program (the code is on GitHub). I then turned off the power and assembled the clock: first, I placed the 3mm plexiglass piece in the box, then a piece of white paper, the grid, and finally the lid.

If you look closely, you'll notice I made a small mistake: I put too much hot glue on the LED holder and between the holder and the grid, so the cover doesn't fit perfectly. Luckily, I designed the lid to fit snugly into the box, so it's still secure.

I placed the box on the stand and turned on the power, and then I proceeded to configure the clock.

Setting Up the Clock

Setting up my clock is a two-step process:

  1. Connecting to a Wi-Fi router: This allows the clock to get the exact time and date from an online time server.
  2. Customizing settings: If the default settings aren't to my liking, I can change many of them through the web interface.

For the first step, after turning on the clock, I'll use my phone's Wi-Fi to find an access point called "LinearClock-" and some code. I'll connect to it using the password "admin12345". Then, while still connected to this access point, I'll open a web browser and go to the IP address 192.168.1.4.

The main page will appear, and I'll navigate to the "network configuration" menu. I'll wait for it to scan for nearby Wi-Fi networks, then click on my home router's name. The name will be copied into the SSID textbox. I'll enter my router's password and save the settings. During this process, the clock's LEDs will randomly light up in white. After saving, the light pattern will pause for a moment, and then the lights will start up again. Now I can go to the "network information" menu and note down the IP address. This is the address assigned by my router's DHCP server, and I'll use it to access the clock's web interface after restarting the clock.

The second step begins after I restart the clock. Instead of the white light show, I should see a colorful animation, indicating that the clock has successfully connected to my router and is retrieving the exact time from the internet. If the white LED animation continues, it means step one wasn't done correctly. If the multicolored animation persists and the exact time doesn't appear, the clock hasn't been able to get the time from the internet. In that case, I'll either wait, as the clock will retry every minute or I can try restarting the clock again.

If everything went well, I can now access the clock's web interface from my phone's browser using the IP address I noted earlier. I can also find it in my router's settings or by using a network scanning app.

Once connected, I can access the "NTP settings" and "display settings" menus to customize the clock further. I'm looking forward to exploring all the options!

If I don't have access to a time server, I can manually set the time using the "manual time setting" menu.

Now I can enjoy my new clock!

Displaying the Time

Linear LED Clock

Conclusions

I'm thrilled with how this linear clock project turned out! Despite a few hiccups along the way, I'm incredibly satisfied with the final result. I hope you've been able to learn from my mistakes and that you'll find the idea behind this clock as intriguing as I do. Thank you for taking the time to read about my journey, and I'd love to hear your thoughts and feedback in the comments below!