Skip to main content
Version: ACS CC

Music-Responsive Smart Lighting System

info

Author: Daria-Maria Ion
GitHub Project Link: link_to_github

Description

This project is an interactive lighting system built around a disco globe, designed to synchronize both light and motion with music. It utilizes a KY-037 sound sensor to capture audio intensity, two MG996R servo motors for movement effects, and RGB LEDs for vibrant lighting. All components are controlled by a Raspberry Pi Pico W running Rust code.

Motivation

I chose this project to bring together my interests in music, visual design, and embedded systems. It’s a hands-on way to explore real-time signal processing, PWM-based control, and servo motor coordination, while creating a visually engaging and technically rewarding result.

Architecture

block

The project is structured around the following architecture components:

  • Audio Input Module (Sound Sensor KY-037): Captures environmental audio levels and sends the analog output to the Raspberry Pi Pico W.
  • Microcontroller (Raspberry Pi Pico W): Acts as the central processing unit. It reads the analog signal from the sensor, analyzes the sound intensity, and sends appropriate PWM signals to the servo motors and LED strip.
  • Motion Module (2x MG996R Servos): Receives PWM signals from the Pico to control rotation or vibration based on audio dynamics.
  • Lighting Module (RGB LEDs): A WS2812 that displays effects driven by the audio signal.
  • Power Distribution: A shared 5V power source, with decoupling components like a 470Ω resistor and a 1000µF capacitor for LED stability.

Connections:

  • KY-037 → Analog pin on Pico
  • Servos → GPIO2 and GPIO3
  • LED Strip → GPIO4 via a 470Ω resistor + capacitor for power smoothing
  • All components share a common ground and 5V line from the Pico's VBUS pin

Log

Week 5 - 11 May

Connecting the hardware components

Week 12 - 18 May

Week 19 - 25 May

Hardware

The project uses the following hardware:

  • Raspberry Pi Pico W as the main controller
  • KY-037 sound sensor for audio detection
  • Two MG996R servo motors for motion effects
  • RGB LED connector for visual lighting
  • Power smoothing components: 470Ω resistor and 1000µF capacitor

Schematics

kicad

Bill of Materials

DeviceUsagePrice
Raspberry Pi Pico WMain microcontroller~39 RON
KY-037 Sound SensorDetects sound intensity~5 RON
MG996R Servo MotorRotation / motion effect~30 RON x2
WS2812B RGB LED StripVisual LED effects~2.5 RON/LED
Rezistor 330ΩData line protection for LED~2.62 RON
Condensator 1000μF / 6.3VVoltage stabilization for LED~3.5 RON
Fire jumper (M-M)Wiring connections~7 RON
BreadboardRapid prototyping~10 RON

Software

LibraryDescriptionUsage
rp-halHardware Abstraction Layer for PicoBase control of GPIOs, ADC, and PWM
embedded-halHardware abstraction traitsInterfaces with servos and LEDs
ws2812-pioLED driver using PIOControl WS2812 LEDs
rustfftFast Fourier Transform in RustFor future implementation of beat detection
defmt + probe-rsDebugging toolsDebugging embedded Rust code easily
  1. link
  2. Lab 03 - PWM & ADC
  3. Lab 02 - GPIO
  4. 04 - Asynchronous Development

...