PCB & analog Breadboard build · indicator demonstrated
Hardware Guitar Tuner
An analog circuit that tells you whether a guitar note is sharp or flat. No microcontroller, no software.
- 630 Hz filter
- 0.871
- 690 Hz filter
- 0.525
- Calculated crossover
- 659.3 Hz
- Target
- 660 Hz
At 645 Hz, the 630 Hz path is larger, so the indicator reads below target.
Model and sampled values
H(f; f0, Q) = ((f/f0)/Q) / √((1 − (f/f0)²)² + ((f/f0)/Q)²), with f0 = 630 and 690 Hz and Q = 12 for both, sampled from 500 to 820 Hz.
| Hz | 630 Hz filter | 690 Hz filter |
|---|---|---|
| 560 | 0.333 | 0.194 |
| 600 | 0.649 | 0.285 |
| 630 | 1.000 | 0.416 |
| 645 | 0.871 | 0.525 |
| 660 | 0.667 | 0.684 |
| 675 | 0.517 | 0.884 |
| 690 | 0.416 | 1.000 |
| 720 | 0.297 | 0.699 |
| 760 | 0.216 | 0.395 |
What I did
I designed the signal chain on a breadboard: microphone front end, gain stages, two band-pass filters near 630 and 690 Hz, peak detectors and a comparator driving an above/below indicator.
I also designed an H-bridge motor stage for peg correction.
Result
- Above/below indication working on injected test tones.
- Each stage characterised with a waveform generator and oscilloscope.
- The motor stage was designed, not demonstrated as an auto-tuner.
- The curves here are a model with an assumed Q of 12, not measurements.
Debugging
A comparator that failed only when connected
Joining the comparator to the decision logic collapsed its output; disconnected, it worked. That pointed at the interface, not the comparator. The cause was a wiring short, and fixing it restored the indicator.
- Microphonebiased
- Gain stagesop-amps
- Band-pass≈ 630 Hz
- Band-pass≈ 690 Hz
- Peak detector
- Peak detector
- Comparatorwhich is larger
- Decision logic
- Indicatorabove / below
- H-bridge
- Motor and peg
More detail
How two filters decide
The target is the high E string at the twelfth fret, about 660 Hz. Whichever filter responds more strongly says which way the note is off, and since both scale with pluck strength, volume matters less.
Equal spacing doesn't mean equal response at 660 Hz: even the ideal model crosses near 659.3 Hz, and real tolerances move it further.
Signal chain
Each filter feeds a peak detector that turns the AC response into a slow envelope. The comparator sees the difference and the decision logic drives the indicator; the designed motor stage would take that sign as a direction.
Targeting 660 Hz instead of 330 Hz cuts the needed LC product by four, which makes practical component values easier.
Other design decisions
Compare amplitudes instead of counting cycles
Two resonant paths and an envelope comparison. Instead of: zero-crossing timing or a microcontroller.
Pure analog and mostly volume-independent, but the crossover moves when the two paths don't match.
Inject known tones first
Characterise each stage with a waveform generator. Instead of: tuning the whole chain with a guitar.
Separates electronics problems from acoustic ones, at the cost of a second test round with the microphone.