Elektronik Atölyem

How does a 7-segment display work?

The digits on clocks, meters, oven and air-con panels are really 7 (8 with the dot) small LEDs. Tap the segments and watch which one lights and why.

🎮 Play: tap the segments or pick a digit

agdfbec

Display type

Code (dp g f e d c b a)

dp0g1f1e1d1c1b1a10x7F

🔬 What's inside? Every segment is an LED

Common cathode: the negative ends (cathodes) of all the LEDs are joined and brought out on the COM pin. COM goes to ground; to light a segment you feed + (HIGH, 1) to its pin through a resistor.

COM0 V (GND)aHIGHlitbHIGHlitcHIGHlitdHIGHliteHIGHlitfHIGHlitgHIGHlitdpLOWoff

📌 Pinout (10-pin single digit, e.g. 5161AS / 5161BS)

agdfbece1d2COM3c4dp5b6a7COM8f9g10

front view, decimal point at bottom right

Hover over or tap a segment: its pin lights up yellow. Pinouts can vary by maker; confirm by measuring.

🧮 Resistor calculator: one resistor per segment

R = (Vcc − Vf) / I = 300 Ω → use a standard 1000 Ω (100 mW)

Why not a single resistor on COM? With a shared resistor the current is split among the lit segments: a 1 looks bright and an 8 looks dim. Each segment gets its own resistor.

⚡ Multi-digit displays: scanning (multiplexing)

A 4-digit display has 8 segments + 4 digits = 12 pins instead of 4 × 8 = 32. The segment lines are shared by all digits; the processor lights the digits one at a time, very fast. Your eye thinks they're all on at once (persistence of vision). Slow it down and see:

Scan speed

D1D2D3D4a b c d e f g dp

Segment lines (a…g, dp): shared by all digits

Digit select (D1…D4): switched on in turn

Digit lit right now: D1 → “1”

🔧 Find the type and pins with a multimeter

  1. Set the meter to diode mode. Put the red probe on one pin and touch the black probe to the others in turn: if a segment glows faintly, the red end is an anode and the black end a cathode.
  2. If one pin lights every segment while the black probe is on it, that pin is the common cathode (CC); if it does so with the red probe on it, it's common anode (CA).
  3. The common pin is usually one of the two middle pins (3 and 8); they're joined inside.
  4. A segment that never lights is an open LED. Half-lit (ghosting) segments on a board usually come from the scan timing or a driver transistor.

🔌 How is it driven?

  • •Straight from processor pins: 8 pins + a resistor per segment (e.g. 220–330 Ω on an Arduino).
  • •74HC595 shift register: 8 segments from 3 pins; extra transistors for scanning a multi-digit display.
  • •CD4511 / 74HC4511 (BCD → 7-segment decoder for common cathode): turns a 4-bit number straight into a digit.
  • •MAX7219 / TM1637 ready-made drivers: handle the scanning and current setting themselves; up to 8 digits.

Go further