Build your own electric guitar tuner using the Arduino! I decided to make this because I wanted to experiment with audio input and frequency detection. I used Amanda Ghassaei's method for Arduino Frequency Detection in order to get frequency readings using the Arduino. I used LEDs that light up according to the frequency of the audio input, indicating whether the string being played is sharp, flat, or in tune. This works like any other guitar tuner, but you can make it yourself!

Step 1: What you need

(x1) Arduino Uno (RadioShack #276-128)
(x1) TL082 Dual JFET Input Op Amp (RadioShack #276-1715)
(x1) 6x4x2" project enclosure (RadioShack #270-1806)
(x6) 5mm Yellow LED (RadioShack #276-021)
(x6) 5mm Red LED (RadioShack #276-041)
(x1) 5mm Green LED (RadioShack #276-022)
(x13) 150 Ohm Resistor (RadioShack #271-1109)
(x2) 9V Battery (RadioShack #23-1134)
(x2) 9V Snap Connector (RadioShack #270-324)
(x1) M-type power plug (RadioShack #274-1569)
(x1) SPST Rocker Switch (RadioShack #275-693)
(x1) 1/4" Mono Audio Jack (RadioShack #274-255)
(x1) Matching Printed Circuit Board (RadioShack #276-170)
(x1) Grid-Style Printed Circuit Board (RadioShack #276-149)
(x3) 100kOhm Resistor (RadioShack #271-1347)
(x1) 22kOhm Resistor (RadioShack #271-1339)
(x1) 10uF Capacitor (RadioShack #272-1025)
(x1) 100nF Capacitor
(x1) 6x4x.125" Acrylic Sheet


<p><div><div><div><p>I'm trying to adapt a lcd screen to this project but I cant seem to figure the code out.</p><p>I have checked everything multiple times but wasn't able to find whats wrong and why isn't this working. Everythig seems to be working fine with the leds but when I try to use the lcd screen it shows nothing.</p><p>I have included the LiquidCrystal on the begining of the code and lcd.begin(16,2); in the setup, this was the other change I did in the code:</p></div></div></div></p><p>&quot;void stringCheck(){</p><p>if(frequency&gt;70&amp;frequency&lt;90){</p><p>lcd.print(&quot;E&quot;);</p><p>correctFrequency = 82.4;</p><p>}</p><p>if(frequency&gt;100&amp;frequency&lt;120){</p><p>lcd.print(&quot;A&quot;);</p><p>correctFrequency = 110;</p><p>}</p><p>if(frequency&gt;135&amp;frequency&lt;155){</p><p>lcd.print(&quot;D&quot;);</p><p>correctFrequency = 146.8;</p><p>}</p><p>if(frequency&gt;186&amp;frequency&lt;205){</p><p>lcd.print(&quot;G&quot;);</p><p>correctFrequency = 196;</p><p>}</p><p>if(frequency&gt;235&amp;frequency&lt;255){</p><p>lcd.print(&quot;B&quot;);</p><p>correctFrequency = 246.9;</p><p>}</p><p>if(frequency&gt;320&amp;frequency&lt;340){</p><p>lcd.print(&quot;e&quot;);</p><p>correctFrequency = 329.6;</p><p>}</p><p>}</p><p>//Compare the frequency input to the correct</p><p>//frequency and light up the appropriate LEDS</p><p>void frequencyCheck(){</p><p>if(frequency&gt;correctFrequency+1){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&gt;&quot;);</p><p>}</p><p>if(frequency&gt;correctFrequency+4){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&gt;&gt;&quot;);</p><p>}</p><p>if(frequency&gt;correctFrequency+6){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&gt;&gt;&gt;&quot;);</p><p>}</p><p>if(frequency&lt;correctFrequency-1){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&lt;&quot;);</p><p>}</p><p>if(frequency&lt;correctFrequency-4){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&lt;&lt;&quot;);</p><p>}</p><p>if(frequency&lt;correctFrequency-6){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;&lt;&lt;&lt;&quot;);</p><p>}</p><p>if(frequency&gt;correctFrequency-1&amp;frequency&lt;correctFrequency+1){</p><p>lcd.setCursor(0,1);</p><p>lcd.print(&quot;OK!&quot;);</p><p>}</p><p>}</p><p>void loop(){</p><p>lcd.clear();</p><p>&quot;</p><p>Thanks for the project! If someone could help me it would be awesome =)</p>
<p>hi.thanks.it was an interesting project!!</p><p>i've got a question and it's related to my project.i wanna make s.th with an arduino uno to recive guitar notes and show it's frequency and note name on the LCD.but i've got a lot of problems with the code and it made me really confused.what should I do in your opinions?</p><p>I would really appriciate that if you help me with the circuit and the code.</p>
<p>Hi! Thanks!</p><p>Did you try checking out the serial output from the arduino to make sure it's correctly registering the frequency? Is there a certain step that you're stuck on? Do you happen to have access to an oscilloscope?</p>
<p>does any one have any idea about my problem?</p><p>I really need help.</p>
<p>Hi! I love this project. I have a problem though. Three of the LEDs are constantly on, and I can't seem to be able to get it to work. The input test just gave me the repeating word 'clipping', no matter what sound is coming to the arduino. I'm thinking that maybe there isn't any sound coming to it. Please help. Thanks,</p><p><em>G.</em></p>
<p>Hi! Your project is very impressive!! Congratulations!!</p><p>About latency, you already had measured that information? How many time the Arduino spend until detect the frequency?</p>
<p>Please tell the procedure for acoustic guitar ? can we not use the wire to carry the signal as you have used ? Please reply asap !</p>
Hi! So you would want to use a microphone to get the signal from the guitar. This would be a bit more unreliable since there could be external noise and the microphone might not pick up the signal as well. Depending on the microphone you use, you might also need to change the amplifier portion of the circuit.
<p>How about using a piezo as a contact mic, kind of the way that the Snark and similar tuners work?</p>
<p>This Instructable might be useful: </p><p>http://www.instructables.com/id/Arduino-Audio-Input/</p>
<p>This is where diy gets weird. What is the point of making something that will cost about $100 to make something that is vastly inferior to the many chinese guitar tuners on the market that cost under $10.00 and come with features like an led, a range of tuning scale, clip onto the headstock for both electric and acoustic guitars, and run off a tiny watch battery and not off of 18v supply (more dead batteries in the landfill). You'd learn a lot more about electronics trying to figure your project out using a bunch of 555 timer chips. The only winner here is Radio Shack promoting their ridiculaouly overpriced parts..bah humbug :)</p>
<p>&quot;We have a be nice comment policy.<br> Please be positive and constructive.&quot;</p><p>Not every instructable is about making something that is better or cheaper than the commercial version.</p><p>I am personally glad to see this instructable; I think it's cool. And it helps teach me something about programming and frequency detection (which I'm interested in), although not so much about electronics (which I'm not as interested in).</p><p>Too bad the only place I can get the parts for this instructable is Radio Shack. Oh, wait...</p>
<p>This is brilliant. Great job! We have a free online tuning fork which can be enjoyed here: http://www.123guitartuner.com</p>
<p>Hi. I'm really a newbie and i'd like to make a tuner like this one, but in a smaller version, so i don't want to use two 9v batteries. I was wondering if there's a way to amplify audio signal up to 2.5v, always using a TL082, but only one 12v battery. Could someone help me please?</p>
<p>having some errors when I try to program the code. Does anyone have a sketch saved that works that I could possibly borrow? I would love to try this out have all wired just needing help with the code</p>
<p>please give the schematic, circuit diagram when we are using microphone instead of a wire to take input from the acoustic guitar. We are struck in the middle of our project. please help asap.</p>
<p>Hi, great instructable, very useful indeed. My query is regarding the signal coming in from the guitar lead. What is the voltage and current of the said signal? I'm guessing the peak voltage is about 0.25V but I have no knowledge of the current output. Please could you help, it would really be appreciated.</p>
<p>HEY!! nice project. I tied to build this and have problems with arduino. (my first arduino project) so when i not strum strings always leds what are connected to pin 8 9 and A5 are always on. How can i get those off when i am not hitting srings :) sorry my englis is worst.</p>
<p>hi i'm jin i've read your making idea </p><p>my team will make it following you</p><p>if we don't use arduino how should make it? (using ic or transistor)</p><p>my english is something wrong or rude </p><p>plz understand me ~</p><p>thank you read it :) </p>
<p>i made it with some modifications :)</p>
<p>I use the other amp but when I do not strum the strings, in the serial monitor displays the frequency with random values. is it normal ?</p>
<p>Very remarkable and ingenious project!!</p><p>Just one question, if I may: I just can't seem to get around a couple of weird messages that the serial monitor gives me every time, and I was wondering if there's any way to fix it. Most of times it just says &quot;cl&quot; and, by trying different changes in the sketch, I always got only as far as &quot;inf hz&quot;, just like a guy a couple messages behind. The project is currently assembled on a breadboard, so I could easily change it. But... I don't know. I'm just stuck, I guess... :(</p>
<p>Hmm darn. Okay, are you sure that you have the amplifier and offset set up correctly? Do you have access to an oscilloscope? Not sure what cl means.. Possibly It's "clipping" but the message was cut off. If that's the case, the amplitude of your signal coming in is too large. What did you change to get it to say inf hz? When I did the project, I only got that message when I had no signal coming in. Hopefully we can figure this out.</p>
<p>I made it work. Thank you so much for your tutorial! It was an awesome feeling having it done.</p>
<p>Awesome! Looks great! Glad it worked out.</p>
<p>may i see ur schematic sir, pls?</p>
<p>just refer to the schematic on step 6. what I found useful was that I started wiring everything from the arduino first. I actually skipped the frequency detection code and started wiring in all the LEDs and tested it out with my guitar. here is video if you are curious on how I set it up. </p><p>https://www.facebook.com/photo.php?v=832338783445292&amp;set=vb.100000075330048&amp;type=2&amp;theater&amp;notif_t=video_comment</p>
<p>hi i've followed everything and made the circuit work. however, i the yellow LEDs seem to work very unstably. any suggestion on how to fix this? Thanks!</p>
<p>Hey! Even my finished product jumped around a bit. It took a little bit of experimentation to get it to my liking. One thing you could try is you can change the ampThreshold constant in the code. Currently the code has it set at 20, but you could try values ranging from 10-30 and see if that helps at all. I believe that higher thresholds lead to less clipping, but they also lead to less accurate frequency detection. Let me know if that works for you.</p>
<p>Do you have the proteus file of the Amplification and offsetting circuit design? I'm little confused to design it on Proteus</p>
<p>Hey there, I finished all the soldering and even started the LED's but am having trouble getting the frequency to read out. I'm getting the same issue as a previous comment about the &quot;inf hz&quot; being displayed hundreds of times in the serial monitor. I've quadruple checked all my connections, placemets, and soldering and everything goes with the schematic and your photos it seems. Any idea? Is this a short circuit or is my soldering wrong? (See images below - I know it's poor, I'm a beginner). Please help! This project rocks but I'm bummed if it doesn't ever come together.</p>
<p>Oh no! Hmm, It's honestly pretty hard to tell from the photos. Obviously It's kind of late in the game now, but did you try bread-boarding the circuit first? If you did, did you have the same problem? Is your guitar turned all the way up? Are you sure your batteries are good? Sorry if these are stupid questions.. Just gotta cover all the basics first.</p>
<p>I did but didn't get a readout, I'm new with breadboards and electronics in general so I figured I probably hooked it up wrong. I felt more comfortable following your schematic and pictures, but ended up with the 3 rd lights on the right. Would it help if I took closer pictures? I also used a 104 M ceramic capacitor, you seemed to use a 473M capacitor, does this matter?</p>
<p>Hi, I actually only used 10uF and 100nF capacitors. I'm assuming you replaced the 100nF cap with the 104M cap? That could be your problem. I also highly recommend breadboarding your circuit and getting it working before soldering. It makes it easier to make changes and It'll help you in the long run. Let me know if you still encounter problems.</p>
<p>I built this project but the LEDs seem working wrong. They don't refrhes themselves. They stay the same when I kill the sound. I built for an acoustic guitar</p>
<p>The way I coded it, the LEDs only respond to new audio input, so they will stay lit up until you strum the guitar again. You can definitely change the code so that they turn off when there is no new input.</p>
<p>I know the circuit I built is correct but i just get inf hz and clipping if I strum the guitar... so now what...</p>
<p>Hmm darn. I recall having a similar problem when I made mine. I'm sure we can figure it out. Are you confident that the signal coming from the guitar is about 5V peak to peak? I think I had that problem when the amplitude of the signal coming in wasn't quite right or if there was no signal at all. Have you played with the volume on your guitar?</p>
Not entirely sure... I don't have a scope and my Mac doesn't have a line in so not quite sure what to do in that case... I think my problem is VCC+ voltage because I'm trying to not use 9v since I use them up like mad so I'm hacking up power supplies and not getting 18v... Either too high or too low and at one point I was getting some frequencies but really had to dig in because of the low voltage supply. I'll try using 9v batteries to test and build and worry about external supplies after it works lol. I'll let you know when the magic smoke comes out :P
<p>We tried this tonight. There's something wrong with the power section. The Ardunio wouldn't power up, until we powered externally and disconnected from the battery power. </p>
<p>Powering externally is a bit more difficult because you need both positive and negative voltage. She splits the power in the middle to get a ground reference and 9v for the arduino. If you want to power external then I would loop up schematics for a positive and negative supply but for testing I would go with two 9 volts just until you get it working.</p>
<p>Yeah I feel ya about the 9v batteries, but I think that could be the problem. Let me know how it goes! </p>
<p>Just curious, why the 2 9V batteries? is it possible to do this with only 1 9V?</p>
<p>You don't happen to have a gerber file to make a pcd for this circuit do you ;)</p>
<p>I just made a quick Schematic, board, and generated gerber files in EagleCAD. You're welcome to the files if i attached my zip file correctly</p>
<p>Haha sorry no xD</p>
Neat project, excellently presented Ible. While it would most certainly be more cost effective to buy a chromatic tuner, you'd miss out on the satisfaction of doing it yourself and learning.
<p>If someone came to this project with the intention of building a tuner pedal then this would actually be more cost effective. A good tuning pedal costs $100 and you can't reprogram it ;). If people came to this project with the intention of just building a chromatic tuner then this wouldn't be cost effective just as you stated. But for a guitar pedal tuner, this is probably the most cost effective option (as long as expertise and willingness to give up time is there) due to its cost and ability to be customized.</p>

About This Instructable




Bio: Hey! I am an Electrical Engineering major and I love making fun and useful electronics projects. I am also interested in crafts of all sorts ... More »
More by nikoala3:Whipped Coconut Oil Laser Cut Light Fixture Knitted Flower Headband 
Add instructable to: