Instructables
Picture of Arduino Guitar Tuner


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!
 
Remove these adsRemove these ads by Signing Up

Step 1: What you need

Picture of 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





Step 2: Drill

Picture of Drill
guitarspade.jpg
guitardrill1.jpg
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 3: On/Off Switch

Picture of On/Off Switch
guitarswitch4.jpg
guitarswitch5.jpg
guitarswitch6.jpg
guitarswitch7.jpg
Solder the red end of one of your battery snaps to one of the lugs on the switch and solder a red wire to the other lug of the switch.

Feed the snap and wire through the 13/16" hole in your enclosure and fasten it in place with its mounting nut.
1-40 of 64Next »

Very remarkable and ingenious project!!

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 "cl" and, by trying different changes in the sketch, I always got only as far as "inf hz", 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... :(

nikoala3 (author)  lewisallanreed1 month ago

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.

tnguyen148 made it!2 months ago

I made it work. Thank you so much for your tutorial! It was an awesome feeling having it done.

20140609_020301.jpg20140609_020316.jpg20140609_020324.jpg
nikoala3 (author)  tnguyen1481 month ago

Awesome! Looks great! Glad it worked out.

(removed by author or community request)

honestly i don't think my picture can compare to the one in the tutorial in terms of quality. What kind of problem are you having right now?

may i see ur schematic sir, pls?

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.

https://www.facebook.com/photo.php?v=832338783445292&set=vb.100000075330048&type=2&theater&notif_t=video_comment

arimika2 months ago
(removed by author or community request)
nikoala3 (author)  arimika2 months ago

Hi, are you referring to the code for just frequency detection? If so, the serial should be printing the frequency values in Hz. What input values are you referring to?

tnguyen1482 months ago

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!

nikoala3 (author)  tnguyen1482 months ago

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.

feuchtigkeit3 months ago

Do you have the proteus file of the Amplification and offsetting circuit design? I'm little confused to design it on Proteus

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 "inf hz" 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.

20140411_182932.jpg20140411_182904.jpg20140411_183001.jpg
nikoala3 (author)  rickybobbymills4 months ago

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.

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?

nikoala3 (author)  rickybobbymills3 months ago

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.

feuchtigkeit4 months ago

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

nikoala3 (author)  feuchtigkeit4 months ago

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.

evan.stoddard5 months ago

I know the circuit I built is correct but i just get inf hz and clipping if I strum the guitar... so now what...

nikoala3 (author)  evan.stoddard5 months ago

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?

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

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.

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.

nikoala3 (author)  evan.stoddard5 months ago

Yeah I feel ya about the 9v batteries, but I think that could be the problem. Let me know how it goes!

geckomafia4 months ago

Just curious, why the 2 9V batteries? is it possible to do this with only 1 9V?

evan.stoddard5 months ago

You don't happen to have a gerber file to make a pcd for this circuit do you ;)

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

nikoala3 (author)  evan.stoddard5 months ago

Haha sorry no xD

technovative11 months ago
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.

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.

evan.stoddard5 months ago

Can you please include a schematic with this project? I would also like to know all the pin numbers instead of just some of them.

nikoala3 (author)  evan.stoddard5 months ago

Hey! I have included a schematic for the amplify/offset part in step 6. The rest of the soldering/connections should be in steps 9 and 13. Are you referring to pin numbers on the TL082 or the Arduino? Is there a specific part you are confused about?

I'm sorry, should've been a bit more specific. I was referring to the TL082 and actually right after I asked the question I took a better look at the schematic and figured it out. I was just being a bit lazy ;)

nikoala3 (author)  evan.stoddard5 months ago

No worries! Glad you figured it out.

akellyirl9 months ago
Thanks. Nice Project.
If you'd like another idea to get around the problem of reliability of the frequency identification see my post:
http://www.instructables.com/id/Reliable-Frequency-Detection-Using-DSP-Techniques/

Thanks for pointing this out. I haven't taken a good look at the source for your method and the source for this project very much but how easily will it be to integrate your method with her source? I have a decent knowledge in C and can figure it out I was just wondering approx. how much work would need to be put in

samtechpro5 months ago

Its a kids DIY project. There is no circuit diagram to build the circuit. That's a prepared kit. Nothing is created. You're just telling to assemble the parts purchased from market. It may be an advertisement of your guitar tuner company.

KOTSOS56 months ago

Hello, very nice project! an "electronic" question why c1 in the schematic is polarized backwards?

ir_One7 months ago

hi,
you have any sample video? i use other amplifier, its work. but if this tuner to use guitar accoustic. can't run normally, why? maybe you have another source code

1-40 of 64Next »