Introduction: Arduino Ukulele Tuner

Make an Arduino - Adafruit TFT shield - piezo buzzer - Ukulele tuner.

What it is:

This Instructable shows how to make an analog ukulele tuner that uses standard G ukulele tuning. It's an effective aid for tuning your ukulele.

What it isn't:

It is not a digital tuner that shows when the exact frequency is attained. Instead it plays the notes and you have to use your own musical ear to distinguish the frequencies and match the tones.

If you are interested in learning about using an Arduino for frequency analysis, see this Instructable by Amanda Ghaessi:

https://www.instructables.com/id/Arduino-Frequency-Detection/

How to use it:

Touch one of the keys on the TFT screen and the correct note sounds on the piezo buzzer.

For reference: ukulele tuning:

https://en.wikipedia.org/wiki/Ukulele#Tuning

Step 1: Connect the Parts

Parts used in this Instructable:


Arduino Uno

https://www.arduino.cc/

Adafruit 2.8" TFT shield

http://www.adafruit.com/products/1651

middle shield to access Arduino's A0 and Ground pins (see below).

piezo buzzer

The 'middle shield' can either be home-made, or purchased, or assembled from a kit. It's used because the TFT shield covers Arduino Uno's I/O headers and we need access to the A0 and ground pins to connect the buzzer. The picture above shows a home-made shield that gives side access to these pins, and the buzzer connections.

The second picture shows a different homemade shield. Both of these shields were made using circuit boards and pin headers. If you make your own shield, some shield stacking headers will be helpful:

https://www.adafruit.com/products/85

As an alternative you can buy an assembled wing shield or a screw shield kit, such as:

http://www.adafruit.com/products/196

https://www.sparkfun.com/products/9729

http://www.seeedstudio.com/depot/Screw-Shield-p-1238.html

Assembly: it's like making a sandwich: the Arduino goes on the bottom, the middle shield in the middle, and the TFT shield as the top layer.


Wiring: the two leads of the piezo buzzer are connected to the A0 and Gnd (ground) pins (using the headers or screw terminals of the middle shield).

Step 2: Download the Sketch and Tune Your Uke

Download TFTuke.ino and copy it to your Arduino sketchbook.

When you upload the sketch to your Arduino / TFT shield assembly, you will have an Arduino ukulele tuner that plays the notes for standard ukulele G tuning.

Press a key on the touch screen, listen as the Arduino plays the note and tune each string by ear.

The longer you press the note on the screen, the longer the note plays.

Step 3: Adapt the Sketch - Tuning for Different Instruments

The sketch has been commented, so it should not be difficult for you to modify it for different ukulele tuning if you prefer, or for guitar, banjo, etc. if you don't have a ukulele. See the reference to Wikipedia's article on ukulele tuning (also cited earlier):

https://en.wikipedia.org/wiki/Ukulele#Tuning

What to change for different ukulele tuning:

Change the array that specifies key frequencies:

Key keys[ ] =

{

}

Leave the middle element (the x screen coordinate) for each note as it is, and change the note frequency (first element) and the note name (third element). You will then have your own custom-made ukulele tuner that works for your preferred tuning.

Make a tuner for different instruments - such as guitar:

The Wikipedia entry for guitar tuning gives the note frequencies that you will need to make this change.

https://en.wikipedia.org/wiki/Guitar_tunings

Since the guitar has two extra notes, you will need to narrow the note width to 40 pixels in this line of the sketch:

#define note_W 40;

Change the key count from 4 to 6 in this line:

const int keyCount = 6;

Now change the elements in the Key keys[] array (see above). For each key you need to specify the frequency, the x-coordinate (where it will be drawn on the TFT screen), and the note name. Use 10 for the first note's x-coordinate, and increment the value by 50 for each subsequent note. (There is a 10-pixel space between each note.)

Acknowledgement

Thanks to Andrew Wendt, who helped tune the code in this Instructable.

Comments

About This Instructable

1,065views

5favorites

License:

More by turnturtle:Arduino Ukulele TunerArduino + TFT --> Turtle GraphicsArduino + TFT =  Visual Music
Add instructable to: