Use the Boldport Cuttle & Cordwood as a guitar tuner, with a custom input preamp.
Here’s a quick video showing it in action..
The Cordwood has six LEDs. Six is one of my favourite numbers .. like the number of strings on a standard guitar.
So is it possible to use the Cordwood to detect (even tune) the six strings of a guitar?
I was thinking about doing a complete analogue solution with bandpass filters (probably active filters in order to get very tight passband frequencies). Maybe later, but to start I wanted to try an Arduino-based approach I’d seen in an Instructables article by Nicole Grimwood.
Input Preamp and Filter
I’ve modified the circuit to take an input from an electret so I can use it with acoustic instruments, and adjusted the OpAmp configuration for simple single-supply operation using a basic LM386 audio amp.
The electret microphone is biased with a 10kΩ resistor and coupled to the amplifier with 100nF capacitor.
The LM386 uses a standard 200x gain configuration with a 10µF gain control and 10µF bypass capacitors.
On the output:
- 22kΩ voltage divider and 220µF capacitor biases the output to VCC/2
- a low-pass filter at a corner frequency of 723Hz cuts out most of the high frequency harmonics and noise that just confused the tuning algorithms
I mounted this all on a small prototyping board to get a nice clean signal. It is laid out in such a way that it plugs into a breadboard. Here’s the contruction I used:
And a typical output signal (open D string):
The initial code is from the Instructables article by Nicole Grimwood.
I’ve update the sketch quite a bit. It now doesn’t even try to be a tuner, but just a pretty stable and accurate indication of which root note is playing.
Credits and References
- Arduino Guitar Tuner by nikoala3/Nicole Grimwood
- Arduino Frequency Detection by amandaghassaei
- Guitar tunings - wikipedia
- Passive Low Pass Filter
- Low Pass Filter Calculator
- LM386 microphone amplifier
- TI Single-Supply, Electret Microphone Pre-Amplifier Reference Design
- Electret microphone: selecting a bias resistor
- A Digital Guitar Tuner by Mary Lourde R., Anjali Kuppayil Saji - a scholarly article that explores the critical parameters that need to be addressed while designing a guitar tuner
- Digital Guitar Tuner by Dmitry Berenson - this is perhaps the best description of a realistic circuit using and LM358 op amp and ATMEGA32 microcontroller
- ..as mentioned on my blog
- ..as posted on hackady.io