Magic Mirror

by alemanja in Circuits > Assistive Tech

10 Views, 1 Favorites, 0 Comments

Magic Mirror

IMG_9242_2.jpg

This project is designed for the Campus School at Boston College, which supports children with disabilities, particularly those with Cortical Visual Impairment (CVI). The goal of the project is to celebrate student identity and bring joy through a multisensory experience. When a student presses a button, their name scrolls on an LED matrix, they hear a personalized greeting, a randomized affirmation, and a short favorite song through a connected speaker.



Supplies

  1. Raspberry Pi Pico (for audio, button input, SD card access)
  2. Adafruit MatrixPortal M4 (for driving the 16x32 LED Matrix)
  3. 16x32 RGB LED Matrix Panel
  4. MicroSD card module (connected via SPI to Pico)
  5. 5 push buttons (assigned to different students)
  6. Breadboard and jumper wires
  7. 3W speaker connected to GP15 (via breadboard AUX port)


Build

IMG 8903
IMG_8911.jpg
IMG_8912.jpg
IMG_9242_2.jpg

The housing was custom-built using:

  1. 1/8" birch plywood: Laser-cut for the frame and back panel using Boston College's makerspace laser cutter
  2. Acrylic mirror sheet: Mounted on the front for the reflective surface, allowing the display to shine through while offering a "magic mirror" illusion


Wiring Overview

SD to Pico:

GP18 → CLK

GP19 → MOSI (SI)

GP16 → MISO (SO)

GP17 → CS

3V → 3.3V

GND → GND


Speaker to Pico:

GP15 → TIP of AUX cable (audio output)

GND → SLEEVE of AUX cable


Buttons to Pico:

GP10 → Button for Student #1

GP11 → Button for Student #2

GP12 → Button for Student #3...

(each button: one leg to GPIO, one leg to GND)

Internal pull-ups enabled in code


LED Matrix via MatrixPortal M4

  1. Connects directly to the LED panel via HUB75
  2. Powered via USB-C
  3. Runs a script that continuously scrolls student names in their favorite colors (e.g., red for Yael, orange for Victor)


Software Setup

  1. CircuitPython is installed on both the Pico and the MatrixPortal M4
  2. Key CircuitPython libraries include:
  3. audiocore, audiopwmio — for audio playback
  4. digitalio — for buttons
  5. os, random — for accessing and randomizing affirmation files
  6. storage, busio, adafruit_sdcard — for SD card management
  7. File Structure on the SD Card:
  8. /sd/sounds/ contains all .wav files
  9. Greeting files: logangreet.wav, victorgreeting.wav, etc.
  10. Affirmation files (used randomly): amazing.wav, excel.wav, ibelieveinu.wav, etc.
  11. Song files: ayasong.wav, logansong.wav, etc.


Logic

Code Logic – Raspberry Pi Pico:

The Pico is the heart of the interaction. It monitors button presses using digital inputs with internal pull-ups. When a button is pressed:

  1. The student's personalized greeting is played from the SD card.
  2. A random affirmation (from a pool of non-name-tagged .wav files) is selected and played.
  3. The student’s favorite song is played to finish the interaction.

This sequence is handled with simple but effective CircuitPython logic, ensuring quick response and smooth transitions between sounds.


Code Logic – MatrixPortal M4

Initially, UART was explored to allow the Pico to send student names dynamically. However, due to time and hardware constraints, the final version runs independently. The MatrixPortal simply:

  1. Scrolls student names in a loop
  2. Each name is styled in a color that reflects the student's preference (e.g., orange for Victor, red for Yael)
  3. The scrolling runs continuously as a form of passive affirmation and visibility


Final Result

The end product is a joyful and empowering mirror that reflects more than just appearances. When a student presses their button:

  1. Their name scrolls brightly on the matrix in their favorite color
  2. Their voice greeting welcomes them
  3. A random affirmation encourages them
  4. Their favorite song closes out the moment, filling the room with recognition and music

This project brought visible excitement and smiles during testing and was well-received by educators and therapists at the Campus School.