This program is used for tuning instruments like Guitar. LED Display shows frequency of sound and name of tone with direction for tune ('-' up, '+' down).
Power on GuitarTuner and play a sound. Display shows the tone name and direction for tune. If you see '+' you sound is too high. If you see '-' your sound is too low. You can also see the frequency of sound. To do it change display mode. To change display mode use USER-Button. For tune scale and other information see the table below.
Tuner Specification | |
---|---|
Accuracy | ±1Hz |
Sampling frequency | 2.4kHz |
FFT size | 1024 complex samples |
FFT base type | float32 |
A frequency (change only in code) |
432Hz (G3-D6 only) 440Hz (default) |
Maximum read tone frequency |
1200Hz |
Tune scale | C-D3 (German) C2-D6 (American) |
Tone names | German |
Display mode | Tone name Frequency |
STM32F4 DISCOVERY | TM1637 LED Display | Analog Microphone | RGB LED |
---|
USART Module - For Debug Only |
---|
You need also additional wires to connect the devices.
CMSIS DSP Library | Library for TM1637 |
---|
Libraries are included in this project.
Hercules by HW-group.com - For USART Debug Only |
---|
Connect pins as follows:
STM32F4 DISCOVERY | TM1637 LED Display |
---|---|
3V | VCC |
GND | GND |
PC0 | CLK |
PC1 | DIO |
STM32F4 DISCOVERY | Analog Microphone |
3V | VCC |
GND | GND |
PA1 | AOUT |
STM32F4 DISCOVERY | RGB LED |
GND | GND |
PB7 | R |
PB8 | G |
PB5 | B |
STM32F4 DISCOVERY | USART Module |
GND | GND |
TXD | PC11 |
RXD | PC10 |
Use Eclipse for C/C++ Developers updated to STM32 Workbench.
1️⃣ Create project using .cproject or .project (Eclipse 4.7.3a - use Open Project from File System).
2️⃣ Connect STM32F4 DISCOVERY to your PC using USB wire.
3️⃣ Simply compile the project using IDE (this project was compiled by GCC).
4️⃣ Upload compiled software to your μC.
5️⃣ Tune your musical instrument.
❌ Use of float
causes Hard Fault
. Due to this double
is used.
❌ Use of arm_cmplx_mag_f32
causes Hard Fault
. Due to this arm_cmplx_mag_squared_f32
is used.
❌ Use of first argument of type double
in TC_append
causes Hard Fault
. Due to this int
is used.
❌ Use of first argument of type double
in TC_find
causes Hard Fault
. Due to this int
is used.
❌ Microphone malfunction: temporary loss of signal. MICROPHONE ERROR CHECK
section (in FFT.c)
used to detect microphone error. Skip this code in your project.
CMSIS DSP Library | Library for TM1637 |
---|
GuitarTuner is licensed under GNU GPL v3.0. Refer to license.md for more.
CMSIS DSP Library is licensed under license.
Library for TM1637 is licensed under MIT License.
Stanisław Wasik | Stanisław Gilewicz |
---|
The project was conducted during the Microprocessor Lab course held by the Institute of Control and Information Engineering, Poznan University of Technology. |
---|
Supervisor: Marek Kraft/Michał Fularz/Tomasz Mańkowski/Adam Bondyra |