Real-time audio spectrum analyzer, on an STM32F103C8T6. This project uses STM32 HAL.
- STM32F103C8T6, tested on common Bluepill boards.
- SSD1306 I2C OLED display
- MAX4466 Microphone module
- or any other audio sources that waves from 0V to 3.3V
| STM32F103 | Function | Connect to |
|---|---|---|
| PA1 | ADC1 Channel 1 | MAX4466 output |
| PB0 | GPIO Input (Pull-up) | Button (show performance) |
| PC13 | GPIO Output | Bluepill on-board LED (show performance) |
| PB6 | I2C1 SCL | SSD1306 SCL |
| PB7 | I2C1 SDA | SSD1306 SDA |
| 3.3V | VCC | SSD1306 VCC, MAX4466 VCC |
| GND | GND | SSD1306 GND, MAX4466 GND |
- ADC samples from PA1, at 9600Hz (triggered by TIM3)
- DMA is used
- via 256-dots fixed-point FFT
- uses fix_fft
- SSD1306 at about 25fps
- uses afiskon/stm32-ssd1306 driver
make
st-flash write build/AudioSpectrumTest.bin 0x08000000
You will need an ST-Link, J-Link or USB-TTL to flash this into STM32 MCU.