confused about Leah wearable display how can i use a lilypad with 135 LEDs

Hello everyone, I'm new to e-textiles but i'm hook. I am trying to make a skirt with 135 SMD 5050 white. the skirt is this shape /\ i don't know if i have to put my LEDs vertical or horizontal. the skirt has a sheer glitter fabric on top of satin fabric and the glitter looks like rain drops so, i want my LEDs to look like its raining, then look stop at the bottom like when rain drops to the floor and then have all the lights at the bottom maybe the last 3 or 4 rows light up like crazy. The young man that helped me with my other 2 codes doesn't work where I got my supplies anymore and i'm stuck. Sparkfun suggested i come here to get help. this is for a fundraiser for dogs and i don't know what to do now. my confusion is that i was told that i can't use the Lilypad Arduino with 135 LEDs but, Leah Buechley states on the page with the tutorial for the wearable display that to forget about the ugly AVR microcontroller and to use the lilypad, so can anyone tell me how can i use it? she used 164 LEDs and she didn't have resisters, i'm so confused. please help me. here is the link to her pagehttp://web.media.mit.edu/~leah/grad_work/diy/diy_tank.html

The Lillypad, like the regular Arduino UNO, has 20 data 'pins' (actually more like petals) numbered 0-13 and A0-A5. That would allow you to directly control a 10x10 matrix (100 LEDs) or 9x11 matrix (99 LEDs) or 8x12 matrix (96 LEDs). If I am reading the LED Tank Top sketch correctly the display is 6x14 (84 LEDs) not 164. Perhaps the front and back of the shirt show the same pattern? To get more than 100 LEDs you have to pull some tricks.

One trick is called Charlieplexing which uses the fact that LED's only light in one direction to connect more LEDs than pins. A good example is the "Lots of Lights" (LoL) Shield. It uses only 12 data pins to control a 9x14 matrix (126 LEDs).

Another trick is to use one or more shift registers to expand the number of Arduino pins.

I think if you get something like this
http://www.ebay.com/itm/1M-60LED-WS2812-5050-WS2811-Individually-Addressable-LED-Strip-Mini-Controller-/261201399411?pt=US_Car_Lighting&hash=item3cd0d10e73
and layout your strips vertically, you can control the LEDs individually and make them drip down the skirt with commands that are daisy chained to all the devices.

WS2811-preliminary.pdf (320 KB)

Thank you all so much for your reply, i did see where Leah had 84 LEDs but she does say she had more this is from her page, 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.) ok so how could she do that? about the addressable LED strip on ebay, the problem with those lights is the weight, My project is for pet and so i need to keep in mind of weight. The surface mount 5050 LEDs are great. I have soldered all of the crimp beads to them and they are so light that not even with 135 added any weight to the skirt. what does she mean by this? and the other question is below this one.
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.

I like this idea,
but how would i do this? One trick is called Charlieplexing which uses the fact that LED's only light in one direction to connect more LEDs than pins. A good example is the "Lots of Lights" (LoL) Shield. It uses only 12 data pins to control a 9x14 matrix (126 LEDs).

Another trick is to use one or more shift registers to expand the number of Arduino pins
I can put all of my LEDs in parallel, but do i have to have the same amount on each row or can i still have my LEDs going in the shape of my skirt, that is shaped like this? /\ Im sorry for all the questions but I have really learned what i know from asking and then doing what I'm told by others who have done it. Thank You for all your explanations.

28" around and 12" tall - LED strips are very light, if your pet doesn't mind putting the tank top on the weight of a few LED strips will not be noticeablle.
The 12V battery pack to drive the LEDs will weigh more.
One option for you is to wire the LEDs in a 9x9 array.
9 output pins with current limit resistors from a 20 IO pin arduino will drive the rows of anodes high.
9 output pins from the arduino will drive the columns of cathodes low.
To run the matrix from 5V and without using any external hardware (i.e. shift register), you will only drive 1 anode high and 1 cathode low at a time to turn on each LED.
If the ontime for each LED is limited to 500uS, then the entire matrix can appear to be on all together thru Persistence of Vision (POV):
(1 frame/81 LEDs) * (1sec/24 frames) = ~514uS/LED.
That leaves the Rx/Tx pins free to do other stuff, like downloading new test code.
So your code can either drive 1 anode line, and cycle thru the 9 cathodes, or it can drive 1 cathode and cycle thru the 9 anodes. Either sequence will result in just 1 LED being on at a time.
I don't know which particular Lilypad supports all the to allow this. We have a protosnap and it doesn't make all 20 IO pins available.
I have some 328 SMD boards which are small and could do this also.
http://www.crossroadsfencing.com/BobuinoRev17

gdgarced:
I did see where Leah had 84 LEDs but she does say she had more. This is from her page: "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.)".

OK, so how could she do that?

This page describes the 140-LED garment:

http://web.media.mit.edu/~leah/grad_work/projects/LED_clothing/tank.html

She says she used "a 40-pin microcontroller" but did not say what make or model. I don't know if any of AVR ATmega processors available in 40-pin DIP packages are Arduino compatible. Perhaps she used a different processor family, like PIC. Her matrix is 7x20 so she probably used 27 pins.

With the 20 pins of the Lillypad you will be limited to 100 LEDs unless you use the complicated Charlieplexing wiring (132 LEDs w/12 pins, 380 LEDs w/20 pins) or add some hardware to get additional output pins or power.

I don't know if any of AVR ATmega processors available in 40-pin DIP packages are Arduino compatible.

Really? After all my discussion of '1284 chips??

CrossRoads:

I don't know if any of AVR ATmega processors available in 40-pin DIP packages are Arduino compatible.

Really? After all my discussion of '1284 chips??

I don't listen, I just talk. :slight_smile:

ManicBug has this page about implementing an Arduino Mega 1284 with a 40-pin DIP: Arduino on ATmega1284P | maniacbug

And I've implemented quite a few Arduino like designs using the maniacbug cores:


Just ordered material for 25 kits of these, for sale at this thread:
http://forum.arduino.cc/index.php?topic=182011.0

Thank You all for trying to help me but, I'm new to electronics and some of this I understand and some of it is unknown. This is only my 3rd lilypad Arduino project. I was giving a link by a professor from the University Of Penn, to two hackerspaces here in philly and i will print this out and see if they can explain it to me like I'm a two year old. I'm meeting with them tomorrow. I haven't gone to school for any of this. I'm just a certified pet fashion designer, who wants to add e -textiles her designs. I have read lots of stuff on line and watched things that others have made on utube and instructables and Ive been buying the maker magazine, even before i got hooked on e-textiles, just cause of all the cool stuff others make. I will be back on Friday and share what i find out at the hackerspaces. Thank You again so much. this really is a great place to get information.

Just came across these in another thread

Like the LEDs/controller chip in the strips I mentioned above, but without the strip material.
Connect them up with whatever wiring you were going to use.

CrossRoads:
Just came across these in another thread
Flora RGB Smart NeoPixel version 2 - Pack of 4 : ID 1260 : $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Like the LEDs/controller chip in the strips I mentioned above, but without the strip material.
Connect them up with whatever wiring you were going to use.

I was just gonna suggest Adafruit. They're doing quite a bit in the "Wearable Electronics" frontier. They even have their own line of Lilypad-inspired Arduino-controlled wearable products. Here's a few links you should explore -

http://learn.adafruit.com/search?q=Wearable

Good luck!