Introduction: Living Rainbow- an Arduino Controlled Fiber Optic Cape
With Midburn (the Israeli version of Burning Man) coming up, I really wanted to make a unique cape that people would find hypnotic and fascinating - something that would bring them joy. I also wanted to be easily recognizable at night from a distance.
So I decided to create and wear a moving, flowing, colorful rainbow!
This cape is built from fiber optic fibers, connected to an addressable LED strip, which is controlled by a wearable Arduino and powered by a USB power bank. It's inspired by this Jellyfish Skirt guide, from which I learned a lot.
This project brought me a lot of joy, taught me about LEDs and taught me how to work with Arduinos.
Step 1: Materials & Tools
Materials (~212$ including a power bank)
- 2 Black or White Fiber Optic Fabric (~$90, I used the black fabric)
- Adafruit NeoPixel RGB LED Strip 60 LED-1m ($33!)
- Adafruit Flora (~$14) or Gemma($12)
- 100 5 millimeter Screws Anchors - like these: (~$7, I used gray ones)
- Zip ties (~$6)
- A 15000 mah+ with around 2-ampere output power supply (This provides ~10 hours of operation time), I used this one (~$40 if you don't already have one)
- Super Glue ($3.50)
- 2 pin JST connector (If you are using the Flora, Gemma can draw power from USB directly- I'll explain below)
- 1 USB cable
- Some (1.5 meters should be enough) stranded copper cable/wires for soldering the led strip to the Arduino(better have 3 colors- for the +, -, and data)
- Black, fiber reinforced duct tape (~$17)
- invisible duct tape (~$2)
- Capacitor ($0.35 optional but recommended)
- Resistor ($0.75 optional but recommended)
- Soldering iron
- Wire Cutter
- Computer + USB cable
Step 2: Addressable RGB LED Strip
These LED strips have 60 RGB LEDs per meter, and you can control each LED individually. This is a digitally-addressable type of LED strip. You can set the color of each LED's red, green and blue component separately. You have 3 wires going across the strip, 5V(stands for 5 volts), GND(stands for ground) and Din(stands for data in- that's the pin you need to use in the Arduino code in order to control the LEDs). Afterward, you solder the Arduino to the copper pads and after uploading the code, you'll be good to go. You need 5V/2A ( 5 volts 2 amper) power supply to drive this one-meter strip.
Notice the arrows on the strip. They indicate the direction in which the data travels. It is important to indicate the beginning and end of the strip - the cut edge with the arrow pointing away from you is the beginning. This side needs to be connected to the data pin of the micro controller. The power cables can be connected anywhere along the strip. Before you use the LED strip, make sure to test that all of the LEDs are working. These LEDs won't light up without the micro controller sending instructions. So just connecting them to a power supply won't do anything except make you worried that they are broken (see the step about uploading the code).
Step 3: Microcontroller
For this project, i've used the Adafruit Flora.
Powering the Flora
The Flora must be powered using the JST connector. At first, I couldn't really believe that I couldn't use the micro USB port on the Flora to power it, so I tried. It does light up for a while, but with so many LEDs, the Flora will warm up really quickly so it's not good. Believe me when I say: don't try this at home :P.
So I ordered the mentioned JST connector and soldered its wires to a normal USB cable that I then connected to the battery pack (there are instructions in one of the next steps).
On the other hand, I have used the Adafruit Gemma for a smaller project and it can be powered using the micro USB port, so you don't need the JST connector (I'm not sure it can be used for 60 LEDs simultaneously in that configuration, but I suspect it's OK).
How long will it shine for?
Each NeoPixel is built from 3 tiny LEDs - red, green and blue (RGB). One NeoPixel draws a maximum of 60 mA of current if it is on consistently and all the of the three colors are shining at full brightness (which will give you a 'white' color). We have 60 LEDs, so they will require a maximum of 60*60 = 3,600 mA. A 3600mAh battery can supply 3600mA so if your battery has the capacity of 16000 mAh like my power bank has, the cape would last for 4.4 hours at least. In reality, I never used white colors and I mostly switched between primary and semi-primary colors, so only one or two of the tiny LEDs inside each NeoPixel was on and the cape lasted all night (from 21:00 or 22:00 till dawn). I carried another power bank just in case but I didn't need to use it. (However, the power bank was down to its last line by morning).
Step 4: Creating the USB to JST Cable
Take any USB cable you can safely destroy, and cut off the side that doesn't connect to the power bank.
Expose the red and black wires(your cable may have two wires inside if it's used just for charging, or more if it's also used to pass data), and connect them to the JST wires. Don't forget to put some heat shrink on each wire and a larger one to cover everything up. Solder the wires, heat the heat shrinks, and the cable should be ready.
About Cable Length
I used a really long cable for no reason because the battery pack ended up in the same pocket as the Arduino... I didn't really put much thought into how to carry everything and just stuck it in my pocket. If you do plan on some fancy hidden pockets inside of dresses or something, then make adjustments accordingly.
Connecting to a Wall Charger While Working
Now that you have this cable, you can connect the LED strip to a 2 Amper phone charger to make it shine while working. This will help to check whether the light is flowing through the fiber optics correctly, and it's also fun! You can also use the power bank to start getting a feel for how long it lasts.
Step 5: Uploading the Code to the Arduino
Uploading the code is not complicated but there are many steps involved, like installing the driver that suits your computer's operating system, installing the Arduino development environment, and pressing the onboard reset button at the right moment.
Just follow the instructions and tutorials Adafruit provides here.
I will share some tips that were hard to find:
- If you are using the Gemma and not the Flora, be aware that it does not work with a USB 3 port. That was a problem for me because my Mac only has USB3 ports. Luckily you can use an older USB splitter that will downgrade your port and make the Gemma work properly.
- At the beginning, whenever I tried to upload a new version of the code I disconnected the power from the Flora so that only the USB stayed connected. Otherwise, the Arduino IDE wouldn't succeed in connecting. After a while, I realized that pressing the onboard reset button puts the Flora(and the Gemma) in a boot mode for some seconds and on that mode, it is able to receive code being uploaded to it. So if you get a repeating error line after pressing the upload button try pressing the reset button, and then try again.
I played around with all the demo code I found online and came up with something I liked, feel free to use it. It's not high-class programming because I really had no energy left at that stage but it definitely works. :]
'My' code is here
Step 6: Solder Wires Onto the LED Strip and the Arduino
Important Info and Warnings
Read this article from Adafruit about powering the Flora.
There are two important warnings in the article that I foolishly ignored during this project:
"Adding a 300 to 500 Ohm resistor between your microcontroller's data pin and the data input on the first NeoPixel can help prevent voltage spikes that might otherwise damage your first pixel. Please add one between your micro and NeoPixels!""Before connecting a NeoPixel strip to ANY source of power, we very strongly recommend adding a large capacitor (1000 µF, 6.3V or higher) across the + and – terminals. This prevents the initial onrush of current from damaging the pixels."
My first pixel did eventually get burned, luckily after I arrived home...
So definitely pay attention to this warning :O.
You should integrate this advice to step 6 of my inspiration guide- Fiber Optic Jellyfish Skirt by linawassong
After you have the wires connected properly, it's time to see some shining lights!
So, go ahead and follow Step 15 of the same guide.
At this stage, your LED strip should be showing the patterns specified in my code.
Step 7: Connect the Screw Anchors to the LED Strip
We will use the screw anchors as a way to connect the fibers to the LED strip.
Each anchor will be connected directly above one LED, and will later on hold some fibers straight above the LED so that the light can easily enter the fibers.
- Take one anchor and pass a knife through its middle to make sure both of its sides are not connected other than at the base.
- Remove the little 'wings' it has on the side.
- Cut a piece of the reinforced duct tape and make a cut in it a bit above the middle.
- Insert the anchor into it from the sticky side.
- Put the base of the anchor right over an LED.
- Wrap the tape around and make sure it is held securely.
- Repeat this process 60 times for all LEDs :] (I think it took me 2 or 3 hours).
* The video I've attached here is NOT the right way to connect the fiber to the LED strip. It was just an experiment. I've included it so you can see how the light travels through a test fiber I had and so you'll understand the general flow of things.
Step 8: Sew the Two Fiber Optic Fabrics to Each Other
Step 9: Connect the Fibers to the Strip
The fibers in the cloth are all bunched together into one bundle.
We need to cut that loose and re-bundle the fibers to match the number of LEDs.
So, we have 2 pieces of fabric, and 60 LEDs. Each fabric has something like 200-250 fibers(I couldn't find exactly how many fibers are in each cloth so I made a rough estimate).
So, that's between 6.66 to 8.33 fibers per LED :(
I unscientifically bunched the fibers at packs of 6,7 and 8 in sequence and it turned out OK.
These are the steps (there are pictures of each one):
- Cut the bunched fibers loose.
- Gather a few together and hold them closely so they are kind of like one pipe.
- Use the invisible duct tape to keep them together.
- Cut the edge off so they all start at the same point, keep only a thin layer of duct tape so that the bundle can be inserted smoothly into the screw anchor
- Repeat steps 1-4 till you have 60 bundles ready
Start connecting the bundles to the screw anchors:
- Insert a bundle inside the anchor till you reach the end(touching the LED)
- Close the anchor over the bundle and tighten securely with a zip tie
After you're done, put some super glue on each connection, and also around the base of the anchors.
Step 10: Go Out to a Dark Place and Be Stunning
Place the connected Arduino in some sort of box, and -
Thanks for reading and I hope you'll actually take the time to build my cape, improve it, and wear it proudly!
We rainbows should shine the way through darkness and spread happiness wherever we glow :]
In case you have any questions or if something isn't clear, don't hesitate to ask.