Skip to main content
Version: ACS CC

Laser Harp

A laser-based musical instrument that converts interrupted light beams into sound in real time.

info

Author: Beatrice-Elena Sălăvăstru
GitHub Project Link: link_to_github

Description

A laser harp system with 8 laser beams acting as strings. When a beam is interrupted, a sensor detects the change and the microcontroller generates the corresponding musical note. The sound can be played through a speaker or sent to a computer for external audio playback.

Motivation

As someone interested in both music and technology, I want to build an interactive system that translates physical gestures into sound. This project allows me to explore working with optical sensors, handling real-time input from multiple sources, and generating audio signals on a microcontroller. It also gives me the opportunity to integrate hardware and software into a complete system, while creating a visually engaging and intuitive user experience.

Architecture

Architecture Diagram

Log

Week 5 - 11 April

Designed and built the wooden frame for the laser harp. Planned the layout of laser beams and sensors to ensure proper alignment and stability.

Week 12 - 18 April

Ordered all hardware components from TME and Sigmanortec.

Hardware

The project uses an STM32 Nucleo-U545RE-Q as the main microcontroller. Laser modules act as light sources, while phototransistors detect beam interruptions. The signals are processed using ADC inputs. An LM386-based audio module drives a speaker for sound output. A toggle switch selects between local audio and external output, while a rocker switch controls power. The system is powered by a 5V supply and mounted on a custom wooden frame.

Bill of Materials

DeviceUsagePrice
Nucleo U545REMicrocontroller~120 RON
Laser modules x10Light beams (strings)20 RON total
TEPT4400 x11Light detection16.76 RON total
LM386 moduleAudio amplification4.14 RON
Speaker (8Ω)Sound output23.02 RON
Resistors 10kΩSignal conditioning10.38 RON
Capacitors 100µFPower filtering4.07 RON
Capacitors 100nFNoise filtering6.47 RON
Capacitors 0.1µFDecoupling8.16 RON
Rocker switchPower ON/OFF4.43 RON
Toggle switch (SPDT)Mode selection5.58 RON
Power supply 5V 2APower source22.61 RON
DC jack connectorPower connection3 RON

Software

LibraryDescriptionUsage
embassy-stm32STM32 HAL for EmbassyUsed for GPIO, ADC and timers/PWM
embassy-executorAsync task executorRuns the main application logic
embassy-timeTimekeeping and delaysUsed for timing and sensor polling
embedded-halHardware abstraction layerStandard interface for peripherals
defmtLightweight logging frameworkUsed for debugging and logging
defmt-rttRTT logging transportSends logs to the PC
panic-probePanic handlerUsed for debugging crashes
  1. Arduino-Laser-Harp