SoundMat (6) Electronics System Design

This chapter designs the SoundMat electronics system. The electronics are a central part of the overall product. If the software is the brain, the electronics are the body: they provide the platform for software and implement the hardware functions.

As a public art installation, the electronics design is constrained as follows:

  1. Aesthetics: All components must fit inside the cavity; minimize external cables.
  2. Power: Prefer operation outdoors without a wall outlet.
  3. Reliability: Long, stable runtime; mechanically sound structure.
  4. Audio quality: Sound is core to the piece; output must sound good.

For (1), hidden parts imply size and thermal limits; ideally only one power cable and one audio cable leave the enclosure.

For (2), outdoor use (e.g. a plaza) should not depend on sockets. USB-C Power Delivery (PD) supports both chargers and high-capacity power banks.

For (3), early prototypes used breadboards, which are unreliable; use perfboard or PCB instead.

For (4), we later adopted USB to an external DAC for audio output.

System architecture

Overall, the SoundMat electronics split into five blocks:

  1. Power module — POWER
  2. Sensor acquisition — SENSOR
  3. LED module — LED
  4. Compute module — COMPUTE
  5. Audio output — AUDIO


Fig. Electronics system architecture


Fig. Electronics system architecture (design view)

The following walks through how this architecture was chosen.

Start with COMPUTE. Rich audio synthesis needs more than a bare MCU, so we use a Linux SBC (Raspberry Pi) for software ecosystem and USB audio. The Pi has no analog ADC for SENSOR pressure, so we add an external ADC path. We use the course ESP32 as ADC and to drive the LED strip. The Pi needs 5 V; the ESP32 can be powered from a Pi USB port.

For LED, we use WS2812B strip at 5 V with high current—it cannot be fed from Pi GPIO. Control lines are 5 V logic; COMPUTE outputs 3.3 V and needs a logic level shifter.

SENSOR receives MCU scan signals and returns sensor data.

POWER is critical. Power budget:

  1. LED: WS2812B, 60 LEDs/m, length π × 22.7" ≈ 71.3" ≈ 181.1 cm → ~108 LEDs. ~60 mA per LED at full white → ~6.5 A max, ~32.5 W. At ~30% brightness: ~2 A, ~10 W.
  2. COMPUTE: Raspberry Pi 3B, ~2.5 A typical (~12.5 W), including MCU draw.

Peak total ~45 W; at ~30% LED brightness ~22.5 W. 5 V alone is insufficient (~10 A). We use PD at 20 V (~2.5 A max input), buck down, then split feeds for LED and COMPUTE.

Next: detailed design per module.

Power module

Option comparison:

OptionLED adapter + Pi Micro-USB adapterSingle 5 V 10 A adapterUSB-C PD 20 V + buck
Power bank compatible❌❌✅
Cable count211
ComplexitySimple, plug-and-playSimple, manual splitPD trigger + buck
Line lossHigh at 5 V over long runsSame, noticeable dropLow current at 20 V, buck at load
Adapter sizeTwo bricksOne large brickCompact USB-C charger
Outdoor deployTwo outletsOne outletPower bank, no outlet
Chosen❌❌✅

Chosen scheme: peak ~45 W. USB-C enters a PD trigger board requesting 20 V, a DC buck converts to 5 V, then two branches: LED strip and Pi via Micro USB.

LED switching causes current spikes; all grounds use a star ground to limit bus bounce. A 1000 µF electrolytic at the LED branch input absorbs WS2812B spikes so the Pi does not brown out. The Pi board already has input filtering; no extra cap there.

Long strips may droop; dual-end power (feed head and tail) is an option.

Compute module

OptionSingle MCU (ESP32)SBC (Pi) + external ADC ICPi + ESP32
Audio synthesisVery weakStrongStrong
Software effortHardEasierEasier
ADCOn-chipExternal chipESP32 built-in
ComplexityLowMediumLow
ExpandabilityLowMediumHigh
Chosen❌❌✅

Options 2 and 3 are similar in capability; option 2 can offer better ADC precision and lower cost. We had ESP32 boards on hand, so we chose option 3.

Pi 3B takes 5 V via Micro USB. One USB-A port connects to the ESP32 (power + serial): sensor data in, LED control out. Another USB-A uses an A-to-C adapter to a USB DAC; 3.5 mm analog audio runs on a long aux extension to external speakers.

LED control could live on Pi or ESP32; we use ESP32 for all GPIO, including LEDs.

Sensor module

Array principles and layout are in SoundMat (5) Sensor Principles and Design. Here we focus on the sensor electronics.

The ESP32 connects to concentric rings via eight GPIOs. Slice signals (32 lines) pass through two cascaded MUXes as below. Two GPIOs drive MUX enables; only one enable may be active at a time. The mux output SIGNAL merges into one ESP32 ADC input.

Per ESP32 Docs – ADC – Minimizing Noise, a bypass capacitor on the ADC pin reduces noise.

16:1 analog MUX selection:

PartRon (on)Switch timeSupply rangePackagePriceNotes
CD74HC4067~70 Ω~30 ns2–6 VDIP-24 / SOIC~$1Maker staple, cheap breakouts
CD4067B~125 Ω~200 ns3–18 VDIP-24~$0.5Older CMOS; higher Ron, slower; wide voltage
ADG1606~4.5 Ω~120 ns±5 V / 12 V singleTSSOP-28~$5Low Ron; SMD, poor for hand solder
ADG706~2.5 Ω~30 ns±2.5 V / 5 V singleTSSOP-28~$7Very low Ron; expensive
MAX306~100 Ω~250 ns±15 VDIP-28~$8High-voltage industrial

CD74HC4067 is the best fit; the course supplied CD4067B, which we used directly.

RrefR_{ref} selection: TBD

LED module

WS2812B has three pins: +5 V, GND, and 5 V DIN. Dual-end power and decoupling were covered under power; not repeated here.

COMPUTE GPIO is 3.3 V; a logic level shifter raises DIN to 5 V.

PartVih threshold (VCC = 5 V)Accepts 3.3 V inDelayNotes
SN74AHCT125N2.0 V (TTL)✅~10–15 nsBest choice
74HC1253.5 V (70% VCC)❌Designed for 5 V inputs
74HCT1252.0 V (TTL)✅~3–5 nsAcceptable
Direct (no shifter)3.5 VSometimes works, riskyNot recommended

HC-family thresholds follow CMOS (~70% VCC); at 5 V, “high” needs ~3.5 V, so 3.3 V is unreliable. We chose SN74AHCT125N.

330 Ω series resistor on DIN:

The WS2812B data protocol is a single-wire high-speed pulse stream; each bit period is only 1.25 µs. That means rise and fall edges are very steep—edge times on the order of tens of nanoseconds.

When a sharp voltage edge propagates from the driver along the wire to the receiver (the DIN pin of the first LED), impedance mismatch between the driver output and the line’s characteristic impedance causes reflection at the receiver. The reflected wave travels back to the driver, reflects again, and rings—oscillating between high and low several times before settling. The LED’s digital input may read one pulse as two, or a 1 as a 0. This is most visible on the first LED; later pixels see data re-shaped by the previous LED’s output stage.

A 330 Ω series resistor provides damping. Together with line characteristic impedance and parasitic capacitance at the LED input, it acts as a low-pass filter that attenuates high-frequency ringing and dissipates reflected energy in the resistor. The tradeoff is a slightly slower rise edge; with ~330 Ω and tens of pF parasitic capacitance, the RC time constant is on the order of tens of nanoseconds—still well inside the WS2812B timing budget of hundreds of nanoseconds.

Why 330 Ω? Too small (e.g. 33 Ω) leaves ringing; too large (e.g. 3.3 kΩ) makes RC so slow that pulse width distorts and communication fails. 330 Ω is a community-validated practical value.

Placement: near the LED end, not the driver. Damping must happen where reflection occurs. At the driver, the wave may have already bounced once before hitting the resistor, greatly reducing effectiveness.

by Claude Opus 4.7

Audio output module

Audio is the final presentation layer; quality caps the experience of SoundMat as an installation.

OptionPi onboard 3.5 mmI2S DAC moduleUSB external DAC
QualityPoor (PWM analog, audible noise)Good (hardware DAC, low noise)Good (hardware DAC, low noise)
WiringNo extra hardwareGPIO wiring, pin useUSB plug-and-play
ConflictsNoneMay clash with ESP32 / other GPIOIndependent USB path
SoftwareDefaultI2S + device treeAuto-detected sound card
Swap hardware—Re-wire and reconfigureReplace USB DAC anytime
Chosen❌❌✅

Pi 3B “analog” audio is PWM-based, not a true DAC—poor SNR, unacceptable for quiet public spaces. I2S DAC is good but more wiring. USB DAC is the simplest reliable path.

Signal chain (current): Pi USB-A → A-to-C adapter → USB-C extension → USB DAC → 3.5 mm aux → aux cable → external speaker.

BOM

IDModuleComponentQtySpec / Model / Notes
P1POWERUSB-C PD Trigger Board1configured for PD-20V
P2POWERDC Buck Converter Module120V→5V, ≥5A
P3POWERMicro USB Breakout Board1Cut a Micro-USB cable Instead
C1COMPUTERaspberry Pi 3B1
C2COMPUTEESP32 Dev Board1
C2-2COMPUTEFemale Pin Headers22.54mm
C3COMPUTEUSB DAC1USB-C in, 3.5mm out
C4COMPUTEMicro USB Data Cable1
A1AUDIOUSB-A to USB-C Adapter1
A2AUDIO3.5mm Aux Cable1
S1SENSORMUX216:1, DIP-24
S1-2SENSORDIP IC sockets2DIP-24 IC Socket
S2SENSORResistor (Rref)11kΩ
S3SENSORInsulation Displacement Connector216P, 40cm, 2.54mm
S4SENSORCeramic capacitor10.1uF, ADC Input bypass
L1LEDWS2812B LED Strip160 LED/m, ≥2m
L2LEDSN74AHCT125N1DIP-14
L2-2LEDDIP-14 IC Socket1DIP-14 IC Socket
L3LEDElectrolytic Capacitor11000μF / ≥10V, LED DIN decoupling
L4LEDResistor (LED DIN)1330Ω
X1GeneralPerfBoardSuit2.54mm
X2GeneralWiresMisc
X3GeneralScrew terminal blockMany2.54mm, for sensor signal
X4GeneralUSB-C Extension Cable2for Power and Audio Output

(Written May 11, 2026)

Next: SoundMat (7) Firmware Design