DIGITALbeginner

TM1637 4-Digit Display (0.56 inch)

Four seven-segment digits on two ordinary pins. The TinkerBlock TK51 with its clock colon, the clock set, the digit set with decimal points, and the one bit that behaves differently on each.

TM1637 4-Digit 0.56″ Clock Display, 6 Colours
TM1637 4-Digit 0.56″ Display with Decimal Points, 6 Colours

Specifications

Type4-digit 7-segment LED display with a TM1637 driver chip
TinkerBlock TK51The clock version: a colon between the middle digits and no decimal points. In the 46-piece kit
Clock set6 panels with a colon between the middle digits and no decimal points, one each in yellow, green, blue, white, orange and red, with a film cover and a 3D-printed enclosure each
Digit set6 panels with a decimal point after each digit and no colon, in the same six colours, with a film cover and an enclosure each
Driver chipTitan Micro TM1637, SOP-20, under the display: 8 segments by 6 digits, of which this board uses 4. It drives common-anode displays
Wires to your board4: GND, VCC, and the 2 signal wires CLOCK and DATA
ProtocolTwo-wire, TM1637's own. No addresses, so it is not I2C and cannot share an I2C bus
Supply voltage5 V for every colour. 3.3 V usually lights red, orange, yellow and green; blue and white need 5 V. The datasheet specifies the chip at 4.5 to 5.5 V
Pull-ups10 kΩ on CLOCK and on DATA, to VCC. So VCC is the voltage your board's two pins see
Digit height0.56 inch, which is 14.2 mm
Brightness8 steps, set in software: pulse widths of 1, 2, 4, 10, 11, 12, 13 and 14 sixteenths
Header4-pin right-angle male at the left end, 2.54 mm: GND, VCC, CLOCK, DATA from the top. No pad is square; the names are printed on the back. The same four are bare pads at the right end
Board62.3 × 22.4 mm, V3, four 4.6 mm mounting holes 56 × 16 mm apart. Every part is on the display side

What it does

Four digits, a driver chip and two wires. The chip holds a byte per digit and does the refreshing itself, so your sketch sends a number once and the display keeps showing it through anything else the program goes on to do.

Drag to turn it
The TK51. The chip, two resistors and two capacitors are underneath the display. Turn it over for the back.

The protocol looks like I2C (a clock line, a data line, a start and a stop) and is not: there is no address anywhere in it. So an I2C scanner will not find this display, it cannot share a bus with I2C parts, and a second display needs a DATA pin of its own.

The boxes

Three products, one board. What differs is the display soldered to it.

The clock set: six four-digit displays in black 3D-printed enclosures, lit in red, yellow, green, pale blue-green, blue and orange, each showing 88:88 with a colon between the middle digits and no decimal points, beside a teal box printed TM1637 4-DIGI SEGMENT DISPLAY KIT.
The clock set: six panels with a colon, for times and timers.
The digit set: six four-digit displays in black enclosures, lit in red, orange, green, blue, pale blue-green and yellow, each showing 8.8.8.8. with a decimal point after every digit and no colon, beside the same teal kit box.
The digit set: six panels with decimal points, for readings.

The TinkerBlock TK51 is the same board in the 46-piece kit, with the clock display. Its back carries the sentence that explains the whole range: for clock display, decimal points are replaced by colon. There are eight segment wires, and the eighth is either the points or the colon, never both.

You are showingThe panelWhy
A time, a timer, minutes and secondsClock (and the TK51)The colon is the only separator that reads as a time
A temperature, a voltage, a weightDigit23.5 needs a point, and a colon cannot be one
A count, a score, a raw numberEitherNeither separator gets used

Bit 7 of a digit is that digit's decimal point, and on a clock panel the second digit's is wired to the colon. 0b01000000, the second digit, is what lights it. Not 0b10000000, which is the first digit and lights nothing on a clock panel.

Wiring, in four lines

Your boardVCC toCLOCK toDATA to
Arduino Uno5VD2D3
ESP323V3GPIO 18GPIO 19
ESP32-S33V3GPIO 4GPIO 5
Raspberry Pi Pico (MicroPython)3V3(OUT)GP2GP3
  1. GND to your board's GND.
  2. VCC to your board's logic supply. Never 5V beside a 3.3 V board.
  3. CLOCK to any digital pin.
  4. DATA to any other digital pin.

Seen from the display side with the header on the left, the pins read GND, VCC, CLOCK, DATA from the top. No pad is square, so go by the back, which prints GND, VCC, clock, data at both ends. VCC is the one that is not free choice: the board's 10 kΩ pull-ups tie CLOCK and DATA to it.

More than one

Displays share CLOCK and need a DATA pin each: six displays cost seven pins. A display only starts listening when its own DATA falls while CLOCK is high, so the clock toggling for its neighbour means nothing to it.

The four pads at the far end of each board are the same four nets as the header, not a pass-through. They are the right way to pass power and clock along a row, and the wrong way to feed the next display's DATA: wired that way, every panel shows the same number.

Example

Install TM1637 by Avishay Orpaz from the Arduino Library Manager; the header is TM1637Display.h. The MicroPython version drives the two wires by hand with tm1637.py from the same folder, saved to the board first.

tm1637_display.ino
/*
  TM1637 4-Digit Display - colon and points        TK51 / /p/tk51

  Wiring. No pad on this board is square, so go by the names
  printed on the back: GND, VCC, clock, data. Seen from the
  display side with the header on the left, GND is the top pin.

    GND   -> GND
    VCC   -> your board's logic supply: 5V on an Uno, 3V3 on an
             ESP32 or ESP32-S3. Never 5V beside a 3.3 V board:
             the pull-ups would put 5 V on your pins.
    CLOCK -> D2 on an Uno, GPIO 18 on an ESP32, GPIO 4 on an
             ESP32-S3
    DATA  -> D3 on an Uno, GPIO 19 on an ESP32, GPIO 5 on an
             ESP32-S3

  Arduino IDE
    Tools > Board            your board, e.g. Arduino Uno
    Tools > Port             the one that appears when you plug in
    Tools > USB CDC On Boot  Enabled   (ESP32-S3 only)
    Library: "TM1637" by Avishay Orpaz, from Tools > Manage
    Libraries. It installs TM1637Display.h.
*/

#include <TM1637Display.h>

#define CLOCK_PIN 2    // Uno D2.  ESP32: 18.  ESP32-S3: 4.
#define DATA_PIN  3    // Uno D3.  ESP32: 19.  ESP32-S3: 5.
#define COLON     0b01000000   // bit 7 of the second digit

// CLOCK first, then DATA.
TM1637Display display(CLOCK_PIN, DATA_PIN);

void setup() {
  display.setBrightness(4);     // 0 to 7, sent with the next write
}

void loop() {
  // 12:34 on a clock panel, 12.34 on a digit panel: the same
  // four bytes. The colon blinks once a second.
  display.showNumberDecEx(1234, COLON, true);
  delay(500);
  display.showNumberDecEx(1234, 0, true);
  delay(500);
}
View on GitHub · blocks/tk51-tm1637-display/arduino/tm1637_display/tm1637_display.ino @ v1.13
A TK51 counting on an Arduino Uno

Three things to know

The colon is 0b01000000the second digit's point; the first digit's bit, 0b10000000, lights nothing on a clock panel
VCC is the signal levelthe pull-ups end at VCC, so 3V3 beside an ESP32
A DATA pin eachdisplays share CLOCK; the spare pads carry the same DATA

Where to start

The handbook below is thirteen short articles with a working figure in each. If you only read one, read two sets, one board: it is the difference between the two six-packs and the reason most colons refuse to light. If you want a number on the display now, the first number is the whole build.

When it doesn’t work

An I2C scan does not find it.
It never will. The protocol has no addresses at all, which the datasheet says in as many words, so there is nothing for a scan to answer. It uses two ordinary digital pins and the TM1637 library, and it cannot share SDA and SCL with real I2C parts.
The colon will not light.
Three causes, in order. The panel is a digit one and has decimal points instead of a colon. Or the mask is 0b10000000, which is the first digit: the colon is the second digit's point, 0b01000000. Or the number is 0 with leading zeros off, which makes the released library drop the dots entirely.
Can I power it from 5 V next to an ESP32?
No. The board's 10 kΩ pull-ups tie CLOCK and DATA to its VCC, so from 5 V both wires sit at 5 V against pins rated for 3.3 V. Feed it 3V3, or keep 5 V and put a bidirectional level converter in the two signal wires.
Which pin is pin 1? None of the pads is square.
None is: all eight header pads are the same oval. Go by the names on the back. Seen from the display side with the header on the left, GND is the top pin and DATA the bottom one.
The blue panel is much dimmer than the red one.
Both are working. Blue and white LEDs need about 3.1 V before they conduct, and there are no series resistors on this board, so 3.3 V leaves almost nothing for the chip's own drivers. Titan Micro's datasheet asks for 5 V where blue is involved.
setBrightness seems to do nothing.
The brightness, and the on/off bit with it, is only sent along with digits. Call setBrightness, then show something. On its own it changes a variable inside the library and nothing else.
Two displays show the same number.
They are sharing a DATA line. The four pads at the far end of the board are the same four nets as the header, so a second display wired from them hears every byte meant for the first. Displays share CLOCK and need a DATA pin each.

The TM1637 display handbook

13 articles · about 60 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

Why this display

2 articles

Thirty-two LEDs need twelve wires and a program that never stops refreshing them. The TM1637 takes that job and talks over two wires that look like I²C and are not.

What is in your box

3 articles

Two six-packs and a TinkerBlock part, all the same board with a different display fitted. What every pin and hole is for, and the first number on it.

How it shows a number

3 articles

One byte per digit, a mask for the points and the colon, and eight brightness steps that are not evenly spaced.

Power, and more than one

2 articles

Which supply each colour needs and what that means next to an ESP32, and six displays sharing one clock pin.

Two builds and a check

3 articles

A clock that sets itself over Wi-Fi, a voltmeter that puts the point in the right place, and what to look at when it shows nothing.

Lessons using TK51

Each one is a working build, not a snippet.

Edit this page — content/modules/tm1637-display.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

This page covers several products. Choose yours to see the right discussions.

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →