I have always loved glowy stuff, particularly LEDs, and try to incorporate them into anything I can. I always thought it would be cool to make them sound responsive, and I've been playing the bagpipes since about 8th grade, so that was where I decided to go with them. After some thought I figured I would embed them into the ferrules (ornamentation thingys on the pipe parts) and make them light up according to the notes I was playing. I also thought it would be cool to add a button to toggle between different light styles while playing. So I did just that.
This can actually be incorporated into anything. It doesn't have to be done on bagpipes. The microphone can be adjusted to pick up sound from anything, from voice, to instruments, to any regular ol' song. So if you want to follow the idea minus the bagpipes just string along a bunch of LEDs, throw them on whatever you want to, and skip along to the arduino and code part.
Here you can see the LEDs responding to a twenty one pilots song. Granted I adjusted the code to pull out just the strongest frequency and play that one only rather than pull out all the frequencies and play them in different places as different colors at the same time. But it still looks cool to playing to the song.
Below you can see it in action with an actual bagpipe tune, and I change the way the lights display right in the middle of the parts of the tune with that button I was talking about that I put on the back of the chanter. Wait for it when you watch the video... it starts a little into it.
I guess a black background in a dark setting wasn't the best choice because the LED's don't show as well in the video, but it is what it is.
(Tune called "Blue Holes" written by David Duncan from the Freestylers of Piping.)
And an earlier test before I had the reed broken in and the frequencies in the code quite right...
Step 1: Materials, Tools and Skills
Bagpipes - Hopefully you have a set already. It might be costly to purchase a set just to do this if you do not play! But again, you can incorporate sound responsive LEDs into just about anything. So you don't need to do it on bagpipes. If you are not going to put it on bagpipes you probably don't need the mold and cast materials either.
Addressable RGB LED strips - The ones in the picture are cut already, but I bought a meter of the neopixels, 60 to a meter, from adafruit, and used 51 of them.
Teensy 3.1 - This is the arduino, or controller for the LEDs. I used the teensy over other arduinos because I am familiar with it and I like its small size. 3.0 - 3.2 should work the same I believe. You can get one here.
Header pins - I bought these from the local electronics store but adafruit sells these.
I'm sure there are other websites that sell them cheaper though. You need two 14 pin long ones (for the teensy) and a few extra pins. These are the long black bars with silver colored pins running perpendicular through them in the fourth pic. They have already been soldered onto the teensy in this pic, but there is one long standalone one as well.
Jumper pins - I bought these from the local electronics store also. I'm sure you can find them online, but you are on your own here. These are the rectangular block things in the fourth picture, and not necessary, I just like to build my board so that the teensy is not soldered in and can come out if i want to replace it.
Electret Microphone - To 'listen' to the notes being played from the chanter for the teensy to listen to. I used this one from Adafruit.
Breadboard - To have one central place for your arduino brain! Again, the one I used from Adafruit (you only need 1!) The pic has a half size breadboard but I actually used a quarter sized one. I took the pic after I used it :(
1K OHM Resistor - For making sure power goes where it should on the button.
Tactile Button - You only need one. To be able to push to switch the way the lights are displayed. Later I felt like i should have used a switch that had 3 or 4 different stops, rather than coding in what 1 single button will change it to. Maybe one day... Adafruit once again saves the day...
Insulated Quick Disconnects - These are so that you can disconnect the wires where they connect to the drones, chanter, and blowpipe. That way you can still change out reeds and clean the thing. I used ones with 4 wires, but only needed 3, so I cut off the fourth wire. I used 6 sets of them. You can get them here!
Mold Rubber - This is to make molds of the ferrules so that you can cast them in a translucent material so that the LEDs will make them glow! I used Smooth-On Mold Star 15 Slow. It is super flexible without breaking so that you can pull out the awkward shape of the cast ferrules. You can find this stuff on Amazon.Caution should be taken when working with this stuff. Wear gloves, and work in an extremely well ventilated area. A NIOSH mask is suggested.
Clear Casting Resin - (Not shown, I used it and threw it away before I took a pic of it...) To cast your ferrules. This stuff comes out clear if you get the same one I did. I prefered to have it translucent but not transparent, so either you can find one that is not transparent, or you can add some alumina hydrate to your mix, which is what I did. I used Crystal Clear 200 because it has a minimal shrinkage rate, which is ideal for the ferrules to match the originals. You can find it at your local arts store maybe, or maybe on Amazon again. Here is Smooth-On's website...
Caution should be taken when working with this stuff. Wear gloves, and work in an extremely well ventilated area. A NIOSH mask is suggested.
Alumina Hydrate - (Not shown in pics.) It is a white powder. You will need it to mix with the casting resin to make it look white but still emit light (rather than water transparent.) NOTE: it will make your cast setting time double or more. Be patient! You can usually find this stuff at a clay supplier store. A pound should be more than enough.
Electrical Tape - to tape the wires around the drones and to tape up any exposed wires. I chose multicolored tape because I also taped the ends of the quick disconnects with different colors so that I know which connect goes to which.
Electrical Wire - I chose to go with just one color wire (black) to make them as subtle as possible for the wires wiring the LEDs up the drones. (admittedly, I used brown too because I ran out of black.) It makes for determining which wire is hot, ground, and data a bit harder... but I still prefer the subtlety. For all the hidden wires in the bag going to the brain center (teensy) I used red for hot, black for ground, and yellow for data. Guage isn't too big a deal. I believe I used 22 or 24 guage wires.
Battery holder - 2 packs are needed that hold 4 AA batteries each. I purchased mine from the local electronics store but adafruit sells these.
Batteries (and charger) - 8 AA batteries are being used. I opted for rechargeables for two reasons. 1, I only have to buy them once. 2, the micro controller and LEDs run off a certain voltage (5V), and 4 rechargeables are in that voltage range whereas regular batteries go over and will blow the LEDs unless resistors are put in place. I did not put resistors in my setup, so please go with rechargeable batteries, or learn how to put resistors in the power sources. Alternatively you can use a rechargeable battery like in the last image, though in my case I am driving a lot of LEDs so that one does not provide enough power. Hence the 8 AA batteries.
Heat Shrink Tubing - (optional) To cover and hold the wires going up the drones if you like.
Solder Gun and Solder - You need this to solder all the wires, pins, connectors, LEDs and stuff together. Be VERY careful with the solder gun. It is hot and you can burn yourself if you are not careful. Also, some solder has lead in it which is very bad for you! So be sure to work in a well ventilated area.
Clamp - Helped hold the LEDs in place while soldering. I used a soldering alligator clamp. A clamp isn't needed if you don't have one. It just makes it a little easier.
Hot Glue Gun and Sticks - Just to glue down any wires or anything sticking out on the breadboard and to fill drilled holes in the ferrules you will be making. Like the soldering gun, the tip of the glue gun gets hot enough to burn you. Be careful with it and keep all body parts away from the tip so you do not get burned.
Wire cutters/strippers - Self explanatory. But like any cutting tool be careful. It is potentially hazardous if you handle it incorrectly. Keep fingers out of the way when cutting things.
Micro 'B' usb cable and computer - The cable is used to upload code (to control the LEDs) to the teensy from the computer. The computer can be a laptop or a desktop. It doesn't matter.
Dremel - (not shown) to drill the insides of the cast ferrules for the LEDs to sit inside.
Angle Grinder or Sandpaper - (not shown) to smooth out the tops of the cast resin after it is cured.
Basic knowledge in soldering, wiring, and programming is good to have.
Also it would be great if you have experience with mold making, but not required.
I wouldn't call this an expert or difficult instructable, but it is a bit more difficult than a beginner one and a lot of time is involved.
Step 2: Removing Old Ferrules
If the bagpipes are old enough the glue that holds the ferrules to the pipes may be weakened and you can grab the ferrule with one hand and the pipe with the other and twist to break the glue and thread them off. Make sure to grab the pipe right below the ferrule, if you grab it lower you risk cracking your pipes.
In most cases the glue is probably still holding up really well. (It should be! That's what it's there for!)
If this is the case you can bring a pot of water to a boil. BE CAREFUL not to burn yourself! Once boiling 'roll' the ferrule in the boiling water for 2-3 minutes, trying to keep the pipe itself out of the water. This will soften the glue due to the heat, but also expand the ferrule more than the wood, helping to break the seal making the ferrule twist off. After boiling for a few minutes, grab the ferrule with a dry towel and the wood with another so that you do not burn yourself, and twist. It should do the trick, but if it doesn't, let it set for a day or two (so the wood dries out and goes back to its original size) and try again.
You have to get each and every ferrule off of your pipes. For me I had 11 total, and they were all different sizes. So I had to cast each one individually. Hopefully you have a set of pipes that the ferrules are not all different sizes and you can reuse a mold or two.
A NOTE: Boiling the ferrules may make the color of them change slightly. If you look at the second pic, the ferrule still on the pipe has not been boiled, and is slightly more yellow than the one that is off the pipe, which has been boiled, and turned white.
Step 3: Make New LED Ferrules
Now that you've got all your ferrules off, you need to cast them in resin so they will glow from the LEDs inside.
For this whole step it is wise to work in an extremely well ventilated area and wear a NIOSH mask to protect you from the harmful fumes from both the mold rubber and casting resin.
First glue them down onto a smooth dry surface or in a tupperware container. I chose wood glue for no real reason other than that is what I had. Let the glue dry completely. Just make sure that if you use a tupperware container the container is just barely bigger than the ferrule so that you do not use more mold rubber than you need to. If you glue them down on a flat surface you will need to find something to act as a wall that you will also glue down around the ferrule. I used plastic planter pots with the bottoms cut off. Again, make sure they are just barely bigger as to not use too much mold rubber.
Once they are glued and dried, follow the steps on your mold rubber and pour it slowly over the tops until all of the ferrule is completely covered. Make sure there is a little bit more over the top so that your mold does not get too thin.
Then let it sit for at least as long as the directions say.
Once the rubber is set, you can pull it out of the tupperware container or off of the flat surface. wipe off or peel off any glue left over. Carefully pull out your original ferrules and set them aside. Take your rubber molds and flip them so you can now see the hole the ferrules left, and lay them on a flat surface. Time to mix the casting resin.
Follow the instructions on the resin of mixing by weight 9 parts of part B (blue) to 10 parts of part A (yellow) and add to that mixture 9 parts of alumina hydrate. The resin without the alumina hydrate is water clear. We want our cast ferrules to mimic the originals when the LEDs are off, so we are adding alumina hydrate to make them white and translucent, but not transparent. Please note that by adding alumina hydrate it more than doubles the cure time so be patient when curing.
Pour your mixture into each of the rubber molds slowly and carefully as to not get bubbles. Look for the cure time on the resin instructions and double it at least. Even better to let it cure longer because even when they are able to come out of the molds, they are still a little soft and can deform.
Once they cast ferrules are cured, pull them out!
The top parts of the casts may be a little rough after they are done. You may want to flatten them down smooth a bit. I used an angle grinder to grind them flat but you can use sandpaper too if you like.
If you can figure a way to put the LEDs inside the molds when you cast the resin ferrules, that may ultimately be a better idea, but I couldn't get the LEDs to stay in place inside the molds and I couldn't figure out how to do it with the wires already soldered onto them.
If you did not cast the ferrules with the LEDs already inside, you will have to drill the insides of the cast ferrules like I did.
Cut a strip of LEDs and wrap it around inside one of the ferrules. Mark where the LEDs will sit, and drill out those areas with a dremel. The cap of the base drone fit a strip of 7 LEDs, and the other two caps fit a strip of 6 LEDs. The rest of the ferrules fit a strip of 4 LEDs each. You will also have to drill out a little path for the wire to go down out the bottom on the inside. You should be able to see this in the last picture.
Step 4: Putting It Together - Drones and Chanter
DRONES / BLOWPIPE
After you have all the cast ferrules drilled, you need to measure the length between each ferrule for the wires. It is a good idea to give a little bit more wire than the length, and if it is too long you can just wrap it around the drone in a spiral motion to make it fit right. You also need to keep in mind you will want enough wire so that you can pull the drones off still (First pic to get an idea). Making the wire just long enough to pull the drones off is a good idea. The wires between the lowest two ferrules on the drone do not need to extra long, since you cannot pull off a drone here. But here you do need to have the wires cut in half because you still need to get the ferrules on after inserting the LEDs into them.
Then solder the wires onto the LEDs, following the wiring diagram below, and thread the wires through the cast ferrules with the rolled LED strip of 4 inside each ferrule. Try not to burn yourself with the soldering iron! Make sure all your LEDs are going in the right direction (arrows marked on LEDs themselves) and solder the quick disconnects going into the LEDs in the bottom most ferrules on the pipes that go into the stocks on your bag. You can see the quick disconnects in the 4th pic. I also wrapped the quick disconnects in color coded electical wire so that I know which drone/blowpipe is which. Once you get the LEDs inside the ferrule, thread the ferrule back onto the pipes where it goes.
Then you will have to solder the wires together that were originally cut in half between the two bottom most ferrules. This is the 5th pic. You can see that I staggered the cuts so that I do not have to worry about the solder touching each other from the three different wires. After you solder them, twist the ferrules into place and electrical tape the wires on these lower ones all around the drone. (6th pic.) That way they stay in place. These ones do not need to move since there is no drone to pull off here.
Once you have everything in place where you want it fill the holes with hot glue. (7th and 8th pic.) This fills the holes for one, but also helps hold the ferrules in place since they are weakened by the drilling and have only about half of their original threading. BE CAREFUL not to burn yourself with the hot glue gun. It's HOT!
The 9th and 10th pic are just to see the wires wrapped around the drones.
The chanter has the microphone and the tactile button on it. You need wires the length of the chanter from top to bottom for the mic, and about halfway down to where your lower thumb will be for the button. Solder the mic wires to the mic according to the diagram at top, and solder a quick disconnect to the other end of the wires. Then electrical tape the mic to the bottom of the chanter and tape the quick disconnect to the top, making sure the wires run down the side and out of the way of your fingers. Pics 11 and 12 show the mic at the bottom.
The tactile button needs to be soldered in the same way, also with a quick disconnect at the top and also according to the diagram below. Make sure the resistor is close to the button, and bend the button prongs all in one direction so all the wires go the same direction. The 4th prong is not used and can be removed. Then tape down the button to the back where your lower hand thumb would go. See pics 13 and 14 for reference.
Pic 15 is the quick disconnects at the top. If you have one disconnect that has 6 wires that would work too. I only had disconnects that had 4 wires each so I just use 3 of the 4 wires on two different disconnects. It is wise to use opposite ends of the disconnects here if you use two so that you cannot accidentally get them switched when you connect them.
The last pic is the finished chanter.
Step 5: Putting It Together - Brain Center and Teensy
Now we need to make the brain center. Check the diagram above (or below, it is the same one) for which wires go to what on the teensy.
Solder the header pins onto the teensy. I soldered jumper pins onto the breadboard where the teensy will go so that ultimately I can remove the teensy easily if I need to replace it, but you can solder the teensy directly to the breadboard if you like.
Measure the distance that each wire will need to travel from the back of the bag (because this is ultimately where we will hide the brain center) to where it will come out to its respective stock and cut wires for that length, giving a little extra just in case. If you remove the bag cover from your bagpipes this is easier. Always better to have to much wire rather than not enough. Solder the other end of the quick disconnects to one end of those wires, then the other end of the wires into their respective places on the breadboard, using the wiring diagram to get the wires in the right place.
You should have 6 strings of wires coming out of the breadboard (or 5 if you used only one disconnect for the chanter instead of two.)
Again, I color coded with colored electrical tape each disconnect so I know what goes to what.
We have two battery packs because one is not enough to drive all the LEDs for a very long time. We put them in parallel instead of in series so that we are doubling the amps and not the volts. If we put them in series we would be doubling the volts, which would blow the LEDs, and we wouldn't be getting any more extra power.
We are driving the bass drone and the blowpipe LEDs with one battery pack, and everything else with the other. So the power lines need to be separated for these. The ground wires are shared at the ground rail because we need a shared ground for the data lines to work with each other across all the drones, the blowpipe, and the chanter.
Ultimately, if you have a single power source that has enough amps to drive all the LEDs but is still only 5 volts, that would be ideal. I did not have one.
When you have the whole brain center finished with all the wires for the drones, chanter and blowpipe (pics 1-6) you can put your bag cover back on and start feeding the wires through the back of it into their respective stocks inside. (Pic 7.) Pull them all out through the stocks where they should go. (Pics 8-10)
Pic 11 is it finished in the back, you then push this inside the bag cover and it just sits there in the bottom out of the way while you are playing.
We ARE ALMOST DONE!
Step 6: Coding the Teensy
Now to code the teensy. Make sure the teensy brain center is hanging outside the bag cover for ease of use, and plug your usb cable into it. Make sure that you do not have any batteries in the battery packs or at least that the battery packs are OFF before plugging the usb into a computer because if you do this and the battery packs are on you will get a double power source which is bad!
You need to know how to use a teensy and Arduino and if you do not already you can follow the instructions for the teensy HERE .
Adafruit also has arduino tutorials HERE but these are not specific to the teensy.
Once you have your computer ready to upload some code, just upload the file provided below!
In the file I currently have it hard coded so that the button to switch between different lighting styles on push goes in a certain pattern. If you want to change this you can change the numbers in the list labeled "lightStyleNum"
If you need to adjust the frequencies for the notes that is in there also and should be easy to find. One cool thing about this project is that it will keep you honest in keeping your pipes in tune!
Also, the mic has a potentiometer on the back for sensitivity. I would suggest turning it all almost all the way to the right (clockwise) so that it is almost the least sensitive it can be. This is so that it does not pick up any other noise, or pick up the drones. The bagpipes are super loud anyways so you shouldn't have a problem picking them up on the least sensitive setting!
Now you are ready to play! Unplug your cable, insert the batteries, turn on the packs, and start playing!