top of page
How-To Steps
Step 1: Required Parts

(x1) Arduino Uno 
(x1) TL082 Dual JFET Input Op Amp
(x1) 6x4x2" project enclosure 
(x6) 5mm Red LED 
(x1) 5mm Green LED
(x13) 150 Ohm Resistor 
(x2) 9V Battery 
(x2) 9V Snap Connector
(x1) M-type power plug 
(x1) SPST Rocker Switch
(x1) 1/4" Mono Audio Jack 
(x3) 100kOhm Resistor 
(x1) 10uF Capacitor 
(x1) 100nF Capacitor

(x1) potentiometer

(x3) Fork and Spade Wire Connectors

(x2) 8x12 cm Double Sided Prototype Print Circuit Board

(x1) Mini Breadboard

Step 2: Drill

Drill a starter hole on the side of your enclosure using a 1/8" drill bit. Drill into the starter hole using a 13/16" spade bit to create a larger hole for the SPST rocker switch. The rocker switch will serve as an on/off switch for the tuner.

Drill a hole beneath the on/off switch hole using a 23/64" bit. This hole is for your audio jack.

Step 2: Drill
  1. On/Off Switch: On/Off Switch: If you buy a circular switch, it is quite simple to just use an appropriate size drill bit for the diameter of your SPST rocker switch. However, we used a rectangle mount SPST switch, so we used a dremel tool with a 1” cutting disc to cut out the hole for it. The rocker switch will serve as an on/off switch for the tuner.

  2. Audio Jack: Drill a hole beneath the on/off switch hole using a 23/64" bit. This hole is for your audio jack.

Step 3: On/Off Switch
  1. Solder the red wire of one of your battery snaps to one of your female spade connectors.

  2. Solder another piece of wire about 4-5” long to another female spade connector. Just leave the other end stripped for now. It will connect to your PCB later.

Step 4: Audio Jack
  1. Solder a green wire to the output terminal and a black wire to the ground terminal on the audio jack.  If you are unsure about the terminals, the ground terminal is the connector that is attached to the spring retention clip.

  2. Insert the audio jack in the 23/64" hole you drilled and fasten it in place with its mounting nut and washer.

Step 5: Power Plug
  1. You need an M-type power plug in order to power the Arduino. You can buy just the connector itself and solder your own wires onto it, or you can buy a usb cord and strip it back like we did. Leave at least 6” of wires so you can install in the box easier.

Step 6: Build the Amplify & Offset on Breadboard

The circuit above is what you need to build. Refer back to it as needed during this process. We will provide a brief explanation of this circuit now.

 

The audio signal coming from the electric guitar needs to be amplified to be about 5V peak to peak and and offset to be centered around 2.5V as opposed to 0V. The signal needs to be between 0 and 5V in order for it to be read by the Arduino's analog pin. It should also have the greatest amplitude possible without clipping in order to get more accurate frequency calculations.

 

The circuit you need in order to achieve that is shown above. It is basically comprised of a voltage divider for the 2.5 V offset and an op-amp to amplify the signals. 

 

In order to achieve an ideal signal, you will need to play with the gain of your op-amp circuit. We used a potentiometer to do this. If your guitar is like ours and has an output range of 100-300 mV, you can set the potentiometer to 15Kohm and you will have a nice signal without clipping. However, if you need to adjust the gain, visit this section of our troubleshooting page.
 

Below is the snapshot of our output after building and testing our circuit. 

 

Once you have tested this, you can move on to building the output circuits on the breadboard.

Step 7: Frequency Range Indicators
  1. Create your LED display buy placing 7 LED’s in a row, with the green LED in the middle. We used a common cathode design for these LED’s.

  2. Then place a 150 Ohm resistor in series with each LED. You will output from the Arduino to these resistors. It should look something like below, where the wires you see go to the appropriate output pins from the Arduino.

  3. Don’t forget to connect the cathodes to the arduino’s ground. Refer to this schematic for any questions about wiring.

  1. This will be very similar to wiring the LED’s, except we are using a common anode display. So keep in mind to turn these LED’s on, you will have to assign them a digital LOW.

  2. Just attach a 150 Ohm resister to each of the pins of the SSEG (except the cathode pins of course.

  3. Use the truth table above to know how to wire and assign pins to the SSEG.

  4. Then connect the resistors to the corresponding digital output pins on the Arduino.

  5. Below is what our circuit looked like. Notice a and f are always the same, and so are b and c. We took advantage of this and drove these pairs with the same pin of the Arduino.

Step 8: SSEG Display
  1. Try running our modified version of Amanda's code for Arduino Frequency Detection to test out the Arduino's frequency calculation. More information about the code is in the "Arduino Code" tab, or you can click the button below to get there.

Step 9: Upload the Code

The serial monitor should print the frequency of the strings being played. The guitar's strings should have the following ideal frequencies:

E - 82.4 Hz

A - 110 Hz

D - 146.8 Hz

G - 196 Hz

B - 246.9 Hz

E - 329.6 Hz

 

Since the the higher strings have a much lower amplitude signal than the lower strings, it can be tricky to get the frequency detection to work. Amanda's code has a variable called ampThreshold that is the minimum signal amplitude for the Arduino to calculate frequency. For the guitar tuner, the ampThreshold should be high enough that the Arduino calculates the frequency of the higher strings, but also low enough that it does not pick up too much noise from the lower strings. We found that an ampThreshold of 20 works.

 

You have to strum the high strings a bit harder to get the Arduino to pick them up, but the frequency detection works well. You can experiment with other values to get it to work for you. Values ranging from 10 to 30 work okay. For more information on Amanda's algorithm for frequency detection, check out her Instructable: Arduino Frequency Detection.

  1. Now carefully connect all of the elements you just built. Reference the schematics above for pinout. Ours looked like this.

Step 10: Test the Prototype Tuner
Step 11: Solder the Op-Amp Circuit 
  1. Go ahead and rebuild the amplify and offset circuit on its own PCB.

  2. Solder all of your leads for the battery snap connectors, the switch, audio jack, and leads for Arduino connections on this board. See the pictures below for reference.

  3. Be sure to document all of your pin connections for later wiring. Try to keep all of the components on one side of the board for easier packaging.

  4. You will need to add an additional wire to this board in order to supply the 5V to the display PCB. So wire the other end to a male spade connector.

  5. We also added two leads  onto this board that connected to ground and the audio input. These wires have breadboard pins on the other side so that we can easily connect this system to a power supply and oscilloscope and test it. That is what the small breadboard is for.

Step 12: Place Op-Amp PCB in Box
  1. Place this PCB in the bottom of the box.

  2. We placed a ¼” sheet of foam to keep it from bouncing around.  

  3. Wire up the batteries, switch and Arduino pins.

  4. Then feed your audio jack through the hole you made and secure it using the locknut and washer. 

Step 13: Solder the Display
  1. Now convert the display circuits over to the one PCB.

  2. Line up the LEDS along the top and place the SSEG somewhere around the bottom center.

  3. On the bottom side, try to lay out the leads in a way that makes wiring up the Arduino easier for you. You can even tape the wires together and solder them to prototyping pins for an arduino, essentially making your own ribbon wire. This will make your assembly process much easier.

  4. Don’t forget to attach a lead with a female fork connector to the anode of the SSEG.

Step 14: Cut Holes in Lid
  1. Trace out the placement of the LEDS on the board and use an appropriate sized drill bit to drill out the holes.

  2. Then use a dremel and cutting disc to cut out the rectangle shape of the SSEG.

Step 15: Connect it All

Now you are ready to put everything together!

 

  1. Go ahead and plug all of your wires from the display board into the Arduino.

  2. Place some tape or rubber cover over the 5V fork and spade connectors.

  3. Then place two small pieces of double sided tape on empty sections of the display PCB and stick it to the top cover. (Making sure the lights align with the holes.)

Step 16: Close the Box
  1. Gently put the front of the tuner onto the front of the enclosure making sure that none of the wires get disconnected.

  2. Screw in the screws provided with the enclosure to fix the front in place.

Step 17: Final Waveform Testing
  1. Your tuner is now complete and you are ready to test it out. We tested it with a waveform generator and oscilloscope first.

  2. See video for how to do that.

  3. Once you have tested with the oscilloscope, you should be ready to tune your guitar. Thanks for following along!

©2017 BY ARDUINO DIGITAL GUITAR TUNER. PROUDLY CREATED WITH WIX.COM

bottom of page