LED Heart

This electrocardiography LED matrix was designed as a birthday present for my sister. It consists of two circuit boards: a 16×16 LED matrix using SPI-addressable RGB LEDs (APA102), and a controller board built around a SAML21 microcontroller.

An LED shines light into the blood vessels in a fingertip and a phototransistor measures the returned light. The signal is amplified and sampled by the microcontroller ADC. Because the signal contains a large DC component and slow variations from finger pressure and ambient light, a windowing function is used to continuously scale the display to the minimum and maximum of the last few hundred samples. This keeps the pulse waveform visible instead of being lost in the low-frequency drift.
Two display modes are implemented: a scrolling time-plot graph and a heart icon that varies in brightness with the pulse.
The electronics are mounted in a custom pine enclosure resembling a photo frame, with switches and potentiometers for mode selection and brightness. It can sit on a desk or be hung on a wall.