IṢẸ́ ỌNÀ
ẸWÀ ÀTI ÌLERA
IṢẸ́ ỌWỌ́
ÀṢÀ ÀTI ÌTÀN
ÌṢERÉ
ÀYÍKÁ
OÚNJẸ ÀTI OHUN MÍMU
REVERSE ENGINEERING
SÁYẸ́ǸSÌ
ERÉ ÌDÁRAYÁ
ÌMỌ̀-Ẹ̀RỌ
ÀWỌN OHUN WÍWỌ̀
The Seven-Segment LED Display
Ed

Ṣẹ́dá nipasẹ̀

Ed

29. Oṣù Kẹjọ 2026FI
36
0
0
0
0

The Seven-Segment LED Display

The opposite of the Nixie: instead of a shaped numeral at 170 V, the fewest straight lines that still make every digit — seven bars in a figure eight, at 2 V and pennies. It looks like sticks and nobody cares, because it is seven LEDs and never wears out. You will build a four-digit display and confront its one clever idea, multiplexing, then measure the refresh rate at which the flicker vanishes for your own eyes.
Olùbẹ̀rẹ̀
4 hours

Ìlànà

1

Seven sticks, ten digits, and the sibling that used 170 volts

Nixie versus seven-segment: the same job, opposite answers. The Nixie shows the real numeral shape at 170 V and poisons its cathodes; the seven-segment builds each digit from seven bars (a-g) at 2 V and never wears out. Before wiring, draw a figure eight, label the bars a-g, and write which bars light for each digit 0-9. That table is the whole interface and becomes the lookup table in the code step.

Àwọn ohun èlò fún ìgbésẹ̀ yìí:

Ìfihàn onígun 7 oníhàhà 4 (TM1637)Ìfihàn onígun 7 oníhàhà 4 (TM1637)1 ẹyọ
2

Wire it: seven segment resistors, one transistor per digit

The multiplex wiring. All four digits' matching segments share one pin through ONE resistor — seven segment lines, seven resistors, whatever the digit count. Each digit's common cathode switches to ground through one NPN. Resistors go on the SEGMENTS, not the digits, or an 8 shares one resistor seven ways and dims. Four digits: eleven pins instead of twenty-eight. That saving is why you multiplex.

Ń gbé olùwò KiCanvas wọlé...

Olùwò Àpẹrẹ PCB Akọ́ṣẹ́mọṣẹ́

Àwọn ohun èlò fún ìgbésẹ̀ yìí:

Ìfihàn onígun 7 oníhàhà 4 (TM1637)Ìfihàn onígun 7 oníhàhà 4 (TM1637)1 ẹyọ
Àkójọ RẹsístàÀkójọ Rẹsístà1 ohun èlò
Onírúurú transistorOnírúurú transistor1 ìtò

Àwọn irinṣẹ́ tí a nílò:

BreadboardBreadboard
Ibùdó ÌtannáIbùdó Ìtanná
3

Drive it, and find the flicker frequency for your own eyes

The sketch multiplexes the four digits, then sweeps the refresh rate down so YOU find the frequency at which the steady number breaks into flicker — your flicker-fusion threshold, higher in peripheral vision. Each digit is lit a quarter of the time, so to stay bright it must be driven harder while on: refresh too slow and it flickers, drive too hard and you exceed the LED peak current. You have measured one wall of that box.
sevenseg_mux.inocpp
// Four-digit seven-segment multiplex driver, plus a flicker-fusion experiment.
//
// Segments a..g share seven pins (each through 220R). Each digit's common cathode is
// switched to ground by an NPN (base through 1k). Scan: drive the segment pattern for
// one digit, enable that digit, wait, blank, next digit. Fast enough and the eye fuses
// four flashing digits into one steady number.
//
// The experiment: sweep the refresh rate DOWN from 200 Hz and read the serial output to
// find the exact rate at which the number starts to flicker for YOUR eyes.

const int SEG[7] = {13, 12, 14, 27, 26, 25, 33};   // a b c d e f g
const int DIG[4] = {32, 4, 16, 17};                 // digit-enable (NPN bases)

// Segment patterns for 0-9, bit order a..g (1 = lit). Common cathode: HIGH lights a segment.
const uint8_t FONT[10] = {
  0b1111110, // 0  a b c d e f
  0b0110000, // 1  b c
  0b1101101, // 2  a b d e g
  0b1111001, // 3  a b c d g
  0b0110011, // 4  b c f g
  0b1011011, // 5  a c d f g
  0b1011111, // 6  a c d e f g
  0b1110000, // 7  a b c
  0b1111111, // 8  all
  0b1111011, // 9  a b c d f g
};

int digitValue[4] = {1, 2, 3, 4};

void blank() {
  for (int d = 0; d < 4; d++) digitalWrite(DIG[d], LOW);   // all digits off
}

// Show one digit's pattern for onMicros, then blank. Common cathode: segment HIGH = on,
// digit-enable HIGH drives the NPN and pulls that common to ground.
void showDigit(int pos, int val, unsigned long onMicros) {
  blank();
  uint8_t pat = FONT[val % 10];
  for (int s = 0; s < 7; s++) digitalWrite(SEG[s], (pat >> (6 - s)) & 1);
  digitalWrite(DIG[pos], HIGH);
  delayMicroseconds(onMicros);
  blank();
}

// One full frame = all four digits scanned once, at a given whole-display frame rate.
void frame(float frameHz) {
  unsigned long perDigit = (unsigned long)(1e6 / (frameHz * 4));
  for (int d = 0; d < 4; d++) showDigit(d, digitValue[d], perDigit);
}

void setup() {
  Serial.begin(115200);
  delay(300);
  for (int s = 0; s < 7; s++) { pinMode(SEG[s], OUTPUT); digitalWrite(SEG[s], LOW); }
  for (int d = 0; d < 4; d++) { pinMode(DIG[d], OUTPUT); digitalWrite(DIG[d], LOW); }

  Serial.println("# Seven-segment multiplex + flicker-fusion sweep");
  Serial.println("# Watch the display, straight on AND out of the corner of your eye.");
  Serial.println("# Note the rate printed when it FIRST starts to flicker. That is your");
  Serial.println("# flicker-fusion threshold. Peripheral vision fuses at a HIGHER rate,");
  Serial.println("# so the corner of your eye will flicker before the centre does.");
}

void loop() {
  // Sweep the whole-display refresh from 200 Hz down to 20 Hz over ~40 s, holding each
  // rate long enough to judge. Then jump back to 200 and repeat.
  for (float f = 200.0; f >= 20.0; f -= 5.0) {
    Serial.print("refresh = "); Serial.print(f, 0); Serial.println(" Hz");
    unsigned long hold = millis();
    while (millis() - hold < 1500) frame(f);   // hold this rate ~1.5 s
  }
  Serial.println("--- back to 200 Hz (rock steady) and repeating ---");
}

Àwọn ohun èlò fún ìgbésẹ̀ yìí:

Ìfihàn onígun 7 oníhàhà 4 (TM1637)Ìfihàn onígun 7 oníhàhà 4 (TM1637)1 ẹyọ

Àwọn irinṣẹ́ tí a nílò:

Pátákó Ìdàgbàsókè ESP32Pátákó Ìdàgbàsókè ESP32
Àkójọ Okùn Ìsopọ̀Àkójọ Okùn Ìsopọ̀
4

Multiplex duty cycle versus perceived brightness

Ń ṣí ìwé Jupyter…

Àwọn irinṣẹ́ tí a nílò:

Kọ̀ǹpútà TábìlìKọ̀ǹpútà Tábìlì

Àwọn ohun-èlò

3

Àwọn irinṣẹ́ tó nílò

5

CC0 Àgbègbè Gbogbogbò

Blueprint yìí ti jáde lábẹ́ CC0. O lè ṣe àdàkọ, yí padà, pín, àti lò láìsí ìyọ̀ǹda.

Ṣàtìlẹ́yìn Olùṣẹ́dá nípa rírà àwọn ọjà nipasẹ̀ Blueprint wọn Ẹ̀san Olùṣẹ́dá tí àwọn Olùtajà gbé kalẹ̀, tàbí ṣẹ̀dá àtúnṣe tuntun ti Blueprint yìí kí o sì fi sínú Blueprint rẹ gẹ́gẹ́ bí ìsopọ̀ láti pín owó-wíwọlé.

Ìfọ̀rọ̀wérọ̀

(0)

Wọlé láti dara pọ̀ mọ́ ìfọ̀rọ̀wérọ̀

Ń gbé àwọn ọ̀rọ̀ wọlé...