How to Make Your Arduino Guitar Tuner

In this project, we are going to make a guitar tuner with Arduino Leonardo. The tuner will play the sound of the 6 strings on the guitar, which are the Low E string, A string, D string, G string, B string, and last the high E string. By comparing the sound of the tuner and the guitar, the user will be able to adjust their guitar in the right tune efficiently. The whole project is pretty beginner-friendly, no complicated coding or wiring is included. Let's jump right into our topic and learn how to build the tuner by yourself!

Materials NEEDED:

  • 1x Arduino Leonardo/UNO/ Arduino Genuino UNO
  • 1x Arduino Breadboard
  • 2x Buttons
  • 1x Buzzer
  • 6x LEDs
  • 10k ohm resistors
  • Generic wires
  • Hot glue gun
  • Tape
  • Cardboard
  • Scissors/Box Cutter

Step 1: Coding

Nothing to be worried about. Just copy the code below, and paste it on your Arduino program.

https://create.arduino.cc/editor/Justinsan/aecd175...

--------------------------------------------------------------------------------

int _1_tone = 0.0 ;

void setup()

{

pinMode( 4 , INPUT);

pinMode( 5 , INPUT);

pinMode( 13 , OUTPUT);

pinMode( 12 , OUTPUT);

pinMode( 10 , OUTPUT);

pinMode( 9 , OUTPUT);

pinMode( 8 , OUTPUT);

pinMode( 7 , OUTPUT);

_1_tone = 0.0 ;

}

void loop()

{

if (digitalRead( 4 ))

{

_1_tone = ( _1_tone + 1.0 ) ;\

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 1.0 ) ) ))

{

digitalWrite( 13 , HIGH );

tone(11, 330.0, 5000.0);

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 2.0 ) ) ))

{

digitalWrite( 13 , LOW );

digitalWrite( 12 , HIGH );

tone(11, 440.0, 5000.0);

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 3.0 ) ) ))

{

digitalWrite( 12 , LOW );

digitalWrite( 10 , HIGH );

tone(11, 588.0, 5000.0);

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 4.0 ) ) ))

{

digitalWrite( 10 , LOW );

digitalWrite( 9 , HIGH );

tone(11, 784.0, 5000.0);

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 5.0 ) ) ))

{

digitalWrite( 9 , LOW );

digitalWrite( 8 , HIGH );

tone(11, 988.0, 5000.0);

delay( 500.0 );

}

if (( digitalRead( 5 ) && ( ( _1_tone ) == ( 6.0 ) ) ))

{

digitalWrite( 8 , LOW );

digitalWrite( 7 , HIGH );

tone(11, 1318.0, 5000.0);

delay( 500.0 );

_1_tone = 0.0 ;

}

}

--------------------------------------------------------------------------------

Step 2: Wiring

Attach the materials to the breadboard as the way shown above.

Step 3: Build the Structure of the Tuner

First, cut the cardboard that you prepared earlier into 2 pieces that are 20cm x 15cm, 2 pieces that are 15cm x 12cm, and two pieces that are 12cm x 20cm. Take one of the 12cm x 20cm pieces and cut out 2 circles that fits the button and write "Play" under the button on the left and "Next" under the button on the right. Then, take the 15cm x 12cm pieces and cut a hole on both of them that allows the USB and the buzzer to pass through. Next, take one of the 20cm x 15cm pieces and cut several holes on it to let the LEDs pass. Mark each LEDs with their notes, which are EADGBE. Last, glue the card board pieces together. The 20cm x 15cm pieces that is not cut will be at the bottom, the one that is cut will be at the top, 12cm x 15cm pieces will be at the right and left side, 12cm x 20cm pieces will be at the front and back. Glue the pieces together with hot glue gun, then stabilize it with tape if needed. Of course, put your Arduino and the breadboard inside the box after you finish building it.

Step 4: Prevent Problems

There might be several issues that will unable the device's function

  • Wire not connected
  • Wire connected incorrectly
  • Pressing the buttons continuously
  • Mixing up different LEDs, ex. label the LED for E as B
  • Program not uploaded to Arduino
  • USB not connected

After you check all these issues carefully, it is very likely that the device is going to work, and then you are good to go!

Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    Discussions