Skip to content
HYPERPCB

Implementing LED matrix multiplexing: scan rate, peak current, and drivers

Published 2026-11-19

Scan an LED matrix one row at a time at ≥200 Hz frame rate, compute row dwell from N rows, size peak LED current from duty, and pick drivers that meet your row current and grayscale budget.

Matrix vs charlieplexing: which fits?

A row/column matrix drives one row active while columns select LEDs in that row; duty per LED is 1/N_rows. Charlieplexing uses N tri‑state pins to address N×(N−1) LEDs but only one LED is ever on, so duty is 1/[N×(N−1)]. Example: N=10 → 90 LEDs → per‑LED duty ≈1.1%. To get 5 mA average you’d need ≈450 mA peak through that LED, which exceeds most 0603/0805 pulsed limits. For more than a few dozen LEDs or any grayscale, use a matrix.

What scan rate and dwell time avoid flicker?

Use a frame refresh at or above 200 Hz for steady light in peripheral vision. For N rows: T_row = 1 / (F_frame × N). Examples at F_frame = 200 Hz: N=8 → row rate 1.6 kHz, T_row ≈ 625 µs; N=16 → 3.2 kHz, T_row ≈ 312 µs. If you add grayscale PWM inside each row, keep the sum of PWM time slices ≤ T_row or reduce bit depth or increase F_frame.

Resistors and peak current sizing with examples

Average current per LED is I_avg = I_peak × duty. Duty = 1/N_rows in a matrix. Pick I_peak so I_avg meets brightness and stays within the LED’s pulsed‑current limit at your duty and period.

• Red example (8×8, 5 V rail): V_F(LED)=2.0 V, driver drop=0.2 V, target I_avg=5 mA, duty=1/8 → I_peak=40 mA. R ≈ (5.0−2.0−0.2)/0.040 = 70 Ω → choose 68 Ω (E24). Resistor power ≈ I_peak² × R × duty = 0.04²×68×0.125 ≈ 13.6 mW.

• White example (8×8, 5 V rail): V_F(LED)=3.1 V, driver drop=0.2 V, target I_avg=5 mA, duty=1/8 → I_peak=40 mA. R ≈ (5.0−3.1−0.2)/0.040 = 42.5 Ω → choose 43 Ω (E24). Resistor power ≈ 8.6 mW. Note: on 16 rows, duty=1/16 and I_peak doubles to 80 mA for the same I_avg; many SMD whites will not allow that pulse at 200 Hz—either reduce I_avg, increase row count only with a constant‑current matrix driver that limits peak, or raise F_frame and lower PWM depth to keep pulse width within the datasheet’s allowed duty/period.

Driver choices and practical limits

  • Direct MCU GPIO with per‑LED (or per‑column) resistors: fine for small arrays and ≤20–40 mA peak per column.
  • Shift registers (e.g., 74HC595) on columns plus one P‑MOSFET high‑side or N‑MOSFET low‑side per row; ensures clean row gating and easy scaling.
  • Constant‑current matrix drivers (e.g., MAX7219 for 8×8, IS31FL3731 for 8×16) provide uniform current and built‑in PWM, offloading timing.
  • Low‑side current‑sink arrays (e.g., TLC59xx family) paired with high‑side P‑MOSFETs when row peak current is high.

Match driver current capability to the worst‑case row load: I_row,peak = N_cols_on × I_peak.

How to prevent ghosting and ringing?

Insert break‑before‑make: disable the active row, wait 1–5 µs, latch new column data, then enable the next row. Add 22–100 Ω gate/base resistors on MOSFETs/BJTs to control edge rates. If faint glow persists, add 47–100 kΩ bleeders from each column to the inactive rail to discharge parasitics. Keep column current‑limit resistors close to the driver pins to tame ringing.

Power, thermal, and PCB routing numbers

With all columns lit in one row of an 8×8 at I_peak=40 mA: I_row,peak = 8×40 mA = 320 mA. Average rail current is 64×5 mA = 320 mA, so input power ≈ 5 V × 0.32 A = 1.6 W plus switching losses in drivers. Use a solid ground plane; size row buses 0.5–1.0 mm (1 oz Cu) for 0.3–0.6 A peak over short runs. Decouple each driver IC with 0.1 µF near VCC and provide 10–47 µF bulk per matrix near the driver cluster.

Firmware timing and grayscale PWM

Drive the row scanner from a hardware timer. Double‑buffer the column bitmap and swap on frame boundaries. For 8 rows at 200 Hz, T_row ≈ 625 µs. With linear 8‑bit PWM, total slices per row = 255, so base PWM tick ≈ 625 µs / 255 ≈ 2.45 µs (≈408 kHz). If that’s too fast for your MCU, use 6‑bit PWM (63 slices → ≈9.9 µs tick, ≈101 kHz), or bit‑angle modulation so most energy is in a few longer slices while still fitting within T_row.

Is charlieplexing right for you?

Use it when pins are extremely scarce and LED count is modest. Keep per‑LED refresh ≥200 Hz: with N pins you must scan N×(N−1) LEDs, so your per‑LED time budget shrinks fast. Check that the required I_peak, duty, and pulse width fit the LED’s pulsed limits and your EMC margin.

Manufacturing and compliance you can request

Boards can be built and inspected to IPC Class 2 or IPC Class 3 acceptance criteria, with RoHS and REACH supported. Our ISO 9001:2015 QMS is certified by SGS (certificate CN-2023-Q1156, valid to June 2027). Quotes are returned within 24 hours and DFM feedback within 1 business day.

Send your LED matrix Gerbers for a 24-hour quote and next-business-day DFM review. — Get a quote