Here it is! The one and only Instructable you will ever need. The Arduino Laser Guitar.
What you will need :
- 10 k Resistors
- Laser Module (Sparkfun.com)
- Light Sensors (Amazon.com)
- Wire (Mine was salvaged from old usb cables)
- On/Off Button (Amazon.com)
- Arduino Uno (Amazon.com)
- Music Instrument Shield (Sparkfun.com)
- Battery Source ( I used a 12v battery pack)
- DC/DC Converter or USB Car Charger
Step 1: Guitar Body
- Decide what shape you want your Guitar to be. Any Guitar shape will work, because there really aren't that many parts that need to go inside of it.
- Pick the material you want to use and draw the shape onto it.
- Next cut out the shape twice - Bottom & Top of the guitar.I found a perfectly fitting metal piece that I ended up using as the guitar neck. Anything will work, because it doesn't have an actual function and no wires will even be inside of it.
- Measure the side of the guitar and cut pieces of wood to fit the angles and screw them together.
- Cover the screws with some wood putty.I used to small pieces of wood to create casings for the lasers / light sensors to sit in. I drilled holes from 2 sides in order to create a "L" shaped hole, through which all the cables are connected to the inside of the Guitar.
- Now that you have the Guitar together, just paint it!
Step 2: The Arduino & Music Instrument Shield
- Solder the headers, which connect the Arduino to the Music Instrument Shield.
- Now upload a sample code and test to make sure everything works. (You will find my code attached)
- Troubleshoot any bad connections.
- Solder 5 wires to Analog Pins 0, 1, 2, 3, 4. These will be used for the 4 laser sensors and the SoftPot Sensor.
- Solder 2 wires to Speaker Output on the Music Instrument Shield. Just as seen in the picture.
- Upload the attached Code. Feel free to change the notes / instrument to whatever you like! (See // Comments)
Step 3: Creating a Power Source
Warning : I recycled as many parts as possible in order to save money. There probably is a way more efficientway to do all of this.
- Connect your 12v battery pack to the Car to USB charger. This will reduce the voltage from 12v to 5v, which is perfect for your Arduino. I also wired mine to a switch, which will later on turn all the electronics off and on.
- The lasers will need a different voltage. This is why I needed the DC/DC Converter. The one I had lets you set it to 2.5v, which is what the lasers need.
- Connect the DC/DC converter to the switch as well as the 12v battery pack.
- The actual battery pack will be held down inside the guitar with velcro.
Step 4: Light Sensors
- Each light sensor is soldered to a 10k resistor and ground. They vary the output voltage from 0 to 5 volts and then the Arduino compares it to the values within the code in order to determine if the sound should play or not.
- Once everything is connected you can play around with my code to make it work in a more well lit room if you want. Just change the Threshold number!
Step 5: Lasers
- Be careful not to look directly into the lasers. They can and will damage your eyes.
- Solder the Lasers directly to the DC / DC converter. Make sure that your Lasers receive the correct amount of voltage, otherwise you might burn them out instantly.
Step 6: Play It!