This shows you the differences between two versions of the page.
|
pm:prj2026:jan.vaduva:daniel.cirstian [2026/05/09 20:19] daniel.cirstian [Electric Design Scheme] |
pm:prj2026:jan.vaduva:daniel.cirstian [2026/05/21 18:19] (current) daniel.cirstian [Software Design] |
||
|---|---|---|---|
| Line 15: | Line 15: | ||
| The core component is the Atmega328P Mini which handles the main logic and processes the code to be compiled. | The core component is the Atmega328P Mini which handles the main logic and processes the code to be compiled. | ||
| - | The vibrations from the string are captured using a preamplified microphone. This analog electrical signal is then forwarded to an ADC (Analog-to-Digital Converter), which transforms the continuous signal into a digital format. Through the application of the Fast Fourier Transform algorithm, the digitized signal undergoes frequency decomposition to identify its harmonic components. The tuner identifies the dominant frequency (the one with the highest amplitude) and matches it against a set of reference frequencies corresponding to standard musical notes. The system then selects the closest ideal note frequency for comparison. Real-time feedback is displayed on the 16×2 LCD screen, indicating whether the string's frequency falls below or above the target reference frequency. | + | The vibrations from the string are captured using a preamplified microphone. This analog electrical signal is then forwarded to an ADC (Analog-to-Digital Converter), which transforms the continuous signal into a digital format. Through the application of the Fast Fourier Transform algorithm, the digitized signal undergoes frequency decomposition to identify its harmonic components. |
| + | |||
| + | The tuner identifies the dominant frequency (the one with the highest amplitude) and matches it against a set of reference frequencies corresponding to standard musical notes. The system then selects the closest ideal note frequency for comparison. Real-time feedback is displayed on the 16×2 LCD screen, indicating whether the string's frequency falls below or above the target reference frequency. | ||
| Line 50: | Line 52: | ||
| ATMEGA328P-MUR** - 8-bit microcontroller with 32KB Flash memory, 2KB SRAM, and built-in ADC for signal processing | ATMEGA328P-MUR** - 8-bit microcontroller with 32KB Flash memory, 2KB SRAM, and built-in ADC for signal processing | ||
| - | **Input/Output Modules** | + | **Input/Output Modules |
| - | MAX4466 Microphone Amplifier - Electret microphone preamplifier with adjustable gain for audio signal capture | + | MAX4466 Microphone Amplifier** - Electret microphone preamplifier with adjustable gain for audio signal capture |
| **LCD1602 Display Module** (16×2 characters, blue backlight) - I2C interface for real-time frequency feedback display | **LCD1602 Display Module** (16×2 characters, blue backlight) - I2C interface for real-time frequency feedback display | ||
| Line 60: | Line 62: | ||
| 3× LEDs (Red, Yellow, Green)** - Visual indicators for tuning status with 220Ω current-limiting resistors | 3× LEDs (Red, Yellow, Green)** - Visual indicators for tuning status with 220Ω current-limiting resistors | ||
| - | Additional Components | + | |
| + | |||
| + | **Auxiliary Components** | ||
| **Resistors** - 220Ω for LED current limiting | **Resistors** - 220Ω for LED current limiting | ||
| + | |||
| **Power Supply and Cables** - VCC and GND connections for all modules | **Power Supply and Cables** - VCC and GND connections for all modules | ||
| Line 69: | Line 74: | ||
| - | ^ Component ^ Pin/Function ^ Connected to MCU ^ | + | ^ ATmega328P Pin ^ Pin Name ^ Function ^ Connected Component ^ Description ^ |
| - | | Microphone (MAX4466) | OUT | ADC6 (PCINT14) | | + | | 7 | VCC | Power | VCC | +5V power supply | |
| - | | LED Red | Anode (+) | PB6 (PCINT6/XTAL1/TOSC1) | | + | | 8 | GND | Ground | GND | Ground reference | |
| - | | LED Yellow | Anode (+) | PB7 (PCINT7/XTAL2/TOSC2) | | + | | 9 | PD6/XTAL1/TOSC1 | Digital Output | LED YELLOW | Yellow LED control (via 220Ω resistor) | |
| - | | LED Green | Anode (+) | PD5 (PCINT21/OC0B/T1) | | + | | 10 | PD7/XTAL2/TOSC2 | Digital Output | LED GREEN | Green LED control (via 220Ω resistor) | |
| - | | LCD Display | SDA | PC4/ADC4/SDA (PCINT12) | | + | | 11 | PD5/OC0B/T1 | Digital Output | LED RED | Red LED control (via 220Ω resistor) | |
| - | | LCD Display | SCL | PC5/ADC5/SCL (PCINT13) | | + | | 12 | PD6/AIN0/OC0A | Digital Output | BUZZER IN | Buzzer module control signal | |
| - | | Buzzer Module | IN | PD6/AIN0 (PCINT22) | | + | | 27 | PC4/ADC4/SDA | I2C Data | LCD SDA | I2C data line for LCD1602 display | |
| - | ===== Software Design ===== | + | | 28 | PC5/ADC5/SCL | I2C Clock | LCD SCL | I2C clock line for LCD1602 display | |
| + | | 32 | ADC6/PCINT14 | ADC Input | MICROPHONE OUT | Analog signal from MAX4466 amplifier | | ||
| + | |||
| + | ==== Hardware Implementation ==== | ||
| + | |||
| + | {{:pm:prj2026:jan.vaduva:implementarehardware.jpeg?400|}} | ||
| + | |||
| + | |||
| + | **Proof of working components:** | ||
| + | |||
| + | {{:pm:prj2026:jan.vaduva:workinghardware.jpeg?400|}} | ||
| + | |||
| + | |||
| + | ===== Software Design ===== | ||
| + | | Notă | 🎯 Țintă (Hz) | 🔴 Roșu (jos) | 🟡 Galben (jos) | 🟢 Verde | 🟡 Galben (sus) | 🔴 Roșu (sus) | | ||
| + | | ---- | ------------- | ------------- | --------------- | ------------- | --------------- | ------------- | | ||
| + | | E2 | 82.41 | < 78.01 | 78.01–81.02 | 81.02–83.88 | 83.88–87.06 | > 87.06 | | ||
| + | | F2 | 87.31 | < 82.65 | 82.65–85.84 | 85.84–88.86 | 88.86–92.24 | > 92.24 | | ||
| + | | F#2 | 92.50 | < 87.57 | 87.57–90.94 | 90.94–94.15 | 94.15–97.72 | > 97.72 | | ||
| + | | G2 | 98.00 | < 92.77 | 92.77–96.35 | 96.35–99.75 | 99.75–103.53 | > 103.53 | | ||
| + | | G#2 | 103.83 | < 98.29 | 98.29–102.08 | 102.08–105.68 | 105.68–109.69 | > 109.69 | | ||
| + | | A2 | 110.00 | < 104.13 | 104.13–108.15 | 108.15–111.96 | 111.96–116.21 | > 116.21 | | ||
| + | | A#2 | 116.54 | < 110.33 | 110.33–114.58 | 114.58–118.62 | 118.62–123.12 | > 123.12 | | ||
| + | | B2 | 123.47 | < 116.89 | 116.89–121.39 | 121.39–125.67 | 125.67–130.45 | > 130.45 | | ||
| + | | C3 | 130.81 | < 123.84 | 123.84–128.61 | 128.61–133.15 | 133.15–138.20 | > 138.20 | | ||
| + | | C#3 | 138.59 | < 131.20 | 131.20–136.26 | 136.26–141.06 | 141.06–146.42 | > 146.42 | | ||
| + | | D3 | 146.83 | < 139.00 | 139.00–144.36 | 144.36–149.45 | 149.45–155.13 | > 155.13 | | ||
| + | | D#3 | 155.56 | < 147.27 | 147.27–152.94 | 152.94–158.34 | 158.34–164.35 | > 164.35 | | ||
| + | | E3 | 164.81 | < 156.03 | 156.03–162.04 | 162.04–167.75 | 167.75–174.12 | > 174.12 | | ||
| + | | F3 | 174.61 | < 165.30 | 165.30–171.67 | 171.67–177.73 | 177.73–184.48 | > 184.48 | | ||
| + | | F#3 | 185.00 | < 175.13 | 175.13–181.88 | 181.88–188.30 | 188.30–195.45 | > 195.45 | | ||
| + | | G3 | 196.00 | < 185.55 | 185.55–192.70 | 192.70–199.49 | 199.49–207.07 | > 207.07 | | ||
| + | | G#3 | 207.65 | < 196.58 | 196.58–204.16 | 204.16–211.36 | 211.36–219.38 | > 219.38 | | ||
| + | | A3 | 220.00 | < 208.27 | 208.27–216.30 | 216.30–223.92 | 223.92–232.43 | > 232.43 | | ||
| + | | A#3 | 233.08 | < 220.65 | 220.65–229.16 | 229.16–237.24 | 237.24–246.25 | > 246.25 | | ||
| + | | B3 | 246.94 | < 233.77 | 233.77–242.78 | 242.78–251.35 | 251.35–260.89 | > 260.89 | | ||
| + | | C4 | 261.63 | < 247.68 | 247.68–257.22 | 257.22–266.29 | 266.29–276.40 | > 276.40 | | ||
| + | | C#4 | 277.18 | < 262.40 | 262.40–272.52 | 272.52–282.13 | 282.13–292.84 | > 292.84 | | ||
| + | | D4 | 293.66 | < 278.01 | 278.01–288.72 | 288.72–298.90 | 298.90–310.25 | > 310.25 | | ||
| + | | D#4 | 311.13 | < 294.54 | 294.54–305.89 | 305.89–316.68 | 316.68–328.70 | > 328.70 | | ||
| + | | E4 | 329.63 | < 312.05 | 312.05–324.08 | 324.08–335.51 | 335.51–348.25 | > 348.25 | | ||
| + | | F4 | 349.23 | < 330.61 | 330.61–343.35 | 343.35–355.46 | 355.46–368.96 | > 368.96 | | ||
| + | | F#4 | 369.99 | < 350.27 | 350.27–363.76 | 363.76–376.59 | 376.59–390.90 | > 390.90 | | ||
| + | | G4 | 392.00 | < 371.09 | 371.09–385.40 | 385.40–398.99 | 398.99–414.14 | > 414.14 | | ||
| + | | G#4 | 415.30 | < 393.16 | 393.16–408.31 | 408.31–422.71 | 422.71–438.77 | > 438.77 | | ||
| + | | A4 | 440.00 | < 416.54 | 416.54–432.59 | 432.59–447.85 | 447.85–464.86 | > 464.86 | | ||
| + | | A#4 | 466.16 | < 441.31 | 441.31–458.31 | 458.31–474.48 | 474.48–492.50 | > 492.50 | | ||
| + | | B4 | 493.88 | < 467.55 | 467.55–485.57 | 485.57–502.69 | 502.69–521.78 | > 521.78 | | ||
| + | | C5 | 523.25 | < 495.35 | 495.35–514.44 | 514.44–532.59 | 532.59–552.81 | > 552.81 | | ||
| + | | C#5 | 554.37 | < 524.81 | 524.81–545.03 | 545.03–564.25 | 564.25–585.68 | > 585.68 | | ||
| + | | D5 | 587.33 | < 556.01 | 556.01–577.44 | 577.44–597.81 | 597.81–620.51 | > 620.51 | | ||
| + | | D#5 | 622.25 | < 589.08 | 589.08–611.78 | 611.78–633.35 | 633.35–657.41 | > 657.41 | | ||
| + | | E5 | 659.26 | < 624.10 | 624.10–648.15 | 648.15–671.02 | 671.02–696.50 | > 696.50 | | ||
| ===== Conclusions ===== | ===== Conclusions ===== | ||