Most of the time EL wire is used as is, with manual on/off control. However, I wanted to control it with an Arduino, so it would react to results from a sensor. This motion-activated suit flashes when the wearer starts to walk and lights up completely when the wearer runs. Perfect for those late-night runs! (or dance parties - it lights up when the wearer moves, and this includes dancing)
The suit itself is a set of zip-up coveralls decorated with EL wire and controlled via an Arduino Micro. An accelerometer monitors the wearerís motion and sends that data to the Arduino.
Step 1: Main circuit
The resistor limits the current going to the transistor to make sure it doesnít get damaged.
The accelerometer is powered by the Arduino (it requires a steady 5VDC) and has its X and Y outputs connected to digital input pins.
Both the Arduino Micro and the inverter run off 12V, so the battery packs contain a total of 8 AA batteries and were wired in series.
Step 2: Soldering the Arduino socket
Step 3: Soldering the accelerometer socket
Step 4: Solder the transistor
Next, I soldered the transistor so the emitter would be near ground. Keep the pins separate when soldering, and clip the wires when you are done.
Step 5: Solder the resistor
I soldered the resistor next to the middle (base) pin of the transistor since it goes between the Arduino pin and the base.
Step 6: Solder the jumper wires
Finally, I soldered the jumper/connecting wires in place. I found it easiest to cut them to length before soldering (as opposed to soldering one end and then cutting it). I also folded over the stripped end to put it closer to the pin I was soldering it to (see pictures).
I continued to add jumper wires, and added "extension" wires for connecting to off-board components (the inverter and power).
Step 7: Soldering the power switch
At this point, I soldered the on/off switch to power and hot glued it to the battery pack. (this would be much more difficult to do after the batteries are in the suit pockets) The wiper (middle pin) is connected to the 12V coming directly from the batteries and the other pin is the power for the circuit. The last pin I left open.
Step 8: Arduino code
The Memsic 2125 outputs pulses that vary in length based on the acceleration. These pulses are read in using the "pulseIn()" function, which returns the pulse length in microseconds. The Memsic datasheet supplies a formula for converting this pulse length to acceleration (see image from datasheet).
To determine what the wearer is doing, the Arduino calculates the range of acceleration for the vertical axis (the axis aligned with gravity - this axis sees the greatest change when the wearer moves) over a time of about one second. It does this by finding the maximum and minimum values during that time, then taking the difference. The ranges for running, walking, and standing still are fairly distinct; therefore I can set thresholds to define the activities (these thresholds will probably vary from person to person). In my case, standing still had a range of 0-0.15g, walking had a range of 0.15-0.30g, and running had a range of >0.30g. Note that in the code I added a factor of 100 to my accelerometer values to avoid using floats.
Once the code has determined the activity, it controls the EL wire accordingly. If the wearer is standing still, the EL wire stays off; if the wearer is walking, it flashes; and if the wearer is running it stays on.
Step 9: EL wire design
I marked out my pattern with scrap yarn, but you can also just use tailor's chalk or a white colored pencil. Remember to use more organic shapes, since the EL wire doesn't make tight corners and you run the risk of breaking the interior wires if you try (you'll see that although my initial design has lots of corners, the actual suit uses much curvier shapes).
Step 10: Cut and solder EL wire
There are already a bunch of good guides for soldering to EL wire (see below), so I won't post my exact steps here. I used the method with copper tape, since it seemed more secure and less likely to break the thin wires. I did however figure out that the interior wire is extremely brittle, so be careful with the soldered ends once you are done with them.
Step 11: Sewing the EL wire
Step 12: Sewing the circle
Step 13: Tucking in ends
Step 14: Cleaning up cables
Step 15: Make holes for wires
To help with routing the wires, I made ½" long buttonholes in the insides of the pockets by cutting slits and sewing around the edges.
Step 16: Sewing the battery packs
In general, I occasional sewed the wires loosely to the inside of the suit. This was to keep them from being caught on anything when the suit is put on/taken off.
Step 17: Sewing the circuit board
The circuit board itself I sewed securely to the inside of the front pocket. I wanted it to rest near the hip where there would be a lot of motion. Iíve left the inverter loose for now, but if it becomes a problem Iíll sew a few loops around the input and output cables to secure it.
Step 18: Final touches
Step 19: Wear it!
As I mentioned earlier, you may need to adjust the values for your particular gait.