/ /INTRODUCTION
The Lilypad Arduino is a microcontroller designed by Leah Buechley for use with fabric. It can be sewn into a shirt, handbag, etc., and used to control LEDs, accelerometers, and other outputs and sensors. The Lilypad is a type of Arduino:
The pins labeled a0 to a5 are analog in. The other pins (with the exception of +V, -, tx, and rx) are digital I/O pins. The Lilypad contains an Atmega168V, so, as per this page, pins 3, 5, 6, 9, 10, and 11 can do analog out (PWM).
Sewing the LilyPad Arduino
The hole on each tab of the LilyPad is large enough for a sewing needle to pass through. You can make both electrical and physical connections with stitching in conductive thread. Sew through the holes several times to insure good contact. Here's a picture showing a sewn LilyPad:
Connecting
Connecting to the computer using an encapsulated FTDI cable. This is what your connection should look like. The green wire goes on the right and the black wire goes on the left:
When working with the lilypad, making coasters will save you from being frustrated with slipping alligator clips:
- Trace the outline of the LilyPad on your foam or other material.

- Cut out your coaster.

- Clip your LilyPad back to your attachment setup.
The alligator clips should now have a nice sturdy grip on the LilyPad, with good electrical contact and no slipping.


- Cut out coasters for LilyPad sensors and actuators.
If you got sensors and actuators to play with, cut coasters for them too. This will allow you to easily use alligator clips to prototype designs.br />
Keep your power supply and LilyPad main board as close to each other as possible in your constructions. If they are too far apart, you are likely to have problems with your LilyPad resetting or just not working at all. Conductive thread has non-trivial resistance. (The 4-ply silver-coated thread from SparkFun that comes with the LilyPad starter kit has about 14 ohms/foot.) Depending on what modules you're using in your construction, your LilyPad can draw up to 50 milliamps (mA) of current, or .05 Amps. Ohm's law says that the voltage drop (the amount of voltage that you lose) across a conductive material is equal to the resistance of the conductive material times the amount of current that is flowing through it.
For example, if your LilyPad is a foot away from the power supply, the total resistance of the contuctive material that attaches your LilyPad to your power supply is about 28 ohms. (14 Ohms in the conductive thread that leads from the negative terminal of the power supply to the negative petal on the LilyPad and 14 Ohms in the conductive thread that ties the positive terminals together). This means we can expect a drop of 1.4 Volts (28 Ohms * .05 Amps.) This means that while 5 Volts is coming out of the power supply, the LilyPad will only be getting 3.6 Volts (5 Volts - 1.4 Volts). Once the voltage at the LilyPad drops below about 3.3 Volts, it will reset. In other words, you don't want the voltage at your LilPad to ever drop below about 3.5 Volts.
If you are experiencing this kind of problem, you want to either decrease the resistance of your traces or decrease the amount of current your design is drawing. To decrease the resistance of your traces, you can stitch over existing traces with another layer of conductive thread (or, even a fine wire if you're desperate). To decrease the amount of current your design is drawing, try not to run several things at once. For example avoid powering a tri-color LED and vibrator motor at the same time if you can.
Also, pay special attention to the stitching at the power supply and at the + and - tabs on the LilyPad. The power supply connection is the most important one that you'll sew in your project. You want to make sure you get excellent contact between the tabs on the power supply and your conductive thread. You also want to do everything you can to keep the power supply from moving around on the fabric. I recommend gluing the power supply in place and then sewing it. If you're sewing it to a thin, delicate, or stretchy fabric, you should glue or sew something underneath the power supply to help prevent it from pulling on the fabric and bouncing around as you move.





It's also crucial that each time you tie a knot, you seal it with fabric glue so that it doesn't come untied.