Hey everyone! It's Christmas, and lately I've been playing around with LEDs and my Arduino a lot. I got this awesome idea of lighting up my upright piano while tinkering with some RGB LED strips. The RGB LEDs emit light that gets reflected off the wall behind the piano, giving a stunning effect. The setup also includes a sound sensor circuit, with the help of which, the RGB LEDs change colour depending on how loud one plays notes on the piano!
Since no one has had such an idea and shared it on the net, I was on my own. Therefore I had a experiment quite a lot. However all my hard work has paid off well; my RGB LED lit piano looks great and compliments the Christmas tree very well indeed!
Here's a video showing how the piano lights look and how they change colour when I play the piano...
Step 1: Project Details...
Difficulty: Medium (installing the sound reactive RGB LED lights on a piano requires some skill)
Cost: For me, when converted it's about $7, because you'll get stuff cheap where I live.
Time: A weekend, 6 hours if you work nonstop.
Stuff You Can Learn From This Instructable:
Step 2: Make The Transistor Circuit...
Transistors amplify the current from the Arduino for the LED strip. I have used 2N2222 Transistors as they can handle upto 600mA. That's only good enough to run a 1m strip bright.
Hence for 2m, we need six transistors (3 for each strip - red, green and blue LEDs). See the above Fritzing diagram and my circuit to make the transistor circuit on a breadboard.
Step 3: Prepare The RGB LED Strip...
For this project you'll need two 1m RGB LED strips, totaling 2m. This way it is easier to mount on the piano. Start with a 1m strip. Solder wires, as shown in the first picture. Then cover it up with insulation tape. You can also put some insulation tape around the wires as shown in the last picture, so that it's easier to handle them when connecting to the breadboard.
Step 4: Prepare The Electret Microphone...
This means figuring out which pon is + and which is "-". Using a continuity tester, find out which terminal of the mic is connected to the outer metal casing. This pin is Ground, and the other is "+".
Solder Wires to Mic:
Solder wires (about 6 inches long) to the mic as shown above. I've used green as ground and yellow as "+".
Step 5: Make The Microphone Amplifier Circuit...
The mic itself gives a very feeble signal, so I have used an op-amp to amplify the signal for the Arduino to read with its analog input.
I have used an LM324 quad opamp, which is an overkill, as we need only one. You can use an LM358 dual opamp - only the power pins are different, the rest of the circuit is the same. Sadly the 741 single opamp didn't work very well.
See the diagram and pictures for the circuit.
Step 6: Connect The Arduino...
You can buy male-to-male jumpers, but I made them myself, using male headers and some ordinary jumper wire. See the 2nd picture. See the above Fritzing diagram and pictures showing how to connect the Arduino to the breadboard circuit.
Step 7: Testing The RGB LED Strip...
Before going ahead, you'll have to first test if the RGB LED Strip and the driver circuit are working. Upload the below sketch to the Arduino.
Note: If you're using a Non-Mega Board (like the Uno), be sure to change the led output pins to PWM compatible pins on your board (Uno - pins 2, 3, 4 will work).
Step 8: Test And Calibrate The Mic Amplifier Circuit...
Testing the amplifier circuit:
This is to see whether the mic amplifier circuit works or not. You can simply connect an LED to the output (pin1) of the opamp and see the change in brightness in response to the sound.
Using an Arduino to test: This is more accurate. Upload the AnalogReadSerial sketch to the Arduino.
(File > Examples > AnalogReadSerial)
Now open Processing and copy the code from below (graph_line.pde). Now run the Processing program. As the Arduino sends the values of the A0 pin via USB, the Processing program will plot those values on a analogvalue - time graph, from 0 to 1023.
When you clap or make some noise, the slope of the graph should correspondingly become higher.
Step 9: Upload The Code To The Arduino Board...
Copy the code from the file below to your Arduino IDE window. Before uploading, note that if you're using a non-mega board, change the led output pins to 2, 3, and 4.
Step 10: Install The RGB LED Lights on the Piano...
Using Double tape and normal sticky tape, stick the 2 RGB led strips to the back of the piano, as shown in the pictures above. Don't worry, the tape won't damage the wood of the piano, and can be easily taken of later. However, do not put too much tape either. The wire connecters for each Strip should accessible from the top of the piano...
Step 11: Connect The LED Strip...
Connect each strip to the Transistor driver circuit on the breadboard, as shown above. You may use the Fritzing diagrams shown in the earlier steps. Basically each channel (R, G, and B) is connected to the collecter of each transistor.
Step 12: Finish!
Now connect the positive wire of the 12v power supply to the "+" wire (green in my case) of each RGB led strip, and also the "Vin" of your Arduino board. The ground wire is connected to the Arduino's ground. (Note: My Arduino's on onboard regulator doesn't work so I had to power it with a USB powerbank).
Now turn on your power supply, and you RGB LED Strip should light up wonderfully behind your piano! Playing anything will change the colour of the lights, depending on how loud you play.
This setup works great for parties, discos, clubs, and in my case, Christmas!!! Of course, you don't need a piano - you can mount these sound reactive LED strips anywhere; your house, table, sofa, bedroom, or your Christmas Tree!!!