Step 7: Sew on your LEDs
Sew on the LEDs.
Using the same techniques as for the power supply, sew the LEDs onto your garment. I like to start at the LilyPad main board, and then trace the paths to my LEDs.
I stitched my 12 LEDs in sets of 3. They are connected to petals 5, 6, 7, and 8 on the LilyPad main board, according to my program - but of course you can always change the program to fit your needs. What do I mean when I say that I sew the LEDs in sets? This means that I sew the + petals of each set of LEDs together, so they all light up at the same time. The - petals of all 12 LEDs can be sewn together (or not, depending on your design) - I sewed them in a set of 9 and a set of 3 for convenience.
Again, here, we're sewing from the numerical petals of the LilyPad main board to the + petals of each LED, and we're sewing from the - petal of the LilyPad main board to the - petals of each LED.
Be very careful to avoid shorts here, and remember to seal your knots with nail polish. It's easiest to avoid shorts using the strategy mentioned earlier - tie your knots further away from each other by sewing back along your stitching once you've reached the petals, and tying the knot about an inch away from the petal. Usually, the biggest cause of shorts is the loose cut ends of your knots, so we want to keep these away from each other.
How to handle overlapping traces: What do you do when two of your traces overlap? Here's my way of handling the problem. Since I'm using backstitch, there's thread along both the outside and the inside of the garment throughout the entire conductive trace. When two traces overlap, this results in a short. To prevent overlapping traces from causing a problem, you can use a running stitch at the overlap. Sew one trace on the outside of the garment and the other trace on the inside of the garment at the overlap. This way, the traces should not be touching each other.
Test your LEDs.
Load a test program onto your LilyPad that blinks each of your LED sets to make sure that they all work.
Here's mine:
'int pin5 = 5; // LED connected to digital pin 5
int pin6 = 6; // LED connected to digital pin 5
int pin7 = 7; // LED connected to digital pin 5
int pin8 = 8; // LED connected to digital pin 5
void setup() // run once, when the sketch starts
{
pinMode(pin5, OUTPUT); // sets digital pin 5 to be an output
pinMode(pin6, OUTPUT); // sets digital pin 6 to be an output
pinMode(pin7, OUTPUT); // sets digital pin 7 to be an output
pinMode(pin8, OUTPUT); // sets digital pin 8 to be an output
}
void loop() // run over and over again
{
digitalWrite(pin5, HIGH); //turns on led connected to pin 5
delay(1000);
digitalWrite(pin6, HIGH); //turns on led connected to pin 6
delay(1000);
digitalWrite(pin7, HIGH); //turns on led connected to pin 7
delay(1000);
digitalWrite(pin8, HIGH); //turns on led connected to pin 8
delay(1000);
digitalWrite(pin5, LOW); //turns off led connected to pin 5
delay(1000);
digitalWrite(pin6, LOW); //turns off led connected to pin 6
delay(1000);
digitalWrite(pin7, LOW); //turns off led connected to pin 7
delay(1000);
digitalWrite(pin8, LOW); //turns off led connected to pin 8
delay(1000);
}
If your LEDs do not work as expected, test your stitching for shorts using the multimeter (as per instructions in the previous step).
Remove these ads by
Signing Up





























Not Nice













Visit Our Store »
Go Pro Today »



