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.
- Arduino Micro - RadioShack 276-258
- Memsic 2125 accelerometer - RadioShack 276-029
- EL wire - RadioShack 276-333
- 12V inverter for EL wire - RadioShack 276-341
- Transistor - RadioShack 276-2016
- 470 Ohm resistor (no smaller than 100 Ohms) - RadioShack 271-1321
- 8 pin socket (for accelerometer - ideally use a 6 pin, but this is what I had on hand) - RadioShack 276-1995
- 40 pin socket (for Arduino) - RadioShack 276-1996
- 4-AA battery packs (2x) - RadioShack 270-391
- AA batteries (8x) - RadioShack 23-2212
- Power switch – RadioShack 275-033
- General purpose printed circuit board - RadioShack 276-149
- Misc. wires/soldering supplies
- Clear thread
- Zip-up flight suit or some other article of clothing
- Colored thread to match the suit
- Misc. sewing supplies
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
Step 5: Solder the Resistor
Step 6: Solder the Jumper Wires
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
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.