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
Digital Signal Processing on a INMP microphone, having multiple voice effects chosen by the user.
2
+
A visualiser of your voice and a game where you can also use your voice as a controller
3
3
4
4
:::info
5
5
@@ -12,68 +12,76 @@ Digital Signal Processing on a INMP microphone, having multiple voice effects ch
12
12
13
13
## Description
14
14
15
-
My project's purpose is to have multiple integrated DSP algorithms (aiming to implement 4) that transform the captured audio into audio with multiple effects, kind of like a Voice Changer. I aim to have an 8-bit Retro audio effect, a high pitch effect, a low pitch effect and a sci-fi sounding effect (kind of like Dalke).
15
+
My project's purpose is to use my voice to control different stuff. My first Idea was a waveform analyzer, but then as I procrastinated (like everyone, on short-form content) I came across another one of those type of filter-game videos( the one with flappy birds controlled by your voice), so.... another state to my loop was added: FlappyApp!
16
16
17
17
## Motivation
18
18
19
-
Choosing this project was because of a mix of my interest in mathematicsand wanting to learn DMA (used for audio input/output leaving the processor more power to do the DSP required for the sound effects)more in-depth.
19
+
Choosing this project was because of a mix of my interest in mathematics, signals and wanting to learn DMA (used for audio input/output and SPI, leaving the processor more power to render the states of the display) more in-depth.
20
20
21
21
## Architecture
22
22
23
23
-**INMP441 Module:** It sends clean digital audio arryas straight to the STM32 via I2S
24
-
-**STM32:** Calculates FFT to draw on the screen and the algorithms for the audio effects.
25
-
-**UDA1334A:** Takes the I2S output from the STM32 and outputs it into a 3.5mm Jack where you connect speakers or headphones.
24
+
-**STM32U545REQ:** Provides the User Button, computing power, and a (quite helpful for my waveform analyzer) FPU for my project.
26
25
-**SPI TFT LCD Display:** Chose an SPI screen over a I2C screen because it handles video better than I2C. I2C is too slow for smooth video.
27
26
28
27
29
-

28
+

30
29
31
30
## Log
32
31
33
32
<!-- write your progress here every week -->
34
33
35
-
### Week 5 - 11 May
34
+
### The 3 Week Sprint (*week 12,13,14*)
36
35
37
-
### Week 12 - 18 May
36
+
**Disclaimer: This project was partailly changed as you probably saw (previously, a DSP and sound visualiser) because of my AMAZING soldering skills and AMAZING electronics knowledge (I burnt my first DAC and couldn't get the 2nd one to work properly...) I suspected many things, including low impedance headphones, but none of my fixes quite worked and reached a good conclusion. So I did what an engineer would and found another way to use the components I already had in Week 2**
37
+
#### Week I
38
+
This week was a week of just learning stuff, understanding and, well headaches with the clock tree diagram from the official stm datasheet... I needed to understand the MSIS and Master Clock and PLL math so I can run my board at 160Mhz for the purpose of running the Screen at a smoother 20Mhz.
39
+
I configured the PLL by the end of the week, set up the Mic and read a lot about buffers (ring buffers, DMA)
40
+
#### Week II
41
+
Week 2 I thought about my project (this was the week where I realised I couldn't possibly get my DAC work and I tried a lot of DMA fixes and everything I could find online...)
42
+
After pivoting to this Visualiser and Game Idea I mapped out a state machine and how the display would work and the game logic for optimizing SPI so It doesn't run at 2 frames per second. I thought about how the pipes of the game would appear/dissapear so I don't update the display at every game event(moving forward, pipes appearing on-screen, dying, etc)
43
+
#### Week III
44
+
Final week(this was a packed week):
45
+
Added DC Cut Off filter. Layered out my files and directories to be easy to access and read. Soldered everything together on a perfboard again and actually got better audio. Added game logic and Visualiser logic (optimized for the SPI display). Final polishes and good luck to me!
38
46
39
-
### Week 19 - 25 May
40
47
41
48
## Hardware
42
49
43
-
Microcontroller: STM32U545RE Nucleo (Core logic)
50
+
Microcontroller: STM32U545RE Nucleo (Core logic + User Button)
I used a star point for 3V3 and GND. I tried keeping wires as short as possible (4-10cm) because of the SPI and I2S connection as these can be really skewed from the electromagnetic fields generated by the current (wires act as antennas).
67
+
I could have also soldered a capacitor between 3V3 and GND but didn't have any at my disposal and the electrical noise was quite manageable, so I was satisfied.
| [Device](link://to/device) | This is used ... | [price](link://to/store) |
75
+
### Schematics
68
76
69
-
```
77
+

78
+
79
+
### Bill of Materials
70
80
71
-
-->
72
81
| Device | Usage | Price |
73
82
|--------|--------|-------|
74
83
|[STM32 Nucleo-U545RE](__https://www.st.com/en/evaluation-tools/nucleo-u545re.html__)| The microcontroller |[Borrowed]()|
75
84
|[INMP441 I2S Microphone](__https://invensense.tdk.com/products/inmp441/__)| Captures ambient audio digitally via I2S, bypassing analog ADC noise. |[21 RON](__https://www.bitmi.ro/module-electronice/modul-microfon-omnidirectional-interfata-i2s-mems-inmp441-11003.html__)|
76
-
|[UDA1334A I2S DAC Module](__https://learn.adafruit.com/adafruit-i2s-stereo-decoder-uda1334a__)| Decodes processed digital audio to an analog signal via a 3.5mm jack. |[37 RON](__https://www.emag.ro/decodor-dac-stereo-uda1334a-convertor-digital-analogic-i2s-3-3-v-5-v-s-038/pd/D9WPHR3BM__)|
77
85
|[ILI9341 3.2" TFT LCD Touchscreen](__https://www.adafruit.com/product/1743__)| Displays UI, audio visualizations, and status information; touch input via SPI. |[84 RON](__https://www.emag.ro/display-tft-lcd-3-2-inch-320x240-touchscreen-14pini-spi-ili9341-arduino-rx407/pd/D7Q411YBM/__)|
78
86
|[Starting Electronics Kit](__https://www.emag.ro/kit-start-componente-electronice-ai777/pd/DXRJ4TMBM/__)| Contains Miscellaneous components like resistors,breadboard,etc |[51 RON](__https://www.emag.ro/kit-start-componente-electronice-ai777/pd/DXRJ4TMBM/__)|
79
87
@@ -82,23 +90,30 @@ The format is
82
90
83
91
| Library | Description | Usage |
84
92
|---------|-------------|-------|
85
-
|[embassy-stm32](https://crates.io/crates/embassy-stm32)| Hardware Abstraction Layer for STM32 | Used for accessing I2S, SPI, DMA, and GPIO peripherals asynchronously. |
86
-
|[embassy-executor](https://crates.io/crates/embassy-executor)| Async runtime for embedded systems | Used for managing and scheduling concurrent tasks (audio pipeline, UI, buttons). |
87
-
|[embassy-sync](https://crates.io/crates/embassy-sync)| Synchronization primitives for async | Used for safely passing audio data buffers between async tasks via channels. |
88
-
|[embedded-graphics](https://crates.io/crates/embedded-graphics)|`no_std` 2D graphics library | Used for drawing the real-time audio waveforms and frequency bars on the display. |
89
-
|[mipidsi](https://crates.io/crates/mipidsi)| Display driver for MIPI DSI displays | Used as the hardware driver for the ILI9341 or ST7789 SPI TFT LCD. |
90
-
|[microfft](https://crates.io/crates/microfft)| Fast Fourier Transform library for `no_std`| Used for calculating the frequency spectrum for the audio visualizer. |
91
-
92
-
93
+
|[embassy-stm32](https://crates.io/crates/embassy-stm32)| Hardware Abstraction Layer (HAL) for STM32 microcontrollers | Async Embassy framework for STM32 peripherals |
94
+
|[embassy-executor](https://crates.io/crates/embassy-executor)| Lightweight `no_std` async executor | Task scheduling and execution on embedded systems |
95
+
|[embassy-sync](https://crates.io/crates/embassy-sync)| Synchronization primitives for Embassy | Signals, channels, and mutexes between async tasks |
96
+
|[embassy-time](https://crates.io/crates/embassy-time)| Timekeeping and timer utilities | Delays, timeouts, and periodic timers |
97
+
|[embassy-futures](https://crates.io/crates/embassy-futures)| Future extensions and utilities | Combining and managing async futures |
98
+
|[embassy-embedded-hal](https://crates.io/crates/embassy-embedded-hal)| Bridge between Embassy and `embedded-hal` traits | Compatibility with standard embedded-hal drivers |
99
+
|[embedded-graphics](https://crates.io/crates/embedded-graphics)| 2D graphics library for embedded systems | Drawing primitives, text, and shapes on displays |
100
+
|[mipidsi](https://crates.io/crates/mipidsi)| Display driver framework for MIPI DSI/SPI displays | Driving the ILI9341 screen |
101
+
|[heapless](https://crates.io/crates/heapless)| Stack-allocated data structures | Strings and Vecs without dynamic memory allocation |
102
+
|[defmt](https://crates.io/crates/defmt) & [defmt-rtt](https://crates.io/crates/defmt-rtt)| Efficient deferred formatting framework | Logging over RTT during development |
103
+
|[cortex-m](https://crates.io/crates/cortex-m) & [cortex-m-rt](https://crates.io/crates/cortex-m-rt)| Low-level Cortex-M hardware access and startup runtime | Core ARM peripheral access and boot initialization |
104
+
|[panic-probe](https://crates.io/crates/panic-probe)| Panic handler for `defmt` and `probe-run`| Printing panic messages and exiting cleanly |
105
+
|[static_cell](https://crates.io/crates/static_cell)| Safe lock-free static variable initialization | Initializing DMA buffers and drivers as statics |
106
+
|[embedded-hal-bus](https://crates.io/crates/embedded-hal-bus)| Utilities for sharing SPI/I2C buses | Safely sharing buses among multiple devices |
107
+
|[cortex-m-semihosting](https://crates.io/crates/cortex-m-semihosting)| Semihosting support for Cortex-M | Debug I/O via the debug probe connection |
93
108
94
109
<!-- Add a few links that inspired you and that you think you will use for your project -->
95
110
## Links
96
-
97
-
1.[Embassy-rs Official Book](https://embassy.dev/book/)
0 commit comments