Skip to the content
2 layers97.4 × 72.1 mmT25 445PCB, the printed circuit board in 3D

Handheld auto guitar tuner: custom ESP32-S3 PCB with autocorrelation pitch detection and servo-driven peg tuning

Size
97.4 × 72.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
74
Nets
63
Pads
219
Tracks, vias
323, 92
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
20 Jul 2026
Updated
23 Jul 2026

Overview

T25 445PCB is an open-source printed circuit board by RitvikPatnala, from the RitvikPatnala/auto-guitar-tuner repository on GitHub, published under the MIT licence. It is a 2-layer board of 97.4 × 72.1 mm with 74 parts on 63 nets, routed with 323 tracks and 92 vias.

It is built around the ESP32-S3-WROOM-1-N8, AP62150WU and LM386MX-1/NOPB-HXY, with the KMR232NGULCLFS, VLS6045EX-3R3N and 10118192-0001LF among its other parts. Its parts include 19 capacitors, 15 resistors, 9 connectors, 4 ICs and 2 switches. It belongs with the audio and music and robots and motor control boards and the ESP32 boards of this library.

Main components

7

README

README.md

Auto Guitar Tuner

A handheld device that detects a guitar string's pitch and physically rotates the tuning peg until the string is in tune. Built around a custom ESP32-S3 PCB designed from schematic capture to routed layout, with real-time pitch detection firmware and closed-loop servo control. Tunes to within ±12 cents across all six strings and multiple tuning standards (Standard, Eb, Drop D, Open G).

Screenshot 2026-07-20 at 3 30 26 PM

How it works?

  1. A piezo vibration sensor mounted on the guitar picks up string vibrations (immune to ambient room noise, unlike a microphone).
  2. An LM386 amplifier stage (gain ≈ 50) with a 1.6 kHz RC anti-aliasing filter conditions the signal for the ESP32-S3's ADC (8192 Hz, 12-bit).
  3. Firmware detects the fundamental frequency using time-domain autocorrelation and computes the error from the target pitch in cents.
  4. A PID controller drives an HS-318 servo attached to the tuning peg, making small angular corrections until the string is in tune — with safety interlocks (rotation limits, stall detection, voicing threshold) to protect the guitar.
  5. A TFT LCD (SPI) and two-button interface let the user select strings and tuning modes via an FSM-driven UI.

Why Autocorrelation instaead of FFT?

The most interesting design decision in the project. Guitar strings produce strong harmonics — the 2nd harmonic often carries more energy than the fundamental, so naive FFT peak-picking frequently reports the octave above the true pitch. Time-domain autocorrelation measures the signal's self-similarity across lag values, which naturally locks onto the fundamental period. It was also faster on the ESP32-S3:

ApproachLatency
Autocorrelation~22 ms
FFT + peak detection~48 ms

The pipeline: Hann window → autocorrelation over the guitar's lag range (73–330 Hz) → normalization → zero-crossing peak detection → parabolic sub-sample interpolation for resolution beyond the lag grid. The ~22 ms loop lets the tuner track pitch continuously while the motor turns, so the user doesn't need to re-pluck after every adjustment.

Hardware Design

  • Power: dual AP62150 buck converters (9V battery → 5V and 3.3V rails). Chosen over LDOs after a dissipation analysis — a stalled servo draws 800 mA, which would burn 3.2 W in an LDO vs ~90% buck efficiency.
  • Custom PCB: designed in KiCAD (schematic → layout), simulated in LTSpice; noise mitigated with ground partitioning, supply decoupling, and the RC input filter.
Screenshot 2026-07-21 at 8 55 34 PM Screenshot 2026-07-21 at 8 56 06 PM
  • Motor: HS-318 analog servo, selected over a stepper for closed-loop position feedback and full torque at low speed. Torque analysis: 0.25 kg·cm required at the peg vs 3.7 kg·cm available.

Verification Highlights

SubsystemResult
Power rails3.353 V / 4.995 V measured (±1% of nominal)
Audio chainGain of ~52 measured (target 50); piezo signal 84 mV
Pitch detection±12 cents final tuning accuracy, ~22 ms latency
ControlAutonomous tuning verified on all 6 strings + alternate tunings

Parts

74
QtyValueFootprintReferences
10TestPointTestPoint:TestPoint_Pad_D1.0mmTP3, TP4, TP5, TP7, TP8, TP9, TP10, TP11, TP12, TP15
70.1uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C4, C7, C9, C19, C22, C25
710kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2, R3, R8, R9, R12, R13
6TestPointTestPoint:TestPoint_Pad_D1.5mmTP1, TP2, TP6, TP13, TP14, TP16
410uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5, C6, C13, C23
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
31uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC11, C28, C29
3TestPointTestPoint:TestPoint_Pad_D2.0mmTP17, TP18, TP19
2100kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6, R7
222uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8, C10
2AP62150WUPackage_TO_SOT_SMD:TSOT-23-6U2, U3
2KMR232NG_ULC_LFSButton_Switch_SMD:KMR232NGULCLFSS1, S2
2VLS6045EX-3R3NInductor_SMD:IND_VLS6045EX-3R3NL1, L2
10.01uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC12
11.2kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR10
1100uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC2
110118192-0001LFConnector_USB:AMPHENOL_10118192-0001LFJ8
1160kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR14
11MResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR4
131.6kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR5
147kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR15
152.3kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR11
1BATConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ1
1Conn_01x03Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ2
1Conn_01x08Connector_Molex:Molex_KK-254_AE-6410-08A_1x08_P2.54mm_VerticalJ7
1ESP32-S3-WROOM-1RF_Module:ESP32-S3-WROOM-1U5
1LM386MX-1_NOPBAudio_Module:SOIC127P599X175-8NU1
1POW_SWConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ3
1PiezoConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ6
1RSBIC3100AA00KCapacitor_THT:CAP_RSBIC3100AA00K_KEMC1
1SEL_BUTConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ5
1TOG_BUTConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ4
1TestVConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ9

Similar boards

  • 4 layers183.7 × 92.8 mmMetaldetector, the printed circuit board in 3D

    Metaldetector

    Petersdavis/balanced_pulse_induction_metal_detector

    Open source pulse induction balance metal detector

    44 parts1
  • 4 layers96.5 × 85.5 mmSense&ControlBoard, the printed circuit board in 3D

    Sense&ControlBoard

    Ben-Bussch/COMET-I-Static-Fire

    Avionics for Static Fire of Comet 1

    147 parts
  • 4 layers114.3 × 108 mmPellet, the printed circuit board in 3D

    Pellet

    Mouse-GYM/auto-trainer-hardware

    Repository for hardware, firmware, and software related to the Mouse-GYM modules

    202 parts
  • 2 layers87 × 67.5 mmResoDriver, the printed circuit board in 3D

    ResoDriver

    NickNiski/ResoDriver

    A control board for a mini resonant IGBT inverter

    102 partsGPL-3.0
  • 6 layers105.6 × 100.9 mmSimpleCarrier, the printed circuit board in 3D

    SimpleCarrier

    alexian79/simpleCarrier

    146 partsBSD-2-Clause
  • 4 layers80 × 41.8 mmSimple ESC, the printed circuit board in 3D

    Simple ESC

    bluefeng2/Simple-ESC

    Single motor ESC based on AM32

    37 parts
  • 4 layers50.8 × 106.6 mmM.I.A., the printed circuit board in 3D

    M.I.A.

    landodoughty/Mission-Independent-Avionics-M.I.A.-

    My Custom Rocket Avionics System

    186 parts

Questions

How big is the T25 445PCB PCB?

It measures 97.4 × 72.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the T25 445PCB use?

74 parts, built around the ESP32-S3-WROOM-1-N8, AP62150WU, LM386MX-1/NOPB-HXY and KMR232NGULCLFS. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the T25 445PCB KiCad files?

From the RitvikPatnala/auto-guitar-tuner repository on GitHub, at the commit this page was made from: the board is hardware/T25_445PCB.kicad_pcb and its schematic hardware/T25_445PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the T25 445PCB design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).