Automatic Guitar Tuner
Automatically tunes your guitar after plucking a string.
Author: Niss Francisc-Cristian
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-Niss-Francisc-Cristian.git
Descriptionβ
The βAutomatic Guitar Tunerβ is a device designed to assist guitarist in tuning their instruments accurately and fast. It works by detecting the frequency of a played string and adjusting the tuning peg automatically using a motor.
Motivationβ
Tuning a guitar can be considered a frustrating process for a lot of guitar players, especially beginners. The motivation behind this project is to simplify that experience using a compact and portable device. This project combines my two main passions those being Music and IT.
Architectureβ
The Raspberry Pi Pico 2W acts as the central control unit, managing the input and output of the system.
The Max9814 Microphone Module captures the sound of a vibrating guitar string and sends the analog signal to the Pico for processing.
The Voltage Regulator provides a stable 5V power supply to the entire system, including the Pico, motor driver, and microphone.
The L298N receives control signals from the Pico and adjusts the direction of the connected motor accordingly.
The DC Motor is connected to a 3D printed tuning peg gripper and rotates to tune the guitar string automatically.
Logβ
Week 5 - 11 Mayβ
I finished purchasing all the components necessary for the project and now I am starting to connect and understand each component
Week 12 - 18 Mayβ
I completed assembling the circuit and ensuring that each component is properly wired and powered. With the hardware setup in place. I also finished making the blueprint for the 3D component that I will be attaching to the motor.
Week 19 - 25 Mayβ
Iβve completed the hardware and motor torque testing to ensure the system can turn a guitar peg reliably. With testing finalized, Iβve now started coding and have implemented the key functions I planned.
Hardwareβ
Raspberry Pi Pico 2W β acts as the central controller, running the logic to read audio input, process frequency, and control the motor.
Max9814 Electret Microphone Amplifier Module β captures the sound of the vibrating guitar string and outputs an amplified analog signal.
GA12-N20 DC Motor (6V, 30RPM) β rotates the guitar tuning peg to adjust string tension.
Dual Motor Driver Module β allows the Pico to control the motor direction using two GPIO pins.
LM2596S DC-DC Step-Down Converter β steps down the 8.4V from the battery to a stable 5V used by the entire system.
2S LiPo Battery (7.4V, 1300mAh) β provides portable power for the motor and control circuitry.
Generic Electronics Kit β includes breadboard, jumper wires, resistors, and connectors needed for prototyping.
3D Printed Tuning Peg Handle β a custom attachment mounted to the motor shaft to grip and turn the tuning peg of the guitar.
The system is powered by a 2S LiPo battery which supplies approximately 7.4V. This is stepped down using the LM2596S module to a regulated 5V that powers the Raspberry Pi Pico 2W, motor driver, microphone, and the motor itself via the L298N.


Schematicsβ
Bill of Materialsβ
| Device | Usage | Price |
|---|---|---|
| Raspberry Pi Pico 2W | The microcontroller | 39,66 RON |
| MAX9814 Microphone Module | The microphone | 24,90 RON |
| GA12-N20 DC Motor | The motor | 26,18 RON |
| LM2596S DC-DC Step Down Module | Voltage regulator | 12,99 RON |
| Dual Motor Driver Module L298N | The motor driver module | 10,99 RON |
| 2S LiPo 8V Battery | The battery | 95 RON |
| General Electronics Kit | Breadboard,wires,capacitors,resistors,etc. | 60,38 RON |
Softwareβ
| Library | Description | Usage |
|---|---|---|
rp-hal | HAL implementation for the Raspberry Pi Pico | GPIO, ADC, and hardware setup |
embedded-hal | Embedded hardware abstraction layer | General embedded hardware interface |
microfft | Fast Fourier Transform library for microcontrollers | Converts time-domain audio samples into frequency domain |
defmt | Logging crate optimized for embedded systems | Debugging values during development |
cortex-m | Low-level Cortex-M functionality | Optional: interrupt and timing control |
embassy-rp | Async HAL for Raspberry Pi Pico | Async GPIO, ADC, PWM, and peripheral control |
embassy-executor | Async runtime for embedded systems | Runs #[embassy_executor::main] async function |
embassy-time | Async timer/delay library for Embassy | Used for non-blocking delays like Timer::after() |
panic-probe | Minimal panic handler for embedded Rust | Captures and prints panics via RTT |
micromath | Lightweight math functions for no_std environments | Used for computing Hann window and FFT magnitude |