The original idea for the LED T-Shirt was inspired by things like TShirtOS from CuteCircuit and Ballantine's, Cho Jung Nam's LED T-Shirt shown here, as well as all of the cool wearable projects shown off at Adafruit.
Here's a checklist of the things I need out of this project:
- First, I need a cool t-shirt that I can wear to conventions, parties, and other geek events. :-)
- The actual electronics will be on one shirt worn under other stuff. That way I can use a white t-shirt or a black t-shirt or even a printed t-shirt over it that allows the lights to shine through from underneath. I could even wear a hoodie or a dress shirt over the LEDs if I wanted to.)
- I need to be able to control the animations/colors/effects on the shirt from my Android phone.)
- The design needs to be modular, so I can replace, add, or remove individual strips of LEDs without cutting or desoldering anything. I also need to be able to replace controller boards, batteries, etc. as needed. Being able to reconfigure the layout of the LEDs would also be useful.)
- I'll want to be able to add other sensors and/or devices to the project at a later date.)
- Finally, and obviously, it needs to be completely portable and able to run for several hours at a time.)
Given what I want, my previous experience, and all of the other videos, tutorials, and blog posts I've been through, I came up with the following plan.NeoPixels from Adafruit which are WS2812 LED lights with controllers right in the LED. In this case they are in strips of 60 'pixels' per meter. Each LED is individually addressable and can be set to any one of 16,777,216 colors.
FadeCandy controller board and server system, also from Adafruit. The FadeCandy can connect to virtually any computer via USB and can handle up to 512 NeoPixels with dithering and color correction built in. It makes it very easy to control a large number of LEDs.
Raspberry Pi Zero W!! Bluetooth and WiFi are both built in to the new tiny little computer. And it's only $10! The Pi will be controlling the FadeCandy/NeoPixel set up using Processing and/or Python code. The finished code will depend on my being able to get Bluetooth working in Processing and/or being able to get it working in Processing's Python mode. I already have Bluetooth working in straight Python, but it's much easier to code the graphics stuff I want to do in Processing. Using the FadeCandy and Processing on the Pi will make it easy to display images, videos, and algorithmic animations on the finished display.
Since a single FadeCandy can control up to 512 LEDs, and I only want to use one, I decided on a 20 x 24 LED array for a total of 480 LEDS which translates into 60 LEDs on each of the 8 FadeCandy pins. The FadeCandy software makes that easy to map to my 20 x 24 display.
Finally, to control the whole thing, I'll be using my Android phone connected to the Pi over Bluetooth. I'm not an Android or Java coder, so I found an easy way to build the control app using Apache Cordova. Since I've a great deal of experience building web applications, this will be super easy for me.
In terms of power, it's time for a little simple math. Each NeoPixel draws up to 60 milliamps at maximum brightness of all three colors (red + green + blue = white). For 480 Neopixels that's 480 X 60mA or 28,800mA or 28Amps. That's a LOT of power. Since I know I will never have EVERY LED lit to full brightness, I can reduce this number. Adafruit recommends using 1/3 of that number as a gross estimate of actual power used or 9,600mA. This is still a lot to be pulling for a single battery source. So I will probably use more than one battery to power the LEDs. The Raspberry Pi will have it's own power source.
My previous t-shirt had a smaller array of 320 NeoPixels. I ran that with a single Lithium Ion Battery Pack at 3.7V 6600mAh. I had the maximum LED brightness coded so that they would never go above 1/2 brightness. So using Adafruit's recommendations, 320 X 20mA = 6,400mA / 2 (my maximum) = 3,200mA. So theoretically, my 320 LEDs should have been able to run for 2 hours on that single battery. In real life, I got 3-4 hours out of it. My animations were simple and I often used static images as well so no more than 3/4 of those pixels were lit at any one time and more often only 1/4 of them were.
In my Spirit Hood project I used the same battery to power a set of 224 Neopixels without any brightness limit. That project was running for a good 6 hours with no noticeable dip in brightness. In that case the animations frequently lit the entire string in a rainbow of colors.
Because I want to try for a good 6 hour run, I'll wire the initial system to use 4 batteries to power the LED strips in the new project. 120 LEDs X 20mA = 2,400mA / 2 = 1,200mA. Maybe 5-6 hours using the 6,600mAH batteries. It's not going to be an optimal solution, but it should be workable. I'll test it with 4 batteries and maybe reduce it to 2 depending on the results I get. I just need to make sure I wire everything correctly.
Speaking of that, here is my initial layout/wiring plan.
I've got 24 strips of 20 LEDs. A set of 3 of these strips will be wired together and controlled through a single pin pair from the FadeCandy. One pin is for data and the other for ground. I'll have 8 such groups of 3 strips. Each group of 3 is arranged in a zig-zag pattern. You can see the arrows at the ends of each strip in my diagram showing the direction of data flow. Because there is some voltage loss along the LED strip, I've decided to apply power to one end of the strip and ground to the other. This should provide the same amount of current to each pixel and avoid pixels dimming at the end of the strip if power and ground were applied to the same end. So each battery will power two of the 60 LED strip groups.
Next up is putting all this hardware together.
Please keep in mind that I am NOT an electrical engineer. I'm a geek hobbyist maker pushing himself to learn new things. Everything I'm doing here I've figured out through all of those videos, blog posts, tutorials and trial and error experiments I mentioned earlier. If you know of a better way to accomplish what I want to do, PLEASE feel free to share. K? Thx!