TM1637 7 Segment Display - Making It Work!




Introduction: TM1637 7 Segment Display - Making It Work!

About: Lifelong technology geek

Well, I finally broke down and decided to experiment with 7 segment displays. I would rather program a TFT touch or just a plain TFT display because of their flexibility to display lots of information across screens. A 7 segment display is so very limiting, even with extended digits. However, as a novel idea I decided to make a world clock to display times across the globe. The perfect application for the low cost 4 digit, 7 segment display! So more on the project as it gets more advanced, but here are my “discoveries” and thoughts about the TM1637 display from RobotDyn.

Step 1: Parts

To experiment with theTM1637 display, the only things you need are:

- TM1637 Display

- An RTC or DHT to read some information - optionally, no hardware, just do a simple counter

- Arduino Uno, Mega or Micro

- A few jumper wires

Step 2: Software Considerations

Software considerations:
I found 3 different libraries to use with the TM1637

- TM1637.h - recommended by RobotDyn but older

- TM1637display.h library - by AVISHORPE seems to be the favorite

- SevenSegmentTM1637.h - By breeme. Most functionality and possibilities.

Try them all and see what you think, so far I am most comfortable with the TM1637display library.

Step 3: Initial Thoughts

Initial thoughts:
When I first got my display I bought it with some generic 7 segment displays (12 lead) and some shift registers. Using them was more work than I needed and limited me to using a Mega for my world clock. The TM1637 display uses I2C and so even a micro will handle 4-5 of these displays, but I’ll confirm as my project develops! But using just (2) GPIO pins each - that’s a big plus.

The unit is very cost effective, just a $1.50 for the larger (50x19mm) display at

Easy to install and use for a project. Good size, bright display that is adjustable, 4 mounting holes (RobotDyn version), dual end access, only 4 connections (5v, Gnd, Data, Clock), color variations (5), and “simple” programming (read on…).

Step 4: Programming

So far, I have been happiest with the TM1637display.h library and used it to get the following results and findings. These probably aren’t the only issues, but the things I have come across and found work arounds to resolve.

About that programming now. When I first hooked up my display and ran the examples for all three libraries, I got nothing. No display, no read out, nothing. In fact it seemed to freeze the Arduino up and declined to output even a serial output. I’m just a maker but surely I couldn’t mess this simple little display up! After some research, I found some information in lots of places, thus let me try to pass on some of what I have found.

Like an LCD display you can output a string of integers to the display. There are more ‘complex’ ways to place the information but not necessary. The display is limited with strings and characters and limits the set available, so if you need text these may not be the best solution.

Using a ‘delay’ of any type seems to cause the display to freeze. This may be unique to the RobotDyn display as others seem to avoid the problem but this wasn’t the only issue. To get around it I found 2 steps. First I cutoff the built in capacitors on the rear of the device - which I was too lazy to desolder. Second, I commented out all delays. Success! The display sprang to life. Now, there is no way to set timing (such as a counter) so less than ideal, but I want a clock and/or temperature gauge, so I can work with this.

On the RobotDyn display the decimal points don’t seem to be accessible. I haven’t found a definite solution - and won’t need it - but be aware.

Documentation for the colon was cumbersome, but I found a fairly simple solution using a one line command. I can't make it blink easily, but again, of little issue for my project. Use ‘display.showNumberDecEx(0,64);’ and there is a colon.

To get the display to show a steady readout I just used for() statements to repeat the output for the duration I want it to show. Just gives me more subroutines to call. But I’ll take the win.

To get different colors you have to order a color corresponding display. You can not change the color of the display. If this is how you are going to use them, order a batch from Amazon with 5 different color displays. With RobotDyn you order a color or a batch of 1 color.

Step 5: Conclusion

So far that’s what I have found but if you have any suggestions I would appreciate the feedback or suggestions. I’m still learning about the display and have a lot to learn and understand about them. Any other notes you have are welcome. Thanks and I hope this helped others interested in the 7 segment display. Enjoy!

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share


    • Make it Glow Contest

      Make it Glow Contest
    • Cold Challenge

      Cold Challenge
    • Clocks Contest

      Clocks Contest



    1 year ago

    Thank you so much for posting this : the two CAPs that must be removed resolved my issue after 2 hours of seraching for solution


    2 years ago

    Thank you very much. Remove capacitors is a GREAT HINT!

    I bought three sets of 7 segment LED and 20 DIP TM1637 from local shop.
    Hooked up one set on a bread board, no K1/K2 connection and added two 100pf capacitors and two 10k resisters, as shown on TM1637 specification sheet.

    My final plan is to use extra STM32F769 DISC1 board (failed USB-OTG-HS IC, due to 7V input to 5V port by error), BME280 humidity/temperature/pressure sensor via I2C. Code example is available on internet for STM32L152.

    However, after the bread board setup, I have been struggling for three or more days with totally no response for both Arduino and STM program code example. But display itself is tested OK by putting 3.3V or 5V input to SEGMENTx with GND connected.

    Then I found your post and removed two 100pf capacitor, suddenly become OK for both Arduino and STM32F769. It was found that two resisters are necessary. I also tried 3.3V for VDD and works OK as other internet information suggests.

    Use of 3.3V may not be OK for GREEN or BLUE, depending on forward voltage, but not purchased/tested at this time. I only get RED, YELLOW, WHITE as anode common 7 segment LED.

    Again, thank you for your right / good / timely suggestion!


    3 years ago

    Interesting thing ;)
    If use right side connector (tm1637 ) unstable or not work .
    If conect from left side to arduino works fine ???


    3 years ago

    Excellent tip on removal of the capacitors! Was just about to give up on these 'til I saw this. Thanks.


    Question 4 years ago on Step 5

    Hi I have 4 of these displays and am interested in daisy chaining them together so they only use a single clock and data pin over i2c. Is that possible with this device and if so where do I start?


    Reply 4 years ago

    Using a nano, uno or a mega no need to chain. See my World Clock project, it uses 5 displays with only 1 RTC. Use the RTC as the base time and then adjust to the time zone for each display (ie each zone adjusts the current time by +/- hours). The code is simple, just use different names in the setup for each display and then display the corresponding zone time.

    As for the single data pin - thus asking about daisy chaining- I don't think so, but as there is a passtrhough it may be possible, just beyond my knowledge.