make your own wearable LED display
featured in the premier issue of CRAFT magazine
click on the image for a movie of the shirt and some other e-textile designs in action.
click here for more information about the shirt I made.
jump to a section:
about LED arrays
washing and wearing
troubleshooting and FAQ
about LED arrays
The naive way to power an array of LEDs would be to allocate one I/O pin of a microcontroller for each LED, tying the anode lead (+) of each LED to the microcontroller, and the cathode lead (-) to ground. This arrangement would quickly become unwieldy, requiring a chip with 100 pins to run a 10 x 10 matrix. Thankfully, we can exploit the essential property of diodes to implement a much more efficient design which will only require 20 pins to run a 10 x 10 array.
Diodes allow current to flow in only one direction. LEDs emit light when current flows through them. By exploiting this property, we can use the design shown below to power N LEDs with square root (N) microcontroller pins. As can be seen from the schematic, the LEDs are arranged in an row-column array with the anode end of each LED attached to a row and the cathode end of each LED attached to a column. Each row and each column is then attached to a microcontroller pin. The microcontroller can then be used to control each LED individually. For example, suppose we want only the LED at row0 column0 (LED R0 C0) turned on. To accomplish this, we first turn all of the LEDs off by setting all of the rows to ground and all of the columns to +5 volts, applying a reverse voltage to all of the LEDs. Then, to turn on LED R0 C0, we set R0 to +5V and C0 to ground. LED R0 C0 is the only LED with current running through it so it will emit light.
A schematic diagram of a row-column LED matrix.
The matrix architecture allows us to control each LED individually, but does not give us complete flexibility. For example, it is impossible to simultaneously turn on only LED R0 C0 and LED R1 C1. To display complex patterns and animations, we exploit the shortcomings of human vision. To make it appear as though LED R0 C0 and LED R1 C1 are on at the same time, we quickly flash first LED R0 C0 and then LED R1 C1 and repeat this cycle for as long as we want the illusion to appear. As long as our eye can't detect the flicker, we perceive only the diagonal line of light.
For more information on LEDs check out:
How LEDs work from Howstuffworks
LEDs from Wikipedia
Now, on with the project...
1. Pick a garment to sew on, a pattern that will let you sew your own garment, or design your own pattern.
2. Design your display. decide on the number of LEDs you want and their general placement. This will depend on the garment you chose and the microcontroller you intend to use as well as how you'd like the display to look. I decided to sew a simple tank top and I chose to place the LEDs evenly across my tank top every 2". Since my tank top is approximately 28" around and 12" tall I needed 84 LEDs. (Note! The pictures here show a different shirt with 140 LEDs spaced 1" apart.)
3. Decide on the microcontroller you want to use. Choose one with an internal oscillator, and make sure you have enough i/o pins to control your matrix. It's a good idea to pick a microcontroller you are familiar with and read the data sheet carefully! It can take some reading to discover that what you thought was a general purpose I/O pin is input only or an open drain output.
4. Decide on the power-source you want to use.
0. If you're sewing your own garment, cut out the pieces and partially or fully assemble them.
1. Package your LEDs into sequins. Get out the crimping beads and surface mount LEDs. Tip an LED on its side. Using a soldering iron with a very clean tip, place the tip of the iron into a bead. Tin the bead with lead-free solder; melt some solder onto the outside of the bead. With the soldering iron, drag the bead up to the LED as is shown in the photo below. When the melted solder touches the LED's contact, the bead will adhere to the LED. Lift the soldering iron out of the bead. If your soldering iron tip is dirty, it will stick to the bead and make the job very difficult. If this is happening you should clean or replace your tip. Once you get the hang of it, this should go pretty fast. You should be able to solder 100 LEDs within an hour.
You may want to take some measures at this stage to distinguish the cathode from the anode lead of each LED. The cathode end is often marked with a green line on the front or back of the surface mount package. To distinguish the two, you can solder a brass crimping bead to the cathode lead and a silver bead to the anode lead for each LED.
2. In a similar way, solder beads to the appropriate leads for your battery and switch so that they can also be sewn on.
A switch sequin.
3. Mark the lines for your LED matrix on your garment. Also mark where you want your microcontroller (IC socket) and power-supply to be. You want a grid of conductive traces where the vertical traces do not touch the horizontal ones. A simple way to do this is to put one trace on one side of the fabric and the other trace on the the flip side of the fabric, utilizing the fabric as a natural insulator. The lines for the vertical traces should be on one side of your garment and the lines for the horizontal traces should be on the other. I marked both sets of lines on both sides to make sure my lines were well-placed. Use a T square to get good right angles and straight lines.
Marking the lines for the display matrix.
4. Sew out your LED matrix. Using conductive thread in the bobbin of a sewing machine will allow you to sew conductive horizontal traces on one side of your garment and conductive vertical traces on the the other side, taking advantage of the fabric as a natural insulator. As you sew, the bobbin thread will remain on the underside of the fabric you are sewing. Make a bobbin of conductive thread for your sewing machine and put it in the machine. Use a spool of non-conductive thread for the top thread.
Sew one trial row-column crossing and make sure your threads are being sufficiently insulated by the fabric. If your fabric is too thin, the bobbin thread may be pulled through the fabric and your crossing traces may short out. If there is contact at your intersections, you will need to take action to correct this. As you are sewing out the traces you should stop the sewing machine just before each intersection, and, without breaking the threads, move your fabric past the intersection and resume sewing. This will insure that the conductive thread stays on the proper side of the fabric at each crossing.
Sew out your vertical traces. Flip your garment over and sew out your horizontal traces. You should stop your matrix stitches at a distance from the IC socket to leave room for the knots you will make while sewing it on by hand. You will want to avoid tying knots in areas where space is limited, as it will be in the traces close to the socket, because these knots can cause shorts.
Sewing out the traces.
Top and bottom views of my partially assembled tank top after I sewed on my traces.
5. Sew on the IC socket that will hold your microcontroller. Trim the pins off of the bottom of the socket and pull off any tape or other material blocking the holes. If necessary, drill out the holes so that a needle can pass through them. Position the socket where you want it on your garment and stitch it in place with conductive thread, sewing traces from each microcontroller socket to the matrix traces you sewed. You want to make sure that the conductive thread makes contact with each socket hole, but also to be careful that no two threads cross. This is a delicate job that requires some patience, but if you're used to doing soldering or any other meticulous work it should be no problem.
Make sure that you tie your knots where there is ample room for them (away from the socket) where they're less likely to cause shorts with neighboring traces. Coat each knot with fabric glue. This will keep knots from fraying and coming untied.
Sewing on the socket: back view.
Sewing on the socket: front view
6. Sew on your LEDs. Attach the cathode end of each LED to a row and the anode end of each LED to a column or vice versa. If you did not take steps during the soldering phase to differentiate the cathode from anode leads, you will have to make the distinction now. The cathode end is often marked with a green line on the front or back of the surface mount package. If you are able to find this marking despite your soldering, you can use it. Otherwise, learn to distinguish the direction from the appearance of face of the LED. Test one by running a current through it for reference. Be careful to use a voltage and current appropriate for your LED.
Whle sewing, take care to make good connections between your thread and each bead, looping the thread through each bead several times, as shown below. The fastest way to sew is to stitch each row and column continuously, not stopping to tie off the thread for each LED. That is, sewing in the cathode end of one LED, and sewing down your row to the next LED cathode without cutting your thread; however, this makes it harder to replace missewn or broken LEDs since you'll have to cut the continuous thread and tie the ends off in the event of a problem. Alternately, you can sew each LED on individually. This will make repairs easier, but your sewing will take much longer. I chose the first option for faster sewing, but did have to replace a few LEDs.
Sewing the LEDs.
7. Test out your circuit. Using a multimeter, make sure none of your traces are shorting out with one another and all of them are leading to the appropriate LED rows and columns. Conductive thread tends to fray and give off small "hairs". Make sure there are no miniscule conducting hairs interfering with any of your traces.
You may also want to verify that your LED matrix is working properly by attaching the leads of a suitable power supply to the rows and columns of your array in turn. Look at the specifications for your LEDs if you're not sure what power supply to use or you may fry all of your LEDs!
Once you've done some thorough testing, glue an insulating backing onto the traces you sewed for your IC socket so that your power supply will be easy to attach and these traces will remain in place without fraying with wear.
8. Sew on your power supply and switch.
Front and back views of my tank top after I sewed on the power supply. Notice the insulating backing that was applied prior to sewing.
9. Glue an insulating backing over your power supply and switch traces so that you will not accidentally turn on your display.
Back view of my tank top with the final insulating backing glued on.