Introduction: Flexible LED Matrix
Make a lightweight portable attachment to light your backpack, hips, or hang from a wall. This project is a great way to attach lights to yourself at a festival, yet stow them away during the day.
Use the built-in palettes in the FastLED library or program your own favorite colors into these wonderfully beautiful animations. The code was compiled from some of the examples in the FastLED library, which are easy to follow and adjust to your needs.
I like the look of soft diffused lights so I used some craft foam to make the lights easier to look at. You can make any number of adjustments or build additions to the lights or code. Add a light or audio sensor and make your animations responsive to your surroundings!
Step 1: Gather Materials!
You will need the following materials:
- Soldering iron, solder, ventilated workstation, etc. This is what I have at my workstation: helping hands, soldering iron, Hakko Brass Sponge Solder Tip Cleaner, an old wood cutting board, and a nearby fan.
- Perma-proto board
- Strips of LEDs. I used WS2801 lights that I had been gifted. Any LEDs compatible with the FastLED library will work.
- I used a USB power bank, but in using one you'll forfeit the off and on switch.
- A Pro Trinket 5V microcontroller
- A micro-USB cable to connect your trinket to your computer. I recommend an older usb 2.0 cable. If a new one gives you problems, try running your cord through a USB hub.
- Wire - I LOVE this silicone wire from adafruit but you can use any wire you feel comfortable with.
- 1 Large Tactile Momentary Switch button.
- 1 10k Potentiometer
- Fabric to mount lights onto (hint: something without stretch!)
- Fabric to make a pouch - you'll want something that provides nice diffusion, & it doesn't have to be white!
- White craft foam (mainly if you want or need more diffusion)
- Straps - about 6 inches of 3/4" or 1" wide strapping will work
- 2-4 carabiners (use 4 if you want to attach the top and bottom)
- Velcro - about 6 inches of velcro
- Sewing Machine and/or Serger (I highly recommend the affordable Brother 1034D Serger & I'm pretty happy with the Brother Designio DZ300)
- Hot glue or e6000
- Backpack - I used an REI flash 18 pack, which has two ladders of loops on the front. Unfortunately, their current pack is lacking this.
Note: the links I'm providing are for reference. I'm not affiliated or benefiting from any of them. :)
Step 2: Planning
Here are some questions to ask yourself
- How many LEDs do you have?
- Do you want the pixels equidistant?
- Do you want your design to be solid or have some flexibility to it?
- Do you want to create a special design or go for a straight matrix?
I had trouble committing to a design for a while. I only had 43 LEDs to work with and I wanted to use as many pixels as possible. I came up with 4 options to use the most pixels: 6x7, 7x6, 5x8, & 8x5. Since the spacing between each pixel horizontally is not equal to the vertical spacing, each of these dimensions would be slightly different. Before cutting up my matrix, I measured what each of the options would result in.
I landed at eight 5 pixel wide strips, creating a 5x8 matrix. Based upon the measurement of how far each pixel is apart, I positioned the strips vertically.
Step 3: Wire It Up
- Orient your pixels into a zigzag (serpentine) formation on top of a piece of cardboard or construction paper.
- Double check that all of your arrows are pointing in the correct direction. In this case, I started on the top left and traced my way down to the bottom left, using the construction paper to mark my direction.
- Using a small dab of hot glue, glue the LED covers (not the LEDs themselves) in place. The hot glue is temporary and will be peeled off later.
- Cut 1" strips of heat shrink and slide them onto each side of your LED covers.
- Slide a few inches of the strips out onto one side. For each couple of strips you'll connect, tin the pads.
- Cut some small strips of wire to make a little rainbow between each set of pixels. I used orange wire for +, grey for GND, blue for Data, and green for the Clock.
- Work through one side and then onto the other. Remember to double check your wiring to. Using a different color of wire won't mess anything up but it's a good practice to be consistent.
- Remember that the last set of pixels won't need anything going OUT, yet the first set will need a bit of slack. I gave myself enough wire on the first set to make it around the back of the piece.
- I folded my construction paper down, to raise the pixels off the table for this next step. Put a huge glob of E6000 or hot glue onto the end of each strip and let set. Adjust the strip of heat shrink so it's over the end and use a heat gun, hair dryer (what I used!) or lighter to shrink it up. Add some more glue if needed.
Step 4: Prototype Your Board
Start with a breadboard. Use alligator clips to connect everything together.
Connect:
- Data to Pin 5
- Clock to Pin 8
- Button to Pin 11
- Pot to Pin A0
Note: I started prototyping with an Adafruit Feather with Bluetooth but eventually decided against the need for Bluetooth. The final project uses a Pro Trinket.
Step 5: Program Your Board
Start with some example code. I uploaded the FastLED XYmatrix example code to start out. Then I played with the Noise, NoisePlusPalette, and the NoisePlayground example code. Check out how it looks bare, with craft foam on top, and with a few different combinations of diffusion materials on top.
I decided that I liked the NoisePlusPalette & FastLED Button Code the most. I could have done something with an IR remote or Bluetooth, yes, but I decided that I wanted to make it as simple as possible. I added the button to control a handful of colors and modes and a potentiometer to brightness.
Check out my code, which I've posted on codebender:
Step 6: Put It Together
Make your backing. I was super inspired by Becky Stern's Roll-up Video Light Project.
Check out the bargain bin at your craft store (or in your closet)! I didn't buy anything for this project and neither should you. Any fabric can be used to mount the lights onto. I used some thicker flannel to give it some heft and then some black satin fabric on top. I used some thinner transparent fabric to make a cover case, with a flap that can be attached with Velcro.
I initially sewed the pixels on (with black thread) and but then realized the thread was distracting, even under a few layers of diffusion material. I ended up using a small string of e6000 to secure the lights to the fabric and it worked really well.
Solder everything to a perma-proto board and test as you go along.
Trim the edges and cover the back of the board with e6000. Let sit overnight (or the recommended 24 hours)
Cut a piece of white craft foam to fit inside your pouch.
Since I stored the board inside the cover, rather than outside, I burned a small in the cover to reach the potentiometer.
Hook some carabiners onto your loops to attach them to a belt or backpack loops.
Plug in the power and play away!