Introduction: Touch-Guitar
Hello everyone!
In this Instructable, I will try and explain to you how I made my Touch-Guitar and how you can make yours! The Touch-Guitar is an Arduino-driven guitar which works with Capacitive Touch. Once you touch any of the strings, the Arduino generates sounds through a Wave Shield, making it look like you are an amazing guitar player!
This guitar was made for people who cannot play guitar and do not necessarily feel the need to even learn it. Why? So that those people (including myself) can also feel what it is like to be a rockstar for once!
What you will need for this project:
- An Arduino (I used an Arduino Uno)
- A Capacitive Touch Sensor Breakout (https://www.adafruit.com/products/1602)
- A Wave Shield (https://www.adafruit.com/products/94)
- A small speaker (https://www.adafruit.com/products/1314)
- A 9V battery + clip (https://www.adafruit.com/products/80) (Batteries can be found in a local store)
- A SD Card (Or a Micro-SD Card with an Adapter)
- Audacity (http://audacityteam.org/download/)
- Jumpwires
- Guitar Strings, NOT plastic!! (I used Fazley EGS03, the length is amazing)
- Wood (I used 9MM MDF)
- A Lasercutter or a saw
- Wood Glue
- A Drill and screws, a screwdriver is optional as well
- Skewers
Required skills are:
- Soldering knowledge
- Basic Arduino knowledge (I will provide you with the code and explain it a little)
Alright! Let's get started, shall we?
Step 1: Step 1: Assemble Your Wave Shield
Personally, most of the work on the electronical side of this project went into understanding how Adafruit's Wave Shield worked.
The Wave Shield gets delivered in parts, which means you will have to assemble it by yourself! But no worries, Adafruit is a very user-friendly company and they have published a very easy-to-follow tutorial on their website. Here, you can find how to build it: https://learn.adafruit.com/adafruit-wave-shield-au...
Make sure you check the parts list carefully! There are two kinds of Wave Shields, so you need to know which version you have in oder for it to work :)
The Wave Shield doen NOT include jumpwires and a speaker, you need to get these yourself since you will certainly need those!
Do NOT forget to connect your jumpwires to the DAC! If you don't, the Arduino won't be able to read the SD Card!
Step 2: Step 2: Test the Wave Shield
Click your Shield onto your Arduino. Now you have assembled the Wave Shield, you should totally test if it even works at all. What you will need for that, is Adafruit's WaveHC Library.
Download the Library over here: https://github.com/adafruit/WaveHC
Before we take a look at the Library, make sure your SD Card had been formatted correctly. The Arduino SD library supports FAT16 and FAT32 formats, so make sure you use either one of those.
Now, drag and drop the WaveHC folder into the libraries folder of your Arduino IDE and open the dap_hc.pde file. This is a simple digital audio player and helps you understand the basics of how the shield works. We will make a few changes to it later, but first follow Adafruit's explanation of the code to help you understand it a little: https://learn.adafruit.com/adafruit-wave-shield-au...
Once you have done that, you can either take any of the audio files from the example code that was included with the library, or you can use your own! If you want to use your own files, follow this guide to prepare your files the right way: https://learn.adafruit.com/adafruit-wave-shield-au...
The Wave Shield is very strict when it comes to playing audio files. If your file does not have the right format, it will refuse to play it. Follow that guide carefully!
I personally used Audacity, but any other tool described on the page I linked will work. Audacity's guide is a bit old, so I am willing to explain how it works if you send me a message :)
Upload your audio files to your SD Card and plug it into the Wave Shield. Solder two jumpwires onto your speaker and connect it to the Wave Shield and upload the code to your Arduino. If everything you have done so far is right, the Arduino should now be playing the audio you uploaded.
Attachments
Step 3: Step 3: Setting Up the Capacitive Sensors
Alright! Now we got the Wave Shield to work, let's move on to the other crucial part of this project: Detecting touch. Solder the parts as described over here: https://learn.adafruit.com/adafruit-cap1188-breako...
Download the CAP1188 Library and follow the "Run Test Sketch" section: https://learn.adafruit.com/adafruit-cap1188-breako...
Then solder your guitar strings on the pins opposite to L1 'til L6 and run the Test Sketch again to see if you get the same result. If you don't, check your wiring carefully and make sure none of them touch each other! This is a very sensitive Breakout and anything capacitive that touches it, will be read!
Step 4: Step 4: Combine the Wave Shield and Capacitive Sensor
Now, all you need to do is connect your Capacitive Breakout to your Wave Shield, using the same method as when you connected the Capacitive Breakout to your regular Arduino.
Next, we will talk about the code!
Step 5: Step 5: Understanding the Code
Alright! Let's have a look at the code you'll need!
Go here and download the ZIP: https://github.com/Phariam/Touch-Guitar.git
Open the Touch-Guitar_Code.ino file and scroll all the way down until you find the part shownn in the image (or press CTRL + F and search for "//THIS IS WHERE THE MAGIC HAPPENS")
I basically explained the code in the comments, but I'll do it once more:
The volumeval is a variable which defines the volume of the WAV-file the Wave Shield is playing. 12 means the volume is on its minimum (so you won't hear anything) and 0 means max volume. What happens here is that when a string is NOT touched, the volumeval gets increased, which means the volume becomes lower and eventually lowest. When a string IS touched, the volumeval is set to 0, meaning it's set to max volume and you hear the audio playing.
The volumedelay is a variable which defines how long the volume stays on its max before fading away again. It is now set to 200 milliseconds and can be changed to any value you'd like.
Last, but definitely not least, is the pary where you find "playfile("NONSTOP.WAV");". This is where you put the name of the audio file you want to play. Simply replace NONSTOP with the name of your file and it should work.
This is all you basically need to know about the code! Well done!
Step 6: Step 6: Crafting
Now you got the Arduino part of the guitar to work, it's time to actually build the guitar itself! You can either think of your own design, or download my patterns from here: http://studenthome.hku.nl/~ilona.evers/documents/Y...
I did edit my patterns a little during the process. For example, I made a hole in the RoundTop file to make room for the speaker. I also found out my Arduino did not fit into my guitar, so be sure to measuer that before assembling it all to avoid that mistake!
You can see some process pictures of my guitar over here :)
Step 7: Step 7: Securing the Strings
If you want to assign different audio files to different strings in the future, it's crucial that the strings won't touch each other. To prevent this, you could string perler beads around them or any other kind of material which keeps the strings away from each other!
Step 8: Step 8: How I Made the Frets
The frets were made by cutting plain ol' skewers into small parts. Don't forget to put some varnish onto them to prevent them from spalling!
If, by chance, you are using my design for this project, then you can use these measurements for the placement of the frets. The locations are all calculated from point zero (the thinnest part of the neck), over a neck of 75 centimeters:
0 - 4,2 - 8,2 - 11,4 - 15,5 - 18,8 - 22 - 25 - 27,7 - 30,4 - 32,4 - 35,3 - 37,5 - 39,6 - 41,6 - 43,5 - 45,2 - 46,9 - 48,5 - 50 - 51,4 - 52,7 - 54 - 55,1 - 56,2
Step 9: Step 9: a Guitar Strap, Maybe?
This is not really crucial for gettign the project to work, but as a designer it is crucial to think of User Experience while making a product or service.
In this case, people were scared to hold the guitar because they thought they might break it in one way or another. They also found the product hard to hold, that's why I decided to attach a guitar strap to it.
Well, not a real guitar strap in this case. I used a straf from an old shoulder bag, it worked perfectly!
Step 10: Step 10: Rock!!
The last step is to enjoy what you've created!
I hope this Instructable was in some way helpful to you! Thank you for taking your time to follow this!
Good luck!