The idea is that the LEDs will be controlled by an Arduino so they can be flashed in sequence. To achieve this each LED on the pants will be separately addressable but to do this without a large number of unnecessary wires in the undergarment I will be using the Charlieplexing method to power them. There will be four strings of 12 charlieplexed LEDs
and each string of 12 LEDs will only need 4 wires. So a total of 12 wires will be needed to control the whole array of 48 LEDs.
The other advantage of multiplexing a Charliplexed array of LEDs is that only one LED per array will be ON at any one time. The down side to this is that they will have to be rapidly flashed or multiplexed to give the illusion that more than one is on at a time and that is more complex code on the arduino. However the big benefit is in power saving as there will be a potential of 4 LEDs on at any one time (one for each 12 LED string) which will lower battery consumption enough to get away with using a 9 volt battery.
Step 1: Materials
Pants, Good old fashioned Y fronts are the best
LEDs Blue (36) and Red (12)
Resistors (Red 130 Ohm) (Blue 80 Ohm)
Heat shrink tubing.
Computer and Arduino IDE
Pre-programmed arduino processor.
Big assed needles
Sewing machine (but you could probably sew by hand as an alternative)
Plus the usual small workshop tools.
Step 2: Pants Selection.
On a more practical note the thicker seam around the edges and the seam forming the Y will also provide some extra thickness to hide the wires and LED legs in.
I did contemplate a pair of boxers which being loose would have potentially made them more comfortable to ware but the concept of an LED Y on them won the choice.
Step 3: LED Brightening
This is a photo of the 10mm LEDs I used to test the idea, I used 5mmLEDs for the actual project.
Step 4: LED Charlieplexing.
Diagram of charliplexing.
The description of how charlieplexing is worth its own Instructable and there are a few really good ones to check out.
One benefit of charlieplexing is that each string of 12 LEDs can only have on illuminated at a time. So with the LEDs getting 10Ma each 4 strings of 12 LEDs will only be using 40mA plus the arduino power. This means a single 9 volt battery will last all night and bulky AA batteries can be avoided.
Step 5: LED Location
There is 4 strings of 12 LEDs
One around the left leg hole
One around the Right leg home
One around the middle
One on the 'Y'
The left leg and right leg holes will be common and display the same pattern. The Y and belt line will be separate.
Step 6: Sewing the Tape On.
NOTE: It is important to stretch the elastic as you sew the tape on. If you don't do this they wont stretch and you wont be able to get them on when they're finished.
ALSO NOTE: The cotton tape is fitted on the inside of the pants!
Step 7: Mounting the LEDs
You'll have to measure the waist of your pants and mark out 12 evenly spaced marks so the LEDs are positioned evenly.
Step 8: Connecting Up the LEDs and Arduino.
Take care to give some extra wire between LEDs to allow the elastic to stretch! I gauged how much extra to leave by stretching the elastic and marking the wire with a pen before cutting it.
The resistors were soldered 'in-line' and then protected with some heatshrink.
I used a 9volt battery to test that each LED lit up when it should. I made a few mistakes and had to reverse a couple of LEDs before it was perfect.
The Arduino was sewn into place on the outside side of the side pants and the 9 volt battery clip was sewn onto the other side.
The whole process of soldering and heat shrinking took about 5 hours.
Step 9: At the Party.
They were difficult to photograph as the camera flash made them look off and the digital camera would not focus in the dark. The video is the only working shot of them that was made before they were broken.
The only problem is that at some time just before daybreak birthday boy fell over and landed arse first on the Arduino and smashed it rather badly which was a shame but at least they survived for most of the long dark night hours.