Reactive LED Matrix

Reactive, expandable RGB LED panels for large scale interactive art

2023Embedded SystemsInteractiveGitHub

Overview

This is a modular interactive display made of an array of RGB LEDs that respond to hand proximity through infrared sensing. Each tile contains a 4x4 LED grid with infrared emitters, phototransistors, and a microcontroller. Bring your hand close and the panels react to your movement in real time.

Panels can be connected to one another to form a large display, and share power and state through UART-based smart interconnects. The original idea was to build a large-scale, elegant art installation that feels alive.

I built this as my final project for UMass Amherst CICS 256 (Make: Physical Computing). I plan to eventually create a second version of this project that improves upon some of its pitfalls and lowers the unit cost significantly.

Reactive LED Matrix In Action
Two Connected Panels

Hardware

Each panel is a 140mm × 140mm tile with 16 WS2812B RGB LEDs arranged in a 4×4 grid. Below each LED is an infrared emitter and phototransistor pair tuned to the same wavelength. The IR LEDs are fairly high-power to maximize sensitivity, sinking about 100 mA each when on, so they are switched in pairs through N-channel MOSFETs for short pulses. After each pulse, the corresponding phototransistors are sampled by two MCP3008 8-channel 10-bit ADCs.

Reactive LED Matrix Schematic

An ATmega32u4 runs the firmware and is programmed over the rear USB port. It was a good fit here because it has native USB device support and is relatively cheap. At the edge of each panel, a 4-pin connector carries power and UART so neighboring tiles can share state.

Panels mount with M3 screws and standoffs along the edges. Power can come from the USB port or from terminal blocks on the back of the board.

The BOM, DigiKey parts list, schematic, and Gerber files are in the GitHub repository.

IR Sensing

For each IR channel the microcontroller does the following:

  1. Samples ambient light on the phototransistor via the ADC
  2. Briefly turns on the corresponding IR LED through the MOSFET
  3. Samples again and subtracts background
  4. Runs the result through an exponential filter to kill noise

That differential measurement keeps the panel usable under room lighting. A noise threshold ignores small fluctuations so idle panels stay dark until a hand actually enters range. Sensor values feed a 4x4 energy grid that drives the LED animations.

Effects

One of the most difficult parts of this project was creating the interactive effects and making them satisfying to use. I came up with the following interactive modes.

  • Heat map: proximity injects energy into the grid; a convolution spreads it to neighbors with decay, mapped blue-to-red
  • Distance color / brightness: hand distance drives hue, brightness, or both
  • Paint / negative paint: leaves lingering trails of color as you move your hand across the panel

I prefer the heat map effect. Hand proximity adds energy into cells, a 3×3 neighbor blur spreads it, and a decay term fades old energy so the panel feels fluid and satisfying.