Documentation

TM1637 4-Bit Red LED Display Module & Clock | ShillehTek Product Manual
Documentation / TM1637 4-Bit Red LED Display Module & Clock | ShillehTek Product Manual

TM1637 4-Bit Red LED Display Module & Clock | ShillehTek Product Manual

7-SegmentArduinoClockDisplayESP32LED DisplaymanualPicoshillehtekTM1637

Overview

The TM1637 4-Bit Red LED Display Module is a compact 4-digit, 7-segment display with a built-in colon, driven over a simple 2-wire serial interface. It is the de-facto choice for DIY clocks, countdown timers, temperature readouts, energy meters, and any project where you need a bright, glanceable numeric display without using up half your microcontroller's pins.

The onboard TM1637 driver IC handles all the multiplexing and brightness control internally, so your microcontroller only needs to send 4 bytes of data over CLK and DIO. There are well-supported libraries for Arduino, ESP32, Raspberry Pi, and Pico (MicroPython), making it one of the easiest displays to add to any project.

At a Glance

Display
4-digit 7-seg, red
Operating Voltage
3.3V - 5V
Interface
2-wire serial (CLK + DIO)
Brightness Levels
8 (0 - 7)
Colon
Yes (between digits 2 + 3)
Pins
CLK, DIO, VCC, GND

Specifications

Parameter Value
Driver IC TM1637
Display Type 4-digit 7-segment LED, red
Operating Voltage 3.3V or 5V
Operating Current ~80 mA at full brightness, all segments lit
Communication Protocol 2-wire serial (TM1637 proprietary, similar to I2C)
Clock Frequency (max) 500 kHz (typical <= 100 kHz)
Brightness Control Software, 8 levels (0 = dim, 7 = max)
Display Memory 16 x 8-bit RAM (uses 4 of 16 grids)
Built-in Colon Yes, between digits 2 and 3
Operating Temperature -40 to +85 C
Display Dimensions ~30 x 14 mm (active area)
PCB Dimensions ~42 x 24 x 12 mm

Pinout Diagram

TM1637 4-digit 7-segment display module pinout showing CLK (clock), DIO (data), VCC (3.3V-5V power), and GND pins

Wiring Guide

Arduino Wiring

Connect CLK and DIO to any two digital pins. The TM1637 is bit-banged in software — there is no dedicated I2C peripheral required. Power from 5V for maximum brightness.

TM1637 Pin Arduino Pin
VCC 5V
GND GND
CLK Digital Pin 2
DIO Digital Pin 3
Tip: Install Avishay Orpaz's "TM1637" library via the Arduino Library Manager — it provides simple methods like `showNumberDec()` and `setBrightness()` for common use cases.

ESP32 Wiring

Power the module from 3.3V — the TM1637 driver and LEDs work fine at lower voltage, though brightness will be slightly reduced compared to 5V. CLK and DIO can connect to any GPIO since the protocol is bit-banged.

TM1637 Pin ESP32 Pin
VCC 3.3V
GND GND
CLK GPIO 18
DIO GPIO 19
Info: If you want maximum brightness on ESP32, power VCC from a 5V source (e.g., VIN pin) and add an external level shifter on CLK and DIO — the TM1637 inputs are 5V tolerant but driving 5V back to ESP32 GPIO is not.

Raspberry Pi Wiring

Raspberry Pi GPIO operates at 3.3V — power the module from the Pi's 3.3V pin. Use the `raspberrypi-tm1637` Python package or `rpi-TM1637` for the cleanest API.

TM1637 Pin Raspberry Pi Pin
VCC Pin 1 (3.3V)
GND Pin 6 (GND)
CLK Pin 11 (GPIO 17)
DIO Pin 13 (GPIO 27)
Warning: Avoid powering from the Pi's 5V pin even though the TM1637 supports it. Doing so makes CLK and DIO sit at 5V idle, which can stress the Pi's 3.3V GPIO. The display is bright enough at 3.3V for indoor use.

Raspberry Pi Pico Wiring

Power from the Pico's 3V3 (OUT) pin. CLK and DIO can use any GPIO since the driver is bit-banged in software. The mcauser/micropython-tm1637 library works great on Pico.

TM1637 Pin Pico Pin
VCC 3V3 (OUT)
GND GND
CLK GP14
DIO GP15
Tip: Copy `tm1637.py` from github.com/mcauser/micropython-tm1637 to your Pico's filesystem, then import it like any other module. It's about 200 lines of pure MicroPython — no compilation needed.

Code Examples

Arduino

tm1637_clock.ino
// TM1637 4-Digit Display - Arduino Example (Counter + Clock)
// Requires: TM1637 library by Avishay Orpaz (Library Manager)

#include <TM1637Display.h>

const int CLK = 2;
const int DIO = 3;

TM1637Display display(CLK, DIO);

void setup() {
  display.setBrightness(5);   // 0 = dim, 7 = max
  display.clear();
}

void loop() {
  // Count 0 - 9999 over and over
  for (int i = 0; i < 10000; i++) {
    display.showNumberDec(i, true);   // true = leading zeros
    delay(100);
  }

  // Show a colon clock for 5 seconds (12:34)
  display.showNumberDecEx(1234, 0x40, true);
  delay(5000);
}

ESP32

tm1637_esp32.ino
// TM1637 4-Digit Display - ESP32 Example (Live Clock from NTP)
// Requires: TM1637 library by Avishay Orpaz + WiFi

#include <WiFi.h>
#include <TM1637Display.h>
#include <time.h>

const char* SSID = "your_ssid";
const char* PASS = "your_password";

const int CLK = 18;
const int DIO = 19;
TM1637Display display(CLK, DIO);

void setup() {
  Serial.begin(115200);
  display.setBrightness(4);
  display.clear();

  WiFi.begin(SSID, PASS);
  while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
  configTime(0, 0, "pool.ntp.org");
}

void loop() {
  time_t now = time(nullptr);
  struct tm* t = localtime(&now);
  int hhmm = t->tm_hour * 100 + t->tm_min;
  display.showNumberDecEx(hhmm, 0x40, true);  // 0x40 = colon on
  delay(1000);
}

Raspberry Pi (Python)

tm1637_rpi.py
#!/usr/bin/env python3
# TM1637 4-Digit Display - Raspberry Pi Example
# pip install raspberrypi-tm1637

import tm1637
import time

display = tm1637.TM1637(clk=17, dio=27)
display.brightness(4)

# Show "HELO" message
display.show("HELO")
time.sleep(2)

# Count up forever
try:
    for i in range(10000):
        display.number(i)
        time.sleep(0.1)
except KeyboardInterrupt:
    display.show("    ")  # blank
    print("Stopped")

Raspberry Pi Pico (MicroPython)

tm1637_pico.py
# TM1637 4-Digit Display - Pico MicroPython Example
# Copy tm1637.py from github.com/mcauser/micropython-tm1637 to the Pico first

from machine import Pin
import tm1637
import time

display = tm1637.TM1637(clk=Pin(14), dio=Pin(15))
display.brightness(4)

# Show a temperature with one decimal place
display.numbers(23, 5)    # "23:05" -- two 2-digit groups

time.sleep(2)

# Animate count 0 - 9999
for i in range(10000):
    display.number(i)
    time.sleep_ms(100)

Frequently Asked Questions

Is the TM1637 the same as I2C?
It looks similar — two wires, clock + data — but the TM1637's protocol is its own thing. It has no slave address, no read-back, and the timing is different. You cannot use the hardware I2C peripheral on your MCU; instead, use a TM1637 library which bit-bangs the protocol in software.
How do I turn on the colon between the digits?
In the Arduino TM1637Display library, use `showNumberDecEx(value, 0x40, true)` — the 0x40 sets the decimal point flag for position 2 (the colon). For MicroPython tm1637, use `display.numbers(hh, mm)` which automatically turns on the colon between the two 2-digit groups.
Can I display letters too?
Yes, but only letters that can be approximated with 7 segments: A, B (b), C, D (d), E, F, G, H, I, J, L, N (n), O (0), P, Q, R (r), S (5), T (t), U, Y. Most libraries include a `showString()` or `show()` method that handles common ASCII characters. Some characters like K, M, V, W, X, Z don't render well — substitute alternatives where possible.
Why is my display flickering?
Either you're updating too frequently (every loop tick can cause visible refresh artifacts) or the brightness is set very low. Update only when the value changes, not in every loop, and try a higher brightness (5 - 7). On Pico, also try increasing the bit-bang delay if you see ghosting.
Can I chain multiple TM1637 modules?
Not on the same data line — the TM1637 has no addressing. To use multiple displays, give each one its own CLK and DIO pin pair on your microcontroller. ESP32 / Pico have plenty of GPIO; on Arduino Uno you can run 3 - 4 displays before running out of digital pins.
Why does it work on 5V but not on 3.3V?
It should work on both. If it works on 5V and fails on 3.3V, check: the 3.3V rail is supplying enough current (the TM1637 can draw 80+ mA at full brightness), the wiring is solid (loose breadboard contacts cause intermittent issues), and the library's bit-bang delay isn't too short for the longer rise times at 3.3V — increase the delay between bits if necessary.