NeoPixel LED Mirror

By Rob Zwetsloot. Posted

Magic mirrors seem to now be a rite of passage for many makers and Raspberry Pi aficionados. It’s a fun project, but we think this LED mirror from Alex Schepelmann is a little more striking.

“The project uses a Raspberry Pi 3B+, a Raspberry Pi Camera [Module], Python, 3D printing, and 576 NeoPixel LEDs to create an interactive art piece that shows you your reflection in ‘low resolution’ by lighting up a grid of LEDs,” says Alex.

In essence, it’s taking your picture using a Raspberry Pi Camera Module, converting it to a low‑resolution picture, and then setting the LEDs to the same colour as the individual pixels in the resulting image. Magic? Yes. Practical? No. Fun? Absolutely.

A Raspberry Pi handles it all, although another computer is on hand for project info

Make art with LED and Raspberry Pi

Where did such an idea come from, though? “I was inspired by the various ‘analogue mirrors’ made by Daniel Rozin,” Alex reveals.

“The Children’s Museum of Pittsburgh, where I built an exhibit for a Systems Engineer class that I took during graduate school, had one of Mr Rozin’s mirrors on display. The mirror at the Children’s Museum used blocks of wood and servo motors to display images of people who were standing in front of it in low resolution. Ever since then, I’ve been following Daniel’s work, and wanted to build one of his mirrors myself. I thought that such a project would be perfect for my YouTube channel, because it would allow me to put my own twist on the concept while simultaneously teaching people about programming, 3D printing, laser cutting, and more!”

The build itself has an impressive list of components. Alex created a custom prototype PCB, 3D-printed and laser-cut several parts, and connected 24 strips of 24 LEDs to make the magic 576 number. A Raspberry Pi was used to power it due to its size, ability to run Python and address all the LEDs, along with the Raspberry Pi Camera Module which makes it all possible.

Alex eventually got a laser cutter to help speed up production – like for these mounting grids

On display

With such an unconventional project, you might expect some issues when it was finally unveiled. However, it went down very well.

“The project made its debut at the 2019 Cleveland Maker Faire, where it ran for over eight hours during the event without a single hiccup,” says Alex. “An advantage of being able to run everything via Python code is that I could adjust camera settings on the fly based on lighting conditions in the location where I was at, making sure that the mirror clearly displayed the reflections of visitors throughout the day.

Maker Faire attendees interacted with the mirror and stopped by the Super Make Something booth to learn more about the YouTube channel, Raspberry Pi, and Python programming. “One of my favourite observations I made during this event is that the mirror captured the interest of an audience with a broad age range – people between the ages of 5 and 65 were fascinated by the mirror and enjoyed moving their limbs and making faces in front of it, excited to see what would happen.”

If you’ve not managed to see the mirror in person, all is not lost. Alex has been in discussions to add the mirror to the Great Lakes Science Center, very hopefully with upgrades. Look out for more info on his YouTube channel.

Diffuser plates are required on all the LEDs – a job for a glue gun

How to make an mirror from LEDs

1. Camera settings are locked as the code starts, before capturing the image and selecting a small region of 24×24 pixels.

2. This image is then converted to greyscale, after which the code extracts one of the image’s colour planes from the image as an array. This array contains the brightness information for each pixel of the extracted 24×24 region. This square array is then reshaped into a 1×576 vector, and brightness values are assigned to LEDs.

3. Brightness values are used to light up each pixel, after which the image is cleared and the image capture/display process are repeated. In order to be able to display images as quickly as possible, the Python code is optimised to operate on vectors and to minimise the number of for loops.

From The MagPi store


Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.