I'm in a radical marching band called Brass Your Heart, and I wanted to make our instruments light up when we play them. I started this project by making one for my friend who plays a marching baritone. Below is a mostly step by step process for how I made them using: sewable neopixels, conductive thread, snaps, a Gemma M0, and an electret microphone.
Step One:
The diameter of the baritone measured 26 inches, so I used tailor's chalk to draw the outer circle you see here. Then I drew another circle, about an inch in for the lights, so that the neopixels and the conductive thread is far away from the metal of the instrument. I also make 8 markings where the neopixels would go and started to sew them into position with regular black thread.
Step Two:
Then I finished sewing all the neopixels to their marks. I made sure that each was positioned so that the output of the preceding neopixel faced the input of the next one (made all the arrows follow the same direction). I also went ahead and sewed the Gemma M0 to the underside of the fabric. It might be extra unnecessary work sewing everything in with regular thread first, but I like to see where everything will be & in position, before I get out the conductive thread.
Step Three:
Then I sewed the connections between the input & output of each neopixel using conductive thread. I used Becky Stern's tip (and many of her tips throughout this - clear nail polish FTW) to start the thread between each neopixel, sew to one, and then back to the other and then meet back in the middle to keep the knot far away from each neopixel. I then used the polish to seal in the knots.
Step Four:
Next I needed to solder the snaps to the Gemma M0 (the Ground, VOUT, and D0 pins). I like to do this because the snaps are easy to sew into the fabric, and I prefer sewing them instead of the Gemma. It also makes the Gemma easily removable.
Step Five:
Then, using conductive thread, I sewed the other half of the snap to the fabric, and connected the neopixels. I ran thread from the D0 pin to the first neopixel input. I also ran the ground pin to the ground of the first neopixel (and then each one after). I then ran the VOUT pin to the positive side of the neopixel (and each after).
Step Six:
Now that sewing the components was complete, I needed to sew the fabric so it would hug the bell of the baritone (think shower cap). I took the fabric out of the hoop and drew two large circles outside of the pixels. These lines marked where I would sew a pouch for the elastic strap. My husband sewed it for me (thanks John!), & then it was ready to insert the elastic strap.
Step Seven:
Now it's time to add sound reactivity! I used solid core wire. I wanted to braid the wire so it would be easy to deal with later, but only had blue wire. In order to avoid confusion, I marked the top and bottom of wire with sharpie, and another with whiteout. Then I soldered them to the mic, and then soldered the other ends to the Gemma using pin A1.
Step Eight:
Then I put in the code to make the project work. I used the below code (Im still super new to coding, so thanks adafruit and chat GPT!). Brass Your Heart's colors are purple, so the code makes them purple. Since brass instruments are loud, I also wanted the sound to only turn on when the horn made noise vs ambient noise/talking. So I made the threshold pretty big.
#include <Adafruit_NeoPixel.h> #define PIN 0 // Pin where Neopixel is connected on Gemma M0 #define NUMPIXELS 8 // Number of Neopixels in the ring #define MIC_PIN A1 // Pin where electret microphone is connected on Gemma M0 #define SOUND_THRESHOLD 620 // Adjust the threshold based on your environment Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); void setup() { pixels.begin(); pixels.setBrightness(50); // Set the initial brightness level (adjust as needed) pixels.show(); // Initialize all pixels to 'off' Serial.begin(9600); } void loop() { // Read the sound level from the microphone uint16_t soundLevel = analogRead(MIC_PIN); // Check if the sound level exceeds the threshold if (soundLevel > SOUND_THRESHOLD) { // Turn on all pixels for (int i = 0; i < NUMPIXELS; i++) { pixels.setPixelColor(i, pixels.Color(80, 0, 80)); // Purple color (adjust as needed) } } else { // Turn off all pixels pixels.setPixelColor(0, pixels.Color(0, 0, 0)); // Set the color of the first pixel to off for (int i = 1; i < NUMPIXELS; i++) { pixels.setPixelColor(i, pixels.Color(0, 0, 0)); // Turn off the rest } } pixels.show(); // Send the updated colors to the Neopixels delay(20); // Adjust the delay as needed for responsiveness }
Step Nine:
Then I connected the mic and connected a 3 x AAA battery pack, and tested things.
Step 10:
I added sticky velcro to the battery and mic so that it could be placed into the bell of the baritone. Then I gave it to my friend and she tested it out!
NEXT TIME:
- I think I'll sew the elastic in, and "shower-cap" it before doing anything else. That way I can ensure the neopixels, etc are centered in the actual finished project a bit easier. This is pretty important so that the conductive thread doesnt touch the metal on the bell's rim.
- The Gemma has an onboard light, so I'll also sew the gemma so that it is centered in the fabric. That, or I could try to turn off the on-board LED on the Gemma. But it's in our band colors so I'll just center it!