Wednesday, January 19, 2011

Arduino Lilypad - 5x8 LED Jacket (Design and Construction).

LED Jacket with 5x8 array
This post is the first in a 3-post set:  
Arduino Lilypad - 5x8 LED Jacket (Design and Construction)
Arduino Lilypad - 5x8 LED Jacket (Software) 
Arduino Lilypad - 5x8 LED Jacket (Conclusion and thoughts)

This was a concept project.

I work with a First Robotics Team (Team 3662, SnowByte!) as a mentor. Unfortunately, there are usually more kids interested in programming then can really get their hands dirty on the robot.

This project was an experiment in getting some more programming work drummed up that could be done at a high school level (with some mentoring). The idea is that the kids can build stuff they can wear to the FIRST competition, AND practice their programming.

I decided to try my hand at sewable circuit. The idea is to put an LED array on a jacket, and drive it with mininal parts and complexity.

While looking for ideas, I pulled heavily from:
There are also quite a few other wearable DIY projects on youTube and Make that had good ideas.


  I knew I wanted the following:
  • Low cost
  • Low part count
  • Quick to make.
  • Interesting to program.
In order to achieve this, I decided that I would directly drive a LED array from the Arduino pins. According to the documentation, a pin could sink up to 40 mA, but could source more. Because of that, I planned to drive a line of LEDs, and then pull down the ones I wanted to light up.

Looking at the Arduino Lilypad I found that there are 12 usable Digital I/O lines, and 6 Analog lines, which could also be used in a digital mode. This allowed for 18 pins in my project. I wanted to have two push buttons, and one tri-color LED. Each push button took 1 pin, and a tri-color LED took 3 pins. So, I now had (18 - 1 -1 -3 = 13 ) pins remaining.  figuring that 5 bits was enough vertically for an array, I was then left with 8 lines for columns on my array.

Since I had a 5 x 8 pin grid, I needed 40 LEDs. I now had a basic parts list.

I ordered most of my parts from SparkFun.
All-in-all, this order can to about $140 (with shipping, handling, tax, etc ). I bought extra LEDs in case I had any issues with them.

I Still needed a few things though.
 I also used a few around the house items:
  • Scissors
  • Xacto knife (for cutting out the sewing that I messed up)
  • Chalk
  • Ruler
Then I drew out my design in order to make sure that:
  • My Lines crossed as little as possible
  • I could wire up my Tri-color LED to 3 PWM lines.
 I ended up mounting my Arduino lilypad on the back side of the jacket in order to get things to line up correctly. I setup my system so that
  • pins A4, A5, 2, 3, 4 were the Row pins connected to the + side of the LEDs. 
  • Pins A3,A2,A1,A0,13,12,11,10 were my column pins, and connected to the - side of the LEDS. 
  •  Pins 5,6 and 9 are PWM pins, and are connected to the tri-color LED.
  • Pins 7 and 8 are connected to the switches.
The LEDs from Spark fun came with a 100 Ohm resistor already in series, so I didn't need any extra line resistance.

I then drew out an outline of the Arduino on the jacket with chalk, and using the ruler drew the lines where I wanted to sew. ( Forgot to take pictures, sorry :) ).

Over the next two weeks I sewed the LEDs on. In the process, I learned that I suck at sewing. I also wrote a very simple program that turned one LED on at a time, and switch which LEDs was being driven every 1 1/2 seconds. This allowed me to test out the sewing job as soon as I had my first column of LEDs attached.
Arduino Lilypad inside jacket pocket.

Once I had a column of LEDs sewn on and working, I covered the conductive thread with puff paint and let if dry over night. Before I started doing that I had a lot of trouble with lines shorting each other out. 
LED Array (with my poor sewing and puff paint covering the stitching)

I'll cover the software in the next post, however, here's a video of the text scrolling in action.


  1. hello, I don't understand what is tp in the paint. thanks.

    1. It's usually called "Puff Paint" here, it's a type of fabric paint, for use on clothing.

      An example would be :

      I found mine at a thrift store for something like $0.50

    2. how did you use?

    3. in the picture you paint some switches and LED tricolor. where did you use?

    4. I used it because I had trouble with the conductive thread I used shorting out to near by lines. The type of thread I used had a lot of little 'hairs' on in which would connect up with other nearby threads, and cause my circuit to misbehave.

      I used the puff paint like a insulator for a wire. So I put down a number of the threads, covered them in puff paint, and then put down the next set. It allowed me to sew the lines closer together then I could have without it.

      It ended up on the LED's and other circuilt boards, but that was usually just trying to cover the places where I'd sewed the conductive thread to the board for the electrical connection.