LED Ukulele

2,501

14

3

Published

Introduction: LED Ukulele

About: Product designer by day, cat lover by night.

Hi, my name is Elaine. This project combines a lot of things that I love so I hope you enjoy it as well!
The LED ukulele we're building will teach you how to play the four most important chords: C, G, Am, and F, so you don't need any previous ukulele experience to have fun with this one. It's a great project for both Arduino and ukulele beginner. ;) If you're looking for something a little more challenging, try the Shadow Swipe upgrade at the end of this instructable.

Step 1: Hardware

1. A ukulele: I recommend grabbing a $30- 50 instrument off of Amazon or your local music store. We'll be drilling into the fingerboard and head plate so leave your Kamaka's alone. I also suggest a new set of strings while you're at it.

2. 3mm LEDs x11: We'll use a total of 12 LEDs in this project—6 in the fingerboard and 5 in the head plate. Use whatever colors you'd like. (In fact, if you'd like more LEDs on your ukulele, feel free to add as many as your Arduino board will support. There must be 6 LEDs for the fingerboard, but any more is up to you.)

3. Arduino board: I used both a genuine Arduino Uno board and the Sparkfun equivalent. Either one will work. A bigger board with more pins will support more LEDs.

4. Wires and a basic soldering kit: If it's your first time soldering, I recommend this guide before getting started.

Step 2: Code

// Define LED pins

int allPins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
int posPins[] = {8, 9, 10, 11, 12, 13}; int ledPins[] = {2, 3, 4, 5, 6}; int ledNum = 6;int led_C = 8; int led_G1 = 9; int led_G2 = 10; int led_G3 = 11; int led_Am = 12; int led_F2 = 13;

// Define global variable

int timer = 5000;

//Define pin mode

void setup() {
for (int i; i < 13; i++) { pinMode(allPins[i], OUTPUT); } }

// Game state 0: Initial sequence

//Using for loops to send commands to a chain of LEDs

for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH); delay(150); } for (int i; i < 6; i++) { digitalWrite(posPins[i], HIGH); }
delay(2000);

// Game state 1: "C" Chord

// Begin with turning off all LED pins and lighting up only the LED representing the "C" Chord

for (int i; i < 5; i++) {digitalWrite(ledPins[i], LOW);
   delay(150);
  }
for (int i; i < 6; i++) {
   digitalWrite(posPins[i], LOW);
  }
delay(2000);
digitalWrite(led_C, HIGH);
delay(timer);
digitalWrite(led_C, LOW);
for (int i; i < 5; i++) {
   digitalWrite(ledPins[i], HIGH);
   delay(150);
  }

//Game state 2: "G" Chord

for (int i; i < 5; i++) {
   digitalWrite(ledPins[i], LOW);
  }
digitalWrite(led_G1, HIGH);
digitalWrite(led_G2, HIGH);
digitalWrite(led_G3, HIGH);
delay(timer);
digitalWrite(led_G1, LOW);
digitalWrite(led_G2, LOW);
digitalWrite(led_G3, LOW);
for (int i; i < 5; i++) {
   digitalWrite(ledPins[i], HIGH);
delay(150); }

//Game state 3: "Am" Chord

for (int i; i < 5; i++) {
   digitalWrite(ledPins[i], LOW);
  }
digitalWrite(led_Am, HIGH);

delay(timer);

digitalWrite(led_Am, LOW);

for (int i; i < 5; i++) {digitalWrite(ledPins[i], HIGH); delay(150); }

//Game state 4: "F" Chord

for (int i; i < 5; i++) {
digitalWrite(ledPins[i], LOW);
}
digitalWrite(led_Am, HIGH);
digitalWrite(led_F2, HIGH);
delay(timer);
digitalWrite(led_Am, LOW);
digitalWrite(led_F2, LOW);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
delay(150);
}
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
}
delay(150);

// Game state 5: Ening sequence

 for (int i; i < 5; i++) {
digitalWrite(ledPins[i], LOW);
}
delay(150);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
}
delay(150);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], LOW);
}
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
delay(150);
}
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
}
delay(150);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], LOW);
}
delay(150);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], HIGH);
}
delay(150);
for (int i; i < 5; i++) {
digitalWrite(ledPins[i], LOW);
}
delay(1000);
}

Step 3: Hook Up Guide

Hooking up this project is pretty simple. Just make sure you're following pin assignments from the code included above. I recommend hooking the circuit and testing out the code before the next step where we drill and solder all the components in place.

Step 4: Assembly

Now that you've hooked up the circuit and tested the code, we're ready to drill into the ukulele and solder all our LEDs in place!

Part one: Unstring that ukulele and follow the image above. Drill 4mm holes into the fingerboard and the head plate of the ukulele. For the purpose of the circuit, it's probably fine to use LEDs of other sizes, but I've found the 3mm LEDs fit best into the fingerboard of a ukulele. Feel free to experiment—I'd love to see how your variation comes out. :)
Part two: Fit LEDs into corresponding holes of the ukulele (not pictured). Once the LEDs are in place, push the pins apart as anchors to hold them in place.
Part three: Attach Arduino board to the back of the ukulele. Avoid drilling into the ukulele as holes in the body will negatively impact the sound it produces. I ended using a few spots of hot glue to attach my board (a temporary solution so that I can reuse my board for other projects).
Part four: Solder wires according to the hookup guide above. Again, if it's your first time soldering, check out this guide first!

Step 5: Finish!

Finally, string up your ukulele again, attach the Arduino board to a power source and play away. You'll be surprised how many songs you can now play along with just these four chord. Hope this instructable has been helpful. Please feel free to drop me a comment if you have any questions. Otherwise, Happy playing and hope to hear from you soon! :)

Step 6: Optional: Shadow Swipe Upgrade

Did you know LEDs not only emit light but can also sense light? Inspired this odd little phenomenon, I wanted to upgrade the LED ukulele so that it will not only show you where to put your fingers but also track whether or not you've placed your finger on the correct locations.

HARDWARE

If you're interested in this build, you'll need a few additional components:

1. More LEDs: You'll need at least 6 more LEDs to serve as light sensors. Each LED on the fingerboard will get companion LED sensor.

2. I/O port expander: Depending on what Arduino board you're using, you'll likely need a port expander. I'm using an Arduino Uno board and the Sparkfun SX1509 Port Expander.

CODE

I've introduced a few more elements to the code in order to make it work. I'll break down the basics here, but feel free to download the master_tweak.ino file for the full breakdown:

1. Arrays: A special array is created to store input data from each sensor LED. A small function is called to read input data every 10 milliseconds and the array is updated almost continuously.

2. Game States: While the original build had different stages of the game, here we explicitly code in different game states each with a win condition for the game to move on.

3. LED light sensing: A whole section of the code is dedicated to reading input data from the LED light sensors. I found this tutorial particularly helpful with understanding the mechanics and hooking up the circuit.

HOOKUP GUIDE

I strongly recommend going through the Shadow Swipe tutorial to get the feel of how to hook up the LED light sensing circuit. Instead of hooking up 3 LEDs like the tutorial, this build will have you hook up 6 (See picture#1). The final hook up, if you're also using a port expander should look like picture #2.

ASSEMBLY
Assembling this upgrade is pretty straightforward. Drill an additional hole next to each LED in the fingerboard and insert the LED light sensor. Soldering up everything and you should be ready to go!

This upgrade will take a little longer to figure out, especially hooking up the circuit and soldering all the additional components in place, but the LED ukulele will also be transformed into an interactive game. Let me know how it goes for you! Good luck!

Share

    Recommendations

    • Water Contest

      Water Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest

    3 Discussions

    Nice idea, this would probably be helpfull to a lot of ukelele beginners.

    What a fun and clever way to learn the ukulele :)