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
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
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 |
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 |
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) |
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 |
Code Examples
Arduino
// 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 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)
#!/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 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)