Timer With TM1637 and Arduino




Introduction: Timer With TM1637 and Arduino

About: Concerned about projects and constructions in the field of electronics. New and old projects.

This timer is useful in both domestic and industrial applications. It is a countdown timer programmable in the range of 1s .... 9999s.

During this time, the load is powered by a relay on the board.

For repeated timings, it is possible to memorize the timing duration (MEM LED on).

The end of the period time is signaled acoustically with a Beep and optically by turning off the LOAD POWER LED.

In the first video you can see briefly how to program the timer (time setting):

For the beginning, an unsuccessful setting was made. This is solved with Reset on Arduino, the timer reaches zero and a new setting is made with rotary encoder at 13 s. The procedure is described in Step5.

The second video shows how the timer works while the load is powered ( the LOAD POWER LED is on). At the end of the period, the load is not powered, the LED goes out and because it worked with MEMORY ON pressed (LED MEMORY on) a new timer resumes from 13s, without the need for a new procedure for setting of time.

It is a compact module, not very big and can be easily made.



The modules and electronic components are bought from AliExpress at low prices. The mechanical materials can be found in our own workshop.

PCB can be made in your own workshop or can be ordered at the factory. There are all the necessary data for this.

Step 1: Gathering Materials and Tools

The main modules and electronic components can be found in photo1.

To these are added:

-BC547 -2 pcs.

-1N4148 -1 pc.

-LED round, 5mm - 2 pcs.

-78M05 -1 pc.

-15K/0.125W -2 pcs.

-1k/0.25W -1 pc.

-10uF/16V -1 pc.

- strip connector female -3pcs.

- knobs -2 pcs.

- Screws, nuts, spacers.

- Plexiglas 2.5 mm thick, 11X11 cm. recovered from the screen of an old LCD TV. -1pc

-Solder tin tools

-Pliers for cutting component terminals.

-Digital multimeter.

-Mechanical tools for plastic cutting, drilling, screwdrivers.

-Lust for work.

Step 2: Schematic Diagram

The wiring diagram is built around the Arduino Nano, which displays the information on the TM1637 LED display.

SW1 gives the necessary impulses to enter the time duration information.

On pin 19 Arduino we have the control voltage for the relay K1 (through Q1), which supplies the load during the delay and lights the LED D1.

Pin 12 Arduino commands Buzzer BZ1 through Q2 at the end of the timer, for 1s.

Pressing SW2 involves memorizing the delay time, D3 lights up.

The power supply of the module is made with 12V / 500mA at J1.

CI U1 (78M05) supplies the LED display and BZ1 separately with 5V.

Step 3: Making PCB

At the address:


there are details of the PCB execution and other details of the project.

The PCB project is made in KiCad, a program that can be found for free on the Internet. Here are all the details needed to make PCB in your own workshop.

The program also easily generates the necessary Gerber files for factory PCB order.

In photo 4 you can see the overall sketch of the PCB, and in photo 2, 3 you can see the PCB made in my workshop.

.In the attached PDF file you will find the labels necessary to write the wiring if it is made in your own workshop.

If you order the PCB at the factory, the project has the inscriptions on it.

Step 4: Assembly and Putting in Function

Photos 6 ... 8.0 show various phases of assembling the module, using soldering station with tin and cutting pliers for terminals. For safer orientation, the KiCad PCB drawing is used.

Photos 8 ... 10.1 show the assembled module, exclusively the Plexiglas mask.

At this point it is good to put the module into operation.

After checking the correctness and continuity of the PCB routes (if it is done in our own workshop), it is supplied with + 12V and the + 5V voltage is checked.
If everything is OK, we upload the program into Arduino and should work.

Next, using the materials from photo 11, we make the final assembly, the result being that from photo 12.

One of the two Knobs will be used to reset the Arduino, the other for the MEMORY button.

Step 5: Software

To work it is necessary to install the TM1637Display.h library from address:


Arduino.h library is included in the Arduino IDE.

The function for the Rotary Encoder is my own design and I have used it before.

At start-up, a time setting must be made according to the algorithm:

Set number seconds (rotary encoder) -> push -> secondsX10 -> push -> 100Xseconds -> push -> 1000Xseconds. Now the time is set. The next push will trigger the delay.

If an error is made during the time setting, it can be remedied after pressing the Reset button on the Arduino.

Step 6: Final Conclusion

This timer is useful in many home or industrial applications. Made neatly, it will work right away. PCB can be made by own means or can be ordered at the factory. The software is checked and has no bugs. Being cheap ( less than $ 10) worth doing.

It can also be useful for beginners, to learn how to assemble an electronic module, to load a program and others.

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share


    • Meatless Challenge

      Meatless Challenge
    • First Time Author Contest

      First Time Author Contest
    • Remote Control Contest

      Remote Control Contest



    Reply 7 months ago

    Inserting a hardware EEPROM into the circuit is more difficult.To store predefined values, it is much easier to use the existing hardware and make software changes using the EEPROM library, so we will use the internal EEPROM of the microcontroller.
    Good luck!


    Reply 7 months ago

    Sir, that's what I asked for internal eeprom, can you add the internal eeprom code in your existing timer with Tm 1637 code, and send