7 Segment LED Clock




Introduction: 7 Segment LED Clock

About: Hey everyone! My hobby is electronics. I share my experience in the development of devices made in the home with my own hands.

Good afternoon, dear viewers and readers. Today I want to show you a complete assemblage manual of the clock based on the Atmega328AU microcontroller and WS2812 addressable LEDs.

Step 1: YouTube Video

Link to this video:

Step 2: Links to Radio Components.

Please support me on Patreon to create a new projects.

You can find all the necessary information for repeating this device by clicking on the link to Patreon:

Links to radio components:

Radio parts store:

Microchip Atmega328AU:

Microchip DS3231:

Microchip TTP223-BA6:

Addressable LED,s WS2812:

Modul FTDI FT232RL:

Arduino NANO:

Battery compartment CR2032-BS-6:

Rechargeable battery LIR2032

SMD Power Connector:

SMD male 2.54mm connector:

Brass Mounting Posts:

Power supply cable:

Power supply:

Soldering Station NEWACALOX 8786D:

Step 3: Circuit Design and PCB Layout.

The schematic LED clock diagram was developed in the Easy EDA online environment.

The LED clock circuit contains such nodes as: an ATmega328AU command microcontroller, a DS3231 real-time microcircuit, touch-sensitive buttons based on the TTP223-BA6 microcircuit and WS2812 addressable LEDs.

Based on the schematic diagram, a double-sided control printed circuit board (PCB) was obtained.

In the circuit, the SMD components will used for surface mounting on the one side only, on the PCB top layer.

Also, in the Easy EDA online environment there is a preview of the future PCB 3D model.

After that, we create a Gerber file and upload it to the JLCPCB PCB manufacturer website.

Step 4: Stainless Steel Stencil for Applying Solder Paste.

We get PCBs of the very high quality from the manufacturer’s plant.

Also, in a set with PCBs, I ordered a stainless steel stencil for applying solder paste and facilitating the installation of SMD components.

Next, we put the stencil on the PCB and position the holes in accordance with the SMD components bond pads location.

Then we apply solder paste to the stencil and accurately fill the holes with a small spatula, leaving a good uniform layer on the bond pads for all surface mount components soldering.

Applying a strictly measured amount of solder paste reduces the probability of jumper straps between printed circuit tracks.

Step 5: Installation of Radio Components on the Control PCB.

Let’s proceed to the installation of radio components on the LED clock control printed circuit board.

We will use a soldering station with a hot air dryer to solder all SMD components.

Step 6: Downloading the Arduino IDE Software.

Next, we turn to the software part of the LED clock.

For the Atmega328AU microcontroller firmware we will use the Arduino IDE programming environment.

A free version of the Arduino IDE installer can be downloaded from the official website.

Going to the site, download the current version for your operation system by clicking on the WIN7 and up tab, then click on the simply download tab and save the file.

Step 7: Installing the Arduino IDE Software.

Run the “EXE” file of the Arduino IDE from the download folder. In the opened window we accept the license agreement, click further and then click install.

Step 8: The Arduino IDE Installation Drivers.

If during the Arduino IDE installation, the drivers did not have installed for some reasons, then you can install them manually from the program folder located along the drive path “C:\Program files (x86) \Arduino\drivers” and run “dpinst-x86.exe” or “dpinst-amd64.exe” file depending on the operating system bitness.

Step 9: The Arduino IDE Library Folder.

For the convenience of working with the libraries folder, create a shortcut and save it on the desktop.

Next, we set administrator privileges for the whole folder with libraries, in order for you do not have to confirm the changes on behalf of the administrator each time.

For better understanding and displaying of files, set up the checkmark for file name extensions in the view tab.

Step 10: Downloading and Installation the Java Runtime Environment (JRE).

We also need a JRE (Java Runtime Environment) to work with the Arduino IDE. Go to the official JAVA website and download the installation files.

Run the “EXE” file from the download folder, then click on the install button in the opened window.

Java may not be relevant for new versions of the Arduino IDE, but it may be useful for other programs as well.

Step 11: Downloading and Installation Driver for a USB TTL Converter on Arduino NANO.

In order to be able to work with the Chinese analogue of Arduino NANO, you need to install a driver for a USB TTL converter.

The driver can be easily found and downloaded on the Internet or you can download the archive with the files by following the link below in the description.

In the download folder, from the archive, extract the files with the driver. Open the appeared folder, inside of which we run the installation file, after that, click on the install button.

Step 12: First Connection of Arduino NANO to the Computer.

In connecting the Arduino NANO for the first time, the computer will automatically recognize and install the device driver software.

In the device manager, we check to which virtual port the Arduino NANO board is connected. In my case, this is a virtual COM port three.

Step 13: Setting Up the Arduino IDE to Use the Arduino NANO Board.

Next, we configure the Arduino IDE to use the Arduino NANO board.

In the Arduino IDE, click the tools tab, then select the board we will work with, click on the tools tab again and select the correct virtual COM port. Next, click on the tools tab once again and select the processor model, it can be either the old or the new model of the Atmega328AU.

Before the start working with the Arduino NANO, once again make it sure that it works.

In the Arduino IDE, click the file tab, then select the examples tab, then select the basics and the blinking LED. In the opened window, click on the code compilation, after which we load the firmware into the Arduino NANO.

After the firmware has loaded, on the Arduino NANO board we can see the LED blinking once per second. This suggests that our board is in good order and ready for subsequent use for more ambitious tasks.

Step 14: Connection the Control PCB to the Arduino NANO.

In order to entry the bootloader to the external microcontroller Atmega328AU, you need to connect the first connector (CON1) on the control PCB to the Arduino NANO as follows: connect the Arduino positive contact to the connector positive contact, connect the Arduino negative contact to the connector negative contact, Arduino contact (13) we connect to the (SCK) contact, the Arduino contact (12) we connect to the (MISO) contact, the Arduino contact (11) we connect to the (MOSI) contact and the Arduino contact (10) we connect to the (RESET) contact.

Step 15: The Bootloader Entry to the Atmega328AU Microcontroller.

Next, we move on to the bootloader entry to the Atmega328AU microcontroller.

In the Arduino IDE, click on the tools tab to check the correctness of the Arduino board and virtual COM port selection. Next, click on the file tab, then click examples and select the Arduino ISP. In the opened window, click on the code compilation, and then load the firmware into the Arduino NANO.

Then open the tools tab, check the correctness of the board and virtual port connection once again, then select the Arduino as ISP programmer, then open the tools tab again to select the bootloader entry.

Step 16: FTDI USB-UART Module on the FT232RL Microcircuit.

To entry the firmware to the Atmega328AU microcontroller, we will use the FTDI USB-UART module on the FT232RL microcircuit.

Step 17: Connection the FTDI Module and the Control PCB.

Next, we move on to connecting the FTDI module and the control PCB.

We connect the positive, negative, RX, TX, DTR contacts of the FTDI module to the second connector (CON2) on the control PCB, the contacts of which have the same names.

Step 18: Installing the Correct Libraries for LED Clock.

Before you start flashing the Atmega328AU microcontroller, you need to copy the files from the LED clock project folder and paste them into the Arduino IDE libraries folder.

Step 19: Uploading Firmware to the Atmega328AU Microcontroller.

In the Arduino IDE, click on the tools tab and select the programmers tab, where we change the Arduino as ISP programmer to the AVRISPmk2 programmer.

Next, click on the tools tab again and check the correctness of the FTDI module COM port selection. In my case, this is virtual COM port five.

Then click on the file tab and select the file with the program code. In the opened window, click on the code compilation, after which we load the firmware into the Atmega328AU microcontroller.

Step 20: 3D Visualization.

To create 3D visualization and drafts of the LED clock case, we used the KOMPAS 3D program. The case parts of the device will be made of 4 mm plywood, which is for laser cut. All draft files have been converted to DWG format and handed over to the panel cutting company.

Step 21: Assembly of the Control Circuit Board With the Rear Panel.

Next, we move on to the LED clock case assembly. We connect the control PCB and the rear panel using M3 screws and brass poles about 15 mm long. The length of the brass poles may vary as the plywood thickness varies from 3.7 to 4 mm.

Step 22: Installing the Middle Panels and White Translucent Organic Glass.

On the front side of the PCB, lay three middle panels with slots in the form of seven-segment indicators. From the end sides of the parts, insert the M3 nuts into the rectangular holes.

Then we lay the fourth middle panel and 1 mm thick white translucent organic glass for light scattering. Next, put the front panel and tighten all the parts together with M3 screws, which are 10 mm long.

Step 23: Installation of the Cladding Panel.

In order to give a more aesthetic appearance to the LED clock case, we install the facing panel from the end side of the parts tightened together and fix everything with M3 screws.

Step 24: Description of the Touch Control Buttons.

On the backside of the clock case there are touch-sensitive control buttons. The engraved letters in the circles mean the following: P stands for power, C stands for discoloration, H stands for change of hours, and M stands for change of minutes.

Step 25: Special Mounts and Stand for the Case of the LED Clock.

Also, there are provided special mounts for the case of the LED clock, so that it was possible to hang them on the wall. In order to install them, between the case of the device and the wall mount, plastic poles 5 mm long with an inner hole diameter of 3 mm are inserted and fixed with M3 screws 20 mm long.

In my case, I will use a clock stand consisting of two parts, one of which has a hole for fixing the case with an M3 screw 15 mm long.

Step 26: Work Result.

Thank you all for watching the video and reading the article. Don’t forget to like it and subscribe to the “Hobby Home Electronics” channel. Share it with friends. Further there will be even more interesting articles and videos

Make it Glow Contest

Participated in the
Make it Glow Contest

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Meatless Challenge

      Meatless Challenge
    • Fabric Challenge

      Fabric Challenge



    1 year ago

    Outstanding project! Excellent description, clean professional result. Thank you for sharing.


    1 year ago

    Hello, can you tell me the approximate cost of all the materials for the assembly?
    Great project, congratulations.

    Hobby Home Electronics
    Hobby Home Electronics

    Reply 1 year ago

    Good afternoon! Approximate price for all 37 euros, that's about 45 dollars! PCBs can be cheaper if you ordered without steel stencil! Sometimes shipping is more expensive than printed circuit boards. You can also save money on the manufacture of the case, as there is a final drawing! Thanks!


    1 year ago on Introduction

    Very thorough description and what amounts to a full service manual. However, 4 digit clocks are so common that this project is redundant. On the other hand, a six digit clock with hours, minutes and seconds would be nearly unique, and a much more remarkable project, and a marvelous conversation starter.

    Hobby Home Electronics
    Hobby Home Electronics

    Reply 1 year ago

    Hello! I originally planned the design of such a clock! In my opinion, it makes no sense to make clock with seconds. My task was to place all the radio components on one printed circuit board without unnecessary wires, and place it all in a nice beautiful case, which was not made on a 3D printer.


    1 year ago

    Too professional look. I tried something similar, but the aesthetic was far away. And I did not finished it. I like everything except power jack (bottom side would be perfect).
    Integration of DS3231 and Atmega328p is awesome! And above my skills.


    1 year ago

    Do you have code for 12 hour format? Great looking project! Thanks for sharing...

    Hobby Home Electronics
    Hobby Home Electronics

    Reply 1 year ago

    Hello! No, I have no code for the 12 hours format at the moment. All this can be corrected inside the program code. Thanks!


    Reply 1 year ago

    Yeah, I was sure of that. My coding skills are just minimal at this point. Cheers!


    1 year ago

    Wow, awesome project! I like the design cut in the wood to allow corner bends... never thought about being able to do that with wood.

    Hobby Home Electronics
    Hobby Home Electronics

    Reply 1 year ago

    Hello! I have altered the case for the device many times. I stopped at this option, as it is the most aesthetic one. Thank you for watching and your comment!

    Avocado Pirate
    Avocado Pirate

    1 year ago

    WOW! This looks extremely high quality! I like that you used screws and nuts instead of glue, so it can be taken apart again without wearing out components!

    Hobby Home Electronics
    Hobby Home Electronics

    Reply 1 year ago

    I am very glad that you liked my project! Thank you Sir!