Skip to content

Commit ac1e940

Browse files
Project/beatrice.salavastru (#1259)
* Update Laser Harp project documentation * Fix laser harp image references * Fix laser harp image references again * Fix laser harp image references final * Rename laser harp images to lowercase
1 parent e00c530 commit ac1e940

7 files changed

Lines changed: 43 additions & 12 deletions

File tree

29.3 KB
Loading
14 KB
Loading
28.1 KB
Loading
82.2 KB
Loading
83.8 KB
Loading
35.9 KB
Loading

website/versioned_docs/version-acs_cc/project/2026/beatrice.salavastru/index.md

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ A laser-based musical instrument that converts interrupted light beams into soun
1212

1313
## Description
1414

15-
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.
15+
A laser harp system with 8 laser beams acting as strings. Each beam is aligned with a phototransistor. When the user interrupts one of the beams, the STM32 detects the event and plays the corresponding note through a speaker.
1616

1717
## Motivation
1818

1919
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.
2020

21+
## Demo
22+
23+
<iframe width="100%" height="450"
24+
src="https://www.youtube.com/embed/olEfG4KMzfE"
25+
title="Laser Harp Demo"
26+
frameborder="0"
27+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
28+
allowfullscreen></iframe>
29+
2130
## Architecture
2231

2332
![Architecture Diagram](images/laser_harp_architecture.svg)
@@ -32,14 +41,37 @@ Designed and built the wooden frame for the laser harp. Planned the layout of la
3241
### Week 12 - 18 April
3342
Ordered all hardware components from TME and Sigmanortec.
3443

44+
### Week 4 - 10 May
45+
Built and tested the electronic circuit using a simple test program. The goal of this stage was to verify that the laser modules, phototransistors, STM32 inputs and audio amplifier worked correctly before integrating the final software.
46+
47+
### Week 11 - 17 May
48+
Implemented the sample-based audio playback system. The project was changed from simple frequency generation to playback of RAW audio samples stored directly in the STM32 Flash memory. The system now works as a standalone instrument: the audio is played directly through the speaker, without depending on a USB connection to the laptop for sound generation.
3549

3650
## Hardware
3751

38-
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.
52+
The project is built around the **STM32 Nucleo-U545RE-Q**, which reads the sensors and controls the audio output.
53+
54+
The physical harp uses 8 laser modules, each aligned with a phototransistor. The phototransistors are connected to GPIO pins configured as external interrupt inputs. When a laser beam is interrupted, the corresponding input changes state and the STM32 detects the event as a string trigger.
55+
56+
For audio output, the STM32 generates a high-frequency PWM signal on `PB3 / TIM2_CH2`. This signal is passed through a simple analog filtering stage and then sent to an **LM386 audio amplifier**, which drives an 8Ω speaker.
57+
58+
The structure is mounted on a custom wooden frame that keeps the lasers and sensors aligned.
59+
60+
### Hardware Photos
61+
62+
![Laser Harp Front View](images/laser_harp_2.webp)
63+
64+
![Laser Harp Front View - Night](images/laser_harp_1.webp)
65+
66+
![Laser Alignment](images/laser_harp_5.webp)
67+
68+
![Internal Circuit](images/laser_harp_4.webp)
69+
70+
![Internal Circuit](images/laser_harp_3.webp)
3971

40-
<!-- ### Schematics
72+
### Schematics
4173

42-
Place your KiCAD or similar schematics here in SVG format. -->
74+
![Circuit Schematic](images/laser_harp.webp)
4375

4476

4577
### Bill of Materials
@@ -56,7 +88,6 @@ Place your KiCAD or similar schematics here in SVG format. -->
5688
| Capacitors 100nF | Noise filtering | 6.47 RON |
5789
| Capacitors 0.1µF | Decoupling | 8.16 RON |
5890
| Rocker switch | Power ON/OFF | 4.43 RON |
59-
| Toggle switch (SPDT) | Mode selection | 5.58 RON |
6091
| Power supply 5V 2A | Power source | 22.61 RON |
6192
| DC jack connector | Power connection | 3 RON |
6293

@@ -66,13 +97,13 @@ Place your KiCAD or similar schematics here in SVG format. -->
6697

6798
| Library | Description | Usage |
6899
|---------|-------------|-------|
69-
| [embassy-stm32](https://github.com/embassy-rs/embassy) | STM32 HAL for Embassy | Used for GPIO, ADC and timers/PWM |
70-
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async task executor | Runs the main application logic |
71-
| [embassy-time](https://github.com/embassy-rs/embassy) | Timekeeping and delays | Used for timing and sensor polling |
72-
| [embedded-hal](https://github.com/rust-embedded/embedded-hal) | Hardware abstraction layer | Standard interface for peripherals |
73-
| [defmt](https://github.com/knurling-rs/defmt) | Lightweight logging framework | Used for debugging and logging |
74-
| [defmt-rtt](https://github.com/knurling-rs/defmt) | RTT logging transport | Sends logs to the PC |
75-
| [panic-probe](https://github.com/knurling-rs/probe-run) | Panic handler | Used for debugging crashes |
100+
| [embassy-stm32](https://github.com/embassy-rs/embassy) | STM32 HAL for Embassy | Used for GPIO/EXTI input handling, PWM audio output, timer configuration and clock setup |
101+
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async task executor | Runs the main application and the separate laser string monitoring tasks |
102+
| [embassy-time](https://github.com/embassy-rs/embassy) | Timekeeping and delays | Used for sensor cooldowns and precise audio sample timing |
103+
| [embassy-sync](https://github.com/embassy-rs/embassy) | Synchronization primitives | Provides the channel used to send triggered note indices from sensor tasks to the audio loop |
104+
| [defmt](https://github.com/knurling-rs/defmt) | Lightweight logging framework | Used for debug and status messages |
105+
| [defmt-rtt](https://github.com/knurling-rs/defmt) | RTT logging transport | Sends debug logs from the board to the PC |
106+
| [panic-probe](https://github.com/knurling-rs/probe-run) | Panic handler | Reports crashes through the debug probe |
76107

77108
## Links
78109

0 commit comments

Comments
 (0)