You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: website/versioned_docs/version-acs_cc/project/2026/beatrice.salavastru/index.md
+43-12Lines changed: 43 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,21 @@ A laser-based musical instrument that converts interrupted light beams into soun
12
12
13
13
## Description
14
14
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.
16
16
17
17
## Motivation
18
18
19
19
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.
@@ -32,14 +41,37 @@ Designed and built the wooden frame for the laser harp. Planned the layout of la
32
41
### Week 12 - 18 April
33
42
Ordered all hardware components from TME and Sigmanortec.
34
43
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.
35
49
36
50
## Hardware
37
51
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
+

63
+
64
+

65
+
66
+

67
+
68
+

69
+
70
+

39
71
40
-
<!--### Schematics
72
+
### Schematics
41
73
42
-
Place your KiCAD or similar schematics here in SVG format. -->
74
+

43
75
44
76
45
77
### Bill of Materials
@@ -56,7 +88,6 @@ Place your KiCAD or similar schematics here in SVG format. -->
@@ -66,13 +97,13 @@ Place your KiCAD or similar schematics here in SVG format. -->
66
97
67
98
| Library | Description | Usage |
68
99
|---------|-------------|-------|
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|
0 commit comments