Boomstick is a project for creating an animated string of programmable RGB LEDs, powered by a small Arduino, and reactive to music. This guide focuses on one hardware configuration that you can assemble in order to run the Boomstick software. This hardware is a great size for putting into a wearable item such as a robe or spirit hood, or lighting up the length of a portable totem pole. The components include a mic (to pick up music), a knob (to adjust brightness) and a button (to switch animations). The whole unit (including LEDs) is powered from a single micro USB port, which can be plugged into a wall adapter, or a portable USB battery charger.
This project is moderately difficult. You'll need to be comfortable soldering, and have the patience to work with small parts. The total build time is 2+ hours.
Step 1: Components and Tools
- Adafruit Perma-Proto Half-sized Breadboard PCB - $4.50
- Adafruit ItsyBitsy 32u4 - 5V 16MHz - 9.95
- Electret Microphone Amplifier - MAX5566 with Adjustable Gain - $6.95
- USB Micro-B Breakout Board - $1.50
- Breadboard Trim Potentiometer - 10K - $1.25
- Tactile button switch (6mm)
- 10K ohm resistor
- 3-pin JST SM Cables - $1.50
All links are from Adafruit, and I'm including the current price at the time of writing (subject to change!) Total cost should be under $30. You'll also need:
- NeoPixel RGB strip - select according to your project needs, but I find 30LED/m works well for wearables
- Wearable item or similar to put the LEDs in
- Small gauge hookup wire - I find this solid core set from Adafruit works perfectly
- Soldering iron, solder, flux
- Flush diagonal cutters - perfect for trimming excess wire after soldering
- Wire stripper
- Hot glue gun
- Coarse grit sandpaper
I'd recommend picking up a USB battery pack if you are building a wearable. I've had decent run times (6+ hrs with a 60 LED string at full brightness) from an Anker PowerCore 10000.
Step 2: Prepare the PermaProto Board
We want to lay out our components as tightly as possible, and unfortunately this means that we need to cut some of the traces on the PCB, so that different parts of the circuit are not connected to each other.
- Hold the PCB with the text upright, then flip it over top to bottom (so that the left side is still on the left).
- Carefully cut the traces indicated in the picture with the tip of a sharp knife. The three scores in the vertical traces are on #5, 9, and 11.
- You may need to score the trace multiple times, and even scratch at the PCB in order to ensure a clean break. Note that the two horizontal traces at the top are deeper and require more cutting force.
- Optionally, use a multimeter to check that there is no conductivity across each of the trace cuts.
- Optionally, using diagonal flush cutters, cut out the small square shown in the picture. You can do this by cutting each of the 4 sides as deep as you can with the cutter, then flipping the board and cutting from the other side. This hole gives access to the trim potentiometer on the microphone board when we are done.
Step 3: Solder First Set of Wiring
There are any number of ways that the wires and components in this project could be soldered together. However, the approach in this guide has served me well, and has gone through a few iterations. The goal for how the wiring is laid out is for there to be no more than two layers of wires overlapping at any point, so take care to follow the positions and lengths of the wires closely. In each of the pictures for this guide, the wires are color-coded:
- Red indicates a 5V positive wire.
- Yellow indicates a 3V positive wire.
- White indicates a signal or data wire.
- Black indicates a ground wire.
Some care is needed to prepare and solder the wires. This is my typical process:
- Cut the approximate length of wire that is needed.
- Strip one end - length isn't too important, as you'll trim the excess afterwards.
- Insert the stripped wire through the first hole, and lay down the wire in its final position.
- Score the insulation directly over the second hole with your thumbnail.
- Remove the wire, and strip the other end at the location of the thumbnail score.
- Re-insert the wire, and solder each end.
- Trim the excess.
For this first step, we are going to lay down an initial layer of wiring before we add any components. This will make our lives a little easier later, as some parts will become inaccessible for soldering and trimming.
- Solder in the 10K ohm resistor in the position indicated.
- Solder the additional wires in the approximate positions shown in the picture. Note the additional length and curve in the black/red wires.
- Flip the board over, and double-check the locations of the solder spots.
We are also going to attach the LED connector at this stage. Its data connection will not be accessible once we solder on the Arduino.
- Split the three wires of the connector.
- Hold the connector to the board with your thumb, and place the middle wire as shown, reaching across to trace #10.
- Cut the wire to the appropriate length (leaving a little extra to poke through the hole).
- Strip and tin the wire.
- Solder it into the indicated hole.
Remember to keep trimming excess wire with your diagonal flush cutters as you work!
Step 4: Adding the Arduino
It's time to solder our first component! Note that for the Arduino, microphone, and micro USB breakout, we need to pre-solder pins to each of them. For the Arduino specifically, we do not solder all of the pins. Only a subset are necessary, and it makes our life easier if there are some gaps on one side. Follow the pictures carefully
- In order to solder pins onto components, I find it easiest to push the pins and component together down onto a breadboard before I solder them. This makes sure that the pins are all aligned vertically, and square with the component. Be careful not to poke yourself! It's easiest to push down on the pins with something flat and solid.
- Orient the Arduino as shown in the picture. You can include a full row of pins along the edge starting with BAT/G/USB.
- For the RST/5V/ARef edge, break off 4 pins and 6 pins. The 4 pins go between 5V and A0, and the 6 pins go between A4 and 3V.
- Solder all of the pins one by one, making sure that the Arduino sits perfectly flush with the black plastic.
- Remove it from the breadboard, and check the bottom once more to confirm that the pins look as in the picture.
Now we're ready to solder it to the PCB!
- Position the Arduino as shown in the picture.
- Make sure that the data wire of the LED connector goes underneath the A1/A2/A3 gap.
- Use tape to hold down the component to the PCB if necessary, and solder it to the board from the underside.
- Trim down the excess pins using your diagonal flush cutters. Be careful - this can send the tiny pieces of pin flying at high speed. I'd recommend wearing some kind of glasses, and aiming the board down into the trash, or possibly into your other hand.
Step 5: More Components!
Now we're ready to solder the rest of the components to the PCB.
First, we need to solder an additional wire on the underside of the board. Note the yellow wire on the right side of the first picture!
Once that is done, and the excess trimmed, it's time for the microphone.
- First, solder the three pins to the microphone breakout board. Note that for this component, it's fine (even desirable) for it to lay at an angle to the PCB - note the right hand side of the second picture. The easiest way to achieve this is to solder the pins in while they are pressed into a breadboard, and allow the microphone board to lay angled down to the breadboard.
- Optionally, trim the microphone potentiometer. VERY CAREFULLY use a small screwdriver to rotate the potentiometer clockwise (indicated in the third picture). Note that it's a very delicate component, and can break easily. It will only make a partial revolution, don't force it any further. Trimming the potentiometer clockwise turns the strength of the amplifier down, which makes the microphone less sensitive, and allows for better quality in really loud environments (like a nightclub or music festival). However, note that it will make it harder for the effects to trigger in quieter environments, such as listening to music at home.
- Use a hot glue gun to lay down a blob of glue at the position indicated in the third picture.
- Press the microphone onto the PCB at the position indicated - the pins should be on the second row down, across traces #17-19.
- Flip the PCB over and solder the pins. Trim any excess.
Now, let's do the Micro USB breakout.
- Unlike the microphone, we want the Micro USB board to be square with the pins. This is so that the USB cable comes off parallel from the board when attached, and doesn't interfere with the PCB. Take care to prop it up while soldering the pins, and while soldering it to the board. Again, see the second picture for the final orientation.
- You may again use hot glue to pre-position the breakout in the correct location. The pins should be in the bottom row (NOT the two power rows), across traces #15-19.
- Reinforce the space underneath the board with additional hot glue as needed. This provides much-needed strength, as the port may receive torquing forces from the attached USB cable.
Finally, we need to solder down the button and potentiometer.
- Start with the button. Widen its legs a little, and insert it into the position shown in the picture.
- You can bend the legs inwards on the underside to help hold the button in place.
- Solder each of the legs from the top of the board.
- Now insert the potentiometer as shown. Note that the pins are on the top in the picture.
- Secure it to the board temporarily with some tape, and solder it from the underside of the board.
Step 6: Final Wiring
I'll keep the instructions brief, but we need to finish up the wiring on the underside of the board.
- Solder the black and yellow wires at the top left in the first picture. These provide the range of voltages that the potentiometer will output.
- Solder the black and white wires at the bottom right in the second picture. These provide ground and output wiring for the microphone.
- Confirm that all the wires are present as shown.
We're now done with the underside! You may optionally spot hot glue strategically to hold down the wires and provide protection against shorts - although I usually don't bother.
Step 7: Wiring the LED Connector Power
The LED connector needs to draw power directly from the USB input. Let's get that soldered in place now.
- Hold the connector down onto the board with your thumb, in its final location (see picture 2).
- We are going to strip a tiny length (1-2mm) of wire and solder that directly to the top of the existing solder joints in the second from bottom row.
- Trim and strip each of the two wires accordingly. As shown in the first picture, the bottom wire should attach to the 5V joint, and the top wire should attach to the GND.
- Tin both of the stripped parts of the wire.
- Solder them carefully to the existing solder joints. Make sure the 5V wire does not connect to the trace to the left of it, as this carries a 3.3V signal, and doing so could kill your Arduino. It's recommended to check that there is no conductivity between the two traces with a multimeter, before you power on the board.
- Hot glue the LED connector down firmly to the board, and reinforce it with plenty of glue.
Confirm that your board looks like the photo!
Step 8: Connecting to the Board
There are two primary ways that you will connect to the board.
- For programming the Arduino, connect to the USB port directly on it (picture 1).
- For running LEDs, connect to the USB port at the bottom, and hook up the LEDs (picture 2).
Step 9: Finishing Touches
The components are laid out as compact as possible, so some of the PCB remains empty. You can carefully cut this away as shown in the picture. I'm not sure of the best way to do this exactly - I use some heavy duty wire cutters, but you could probably also use a hacksaw if you were careful. Cutting across the existing holes makes it a little easier.
Once you've cut away the excess, I'd strongly recommend sanding down the edges and corners with some coarse grit sandpaper, as the PCB can be quite sharp.
This whole unit can be wrapped in some wide heatshrink tape with holes cut to access the controls and ports.
Check out the brief guide in the next step for loading the software onto the device.
Step 10: Software Setup
We are going to load the Boomstick software onto the ItsyBitsy board using the Arduino IDE. Adafruit has a good guide for getting set up with the IDE and appropriate configuration for the board. Follow it (including the Using with Arduino IDE step), then come back to these instructions!
Boomstick uses a couple of libraries that we need to download:
- Open the Arduino IDE.
- Open the menu option Sketch -> Include Library -> Manage Libraries.
- Search for FastLED and install the latest v3.x available.
- Open the sketchbook folder (on Windows, it's under Documents\Arduino).
- Download the ffft library ZIP file, and unzip it into a new folder Arduino\libraries\ffft.
Next, let's grab the Boomstick code itself:
- Download the ZIP file, and extract it into Arduino\boomstick.
- Make a copy of the config.h.template file, and name it config.h.
- Open config.h in a text editor, and edit it as you see fit. Most settings can stay at their defaults, but you'll likely want to change the number of LEDs to match your project.
- Go back into the IDE, and select File -> Sketchbook -> boomstick.
- Hit the checkmark Verify button in the toolbar. This will attempt to compile all of the Boomstick code. If you encounter any errors, leave a comment!
Finally, we need to load the code onto the board:
- Make sure the LEDs are not attached to your boomstick hardware.
- Attach a micro USB cable to your computer, and plug it into the port on the ItsyBitsy board.
- Make sure that you have selected the appropriate board type (Adafruit ItsyBitsy 32u4 5V 16MHz) and port (varies by computer) in the Tools menu.
- In the IDE, hit the Upload button in the toolbar.
- Assuming everything goes well, the light on the ItsyBitsy will flash at a couple of different speeds, then go out. The IDE should say that the upload was successful!
- You're good to go! Unplug from the computer, plug in your LED strip, and connect USB power!
In the case that the upload fails, try the following:
- Double-check the port that you have selected, and possibly try some different ports.
- There is a small Reset button on the ItsyBitsy. Hit Upload in the IDE, and as soon as it says that compilation is successful (and it's about to start uploading), double-tap the Reset button quickly. This forces the board into download mode. This should almost always result in a successful upload, assuming that you have the correct port.