Introduction: Light Up Cycling Jersey

The idea behind this design is to create a fun ans safe way to ride at night. Many cyclists already utilize bike lights when they are riding at night. However, the drawback of these lights is that they are not interactive; they do the same thing no matter what the rider is doing. This jersey is designed to draw attention to the rider when he or she changes what she is doing. For example this jersey has LEDs and electroluminescent wiring that are lit up when the rider is riding at a constant rate in the dark. When the rider deviates from this, ie turns, accelerates, or decelerates, the lights will flash and attract even more attention to the rider thus creating a safer environment for the rider. The jersey does this through use of a light sensor and accelerometer so that no added input is need from the rider for the jersey to be fully functional in its light up capacity.

This jersey is also designed so that the EL wiring, batteries, and power inverter are all completely removable so that the jersey can be washed after being used.

Attached to this step is the general wiring diagram of the jersey. The two diagrams are designed to be lain on top of each other; ie both are diagrams of the inside of the back of the jersey but are on separate diagrams to keep confusion to a minimum.

Also attached is a video of the finished product.

Step 1: Solder LEDs

 This step requires six (6) ultrabright LEDs, and approximately 5 feet of lead wire

I recommend that you use two different color lead wires for each the positive and negative leads for each LED. 

Solder your lead wires onto the leads of each of your LEDs.

Insulate your connections and exposed wires so that no two wires can accidentally touch. Heat
shrink is recommended for its simplicity but electrical tape can also be used. 

Step 2: 3D Printing

 NOTE: This step requires access to a 3D printer. If you do not have access, or do not want to use a 3D printer you can cut stars out of plexi-glass and use a belt sander to "frost" them for softer light diffusion. 

Use SolidWorks (or some other CAD software) to design your stars, make sure when you design your stars that they will be large enough to fit the bulb of an LED inside of them. 

You will then need to save your drawing as an STL file for it to work with the 3D printer. 

Attached is my STL file of the stars I designed, if you do not have access to SolidWorks, or proficient in CAD drawings feel free to use this file. 

Attachments

Step 3: Attach the Stars to the Jersey

To attach the stars to the jersey I laser cut star shapes the same size of the bottom of our 3D printed stars out of velcro with a strong adhesive backing. 

Cut out six pairs (1 fuzzy side of velcro and 1 coarse side of velcro per pair) of stars. 

Note that you do not have to use a laser cutter to complete this step, you can just as easily cut the star shapes out of the velcro using scissors. 

Adhere the fuzzy side of the velcro to the back of each of the stars. 

When you attached the velcro to the back of the 3D printed stars you covered the cavity that the LED will rest in. To reopen this hold use a hot soldering iron to burn through the back of the velcro, this will create a neat and clean hole for the LED to fit through. WARNING: the soldering iron is hot enough to melt/burn through your 3D printed star. Be very cautious when doing this step. Avoid letting the soldering iron touch any part of the star. Also, to avoid damaging your soldering iron make sure you clean the tip of any adhesive before you letting the iron cool. 

Now adhere the coarse side of the velcro to the stars on the back of the jersey. 

In addition to the adhesive on the back of the velcro, I recommend sewing a few stitches attaching the velcro to the jersey so that when the adhesive loses its strength after you wash the jersey the stars will still be attached to the jersey. 


Step 4: Create Holes in Jersey

 In this step you will need to create holes in the center of the stars on the jersey for the wires on your LED to pass through. Make these holes as small as possible so that the bulbs of the LEDs will not be able to fit through them. Once you have create these holes, feed the lead wires through the jersey (NOTE: do not put the bulb of the LED through the hole in the jersey, feed the wires from the outside of the jersey in so that the bulb never has to go through the hole in the jersey). Then embed the bulbs of the LEDs in each of the holes in the 3D printed stars and attach the 3D stars to the jersey by connecting the velcro to each other. 

Step 5: Sew on the Arduino

Sew the arduino onto the back INSIDE of the jersey. Make sure you use non-conductive thread. You may sew through any of the pins, though make sure to leave enough room to make connections to the pins you choose to use to attach the arduino to the jersey. I recommend that you sew the arduino so that the upload pins point towards the bottom of the jersey to make trouble shooting the code easier on the fly.

Step 6: Connect the LEDs to the Arduino

NOTE: Conductive thread will NOT be used to connect the LEDs to the arduino. To connect a LED to the arduino take a lead and strip approximately 1 inch of insulation off. Take approx 1 inch of 3/32" heatshrink (available at practically any hardware or electronics store) and thread the lead that you are connecting to the ardino through it. Then, insert the exposed wire though the pin hole on the arduino and twist the wire back upon itself so it forms a sort of "loop" around the arduino. Next, move the heatshrink flush up against the arduino so that it covers the exposed wire of the lead. Use a heatgun to shrink the heatshrink. 

Take the positive leads of each of your six LEDS. Looking from the outside of the jersey, the leftmost star should be connected to pin 8 on the arduino. The LED directly to the right of the last star should be connected to pin 9 on the arduino. The next LED to pin 10, and so on and so forth until the last LED is attached to pin 13 on the arduino.

Take each of the negative leads for the LEDs and label them with masking tape as "NEGATIVE" and leave aside.

Extra: The reason conductive thread was not used is because using conductive thread in a constricted area can prove to be very difficult, and in this case, exposing conductive thread to human sweat could prove to be dangerous to the user.

Step 7: Readying and Attaching the Accelerometer

Take your LilyPad Accelerometer and attach a lead wire to each of the five pins (Xpin, Ypin, Zpin, positive, and negative) in the same fashion you attached the leads of your LEDs to the arduino (looping through the pin hole and securing with heatshrink). Make sure each of your five leads is long enough to reach from the center-top (where you usually find a tag) to the bottom of the jersey.

Next, sew the accelerometer onto the INSIDE of the jersey in the top-center of the jersey (right underneath the tag if there is one). Once again, make sure you use NON-conductive thread, and feel free to sew through the pin-holes.

Then attach the lead wire for the Xpin to pin A3 on the arduino, the lead for the Ypin to pin 2, the lead for the Zpin to pin 1.

Next, take the positive lead and label it with masking tape as "POSITIVE"

Then, take the negative lead and label it with masking tape as "NEGATIVE"

Step 8: Attaching the Light Sensor

Take your LilyPad LightSensor and sew it to the bottom of the jersey using NON-conductive thread. Make sure that the sensor is on the outside of the jersey and is visible to light.

Next, using conductive thread, connect the negative pin on the light sensor to the negative pin on the arduino.

Then, using conductive thread, connect the positive pin on the light sensor to the positive pin on the arduino.

Then, using conductive thread, connect the sensor pin (indicated with an "S" on the sensor) on the light sensor to pin a0 (analog pin 0) on the arduino.

NOTE: Make sure to be extra-careful not to cross any of the conductive threading when sewing.

Step 9: Readying and Attaching the Relay

For this step you will need your power inverter, relay, and 9V snap connector

The following link is the specific relay used in this project:

http://www.crydom.com/en/Products/Catalog/d_o.pdf

The jersey will work with practically any relay with a normally open/closed output and that can handle 9V so feel free to use whatever is accessible to you. 

NOTE: For EVERY connection made in this step it will be expected that you slip heatshrink onto one of the wires prior to soldering, and then proceed to cover the connection with the heatshrink after soldering.

Solder a lead wire onto each of the pins extruding from the relay.

TIP: Take the lead that you are going to solder to a pin on the relay and wrap it tightly around the solder you are using so it makes a sort of coil. Then pull the solder out and, without undoing the coil, slip the lead onto the relay pin. Since the relay pin is fairly inflexible and is also similar in size to the solder the coil should fit snugly around the relay pin, keeping it steady for you to solder a good connection.

Solder the Positive DC Load pin of the relay to positive wire of your 9V snap connector.

Next, solder the negative DC Load pin of the relay to the positive wire from the power inverter.

Next, connect the positive DC Control pin of the relay to Pin 5 on the arduino in the same manner that all connections have been made thus far to the arduino.

Next, mark with a piece of masking tape the negative DC Control pin of the relay as "NEGATIVE" and leave aside.

Finally solder the negative lead of the 9V snap connector to the negative lead of the power inverter.




Step 10: Conquering the EL Wire

This step can prove to be very difficult, remain patient and allow for mistakes, it is very hard to get right on the first try.

First, strip off the outer plastic jacket (will be colored) in which the electroluminescent wire is housed. Be careful not to break either of the two thin wires twirled around the core.

Next, twist the two thin wires together.

Next, use a razor blade to scrape the white coating off of the core of the EL wire, exposing the inner copper core.

On one end of your power inverter there will be two black wires with a male connection at the end. Find a female connector and cut off the other end of it so there are just two exposed wires coming from the female connection. Solder one of these wires to the two thin wires and insulate the connection with heatshrink. Solder the other one of these wires to the copper wire and insulate this connection as well. Connect the female connector coming from the EL wire to the male connector coming from the power inverter. Make sure you have the female connector come through the jersey in one of the pockets so that the hole cannot be seen from the outside.

Finally, solder the negative lead of your 9V snap connector to the negative lead coming from the power inverter.




Step 11: Attaching the EL Wire to Jersey

Cut out 22 1in by 0.5 in squares of transparent fabric. Sew the fabric back upon itself "hotdog" style so that it makes a tube. Sew each of these tubes onto the back of the jersey and thread the EL wire through each of the loops.

Step 12: Adding Power Supply for Arduino

For this step you will need to purchase a 6V battery and battery holder (available at any electronics store). This 6V will be the power supply for the arduino.

Solder positive and negative leads onto the battery holder and attach them to the respective positive and negative pins on the arduino using the same heatshrink method used before.

Step 13: Final Connections

Now take every wire labeled "positive" and connect it to the positive pin hole on the arduino. 

Next, take every wire labeled "negative" and connect it to the negative pin hole on the arduino.



Step 14: Coding

Now that all the connections are made you are ready to write the code for the jersey.

Here is the link for where you can download the arduino software:

http://www.arduino.cc/en/Main/Software

Below is the code I wrote. Feel free to use it.

// these constants describe the pins. They won't change:
const int lightpin = 0;               //reads the power from the light sensor
const int switchp=5;                  //power pin for the relay to the EL wire
const int xpin = 3;                   // x-axis of the accelerometer                  // z-axis (only on 3-axis models)
const int LED1= 8;                    //LED's 1-6 numbered accordingly
const int LED2= 9;
const int LED3= 10;
const int LED4= 11;
const int LED5= 12;
const int LED6= 13;                    

void setup()
{
  // initialize the serial communications:
  Serial.begin(9600);

  // Provide ground and power by using the analog inputs as normal
  // digital pins.  This makes it possible to directly connect the
  // breakout board to the Arduino.  If you use the normal 5V and
  // GND pins on the Arduino, you can remove these lines.
  pinMode(switchp, OUTPUT);
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(LED3, OUTPUT);
  pinMode(LED4, OUTPUT);
  pinMode(LED5, OUTPUT);
  pinMode(LED6, OUTPUT);
  pinMode(lightpin,INPUT);
  pinMode(xpin,INPUT);
  pinMode(switchp, OUTPUT);
}

void loop()
{
  if(analogRead(lightpin)<30)    //test to see if there is light on the light sensor
  {

    if(analogRead(xpin)>600) //test to see if there is acceleration
    {
     //left
       digitalWrite(switchp, HIGH);  // set the EL WIRE on
       delay(200);                  // wait for .2 second
       digitalWrite(switchp, LOW);   // set the EL Wire off
       digitalWrite(LED3, HIGH);   // set the LED on
       digitalWrite(LED4, HIGH);   // set the LED on
       delay(200);                // wait for .2 second
       digitalWrite(LED3, LOW);  // set the LED off
       digitalWrite(LED2, HIGH);  // set the LED on
       digitalWrite(LED4, LOW);  // set the LED off
       digitalWrite(LED5, HIGH);  // set the LED on
       digitalWrite(switchp, HIGH); // set the EL WIRE on
       delay(200);                    // wait for .2 second
       digitalWrite(switchp, LOW);  // set the EL WIRE off
       digitalWrite(LED2, LOW);  // set the LED off
       digitalWrite(LED1, HIGH); // set the LED on
       digitalWrite(LED5, LOW);
       digitalWrite(LED6, HIGH);
       delay(200);                    // wait for .2 second
       digitalWrite(LED1, LOW);
       digitalWrite(LED6, LOW);
       digitalWrite(switchp, HIGH);
       delay(200);                    // wait for .2 second
       digitalWrite(switchp, LOW);

      } 

        else        //Turn on EL WIRE and LED indefintely
        {
         digitalWrite(LED6, HIGH);   // set the LED on
         digitalWrite(LED5,HIGH);
         digitalWrite(LED4, HIGH);   // set the LED on
         digitalWrite(LED3,HIGH);
         digitalWrite(LED2, HIGH);   // set the LED on
         digitalWrite(LED1,HIGH);
         digitalWrite(switchp, HIGH);
        } 


    }  
 else    //if lightsensor is off, then turn EL WIRE and LED off
 {
    digitalWrite(LED6, LOW);   // set the LED on
         digitalWrite(LED5,LOW);
         digitalWrite(LED4, LOW);   // set the LED on
         digitalWrite(LED3,LOW);
         digitalWrite(LED2, LOW);   // set the LED on
         digitalWrite(LED1,LOW);
         digitalWrite(switchp,LOW);
 }
     Serial.print(analogRead(lightpin));    //output for serial monitor
        Serial.print("\t");

        // print the sensor values:
        Serial.print(analogRead(xpin));
        // print a tab between values:
        Serial.print("\t");
        // print a tab between values:
        Serial.println();
        // delay before next reading:
        delay(50);
}

Step 15: Trouble Shooting

If for some reason the jersey is not working check to make sure that your code is written correctly and is referring to the appropriate pins.

If your code is perfect and the jersey is still not working use a multimeter to check to make sure all the connections are good.

Step 16: Finishing Touches

Finally, sew, on the inside of the jersey, a thin fabric so that all the wires are contained between this fabric and the jersey. I advise also sewing specific pocket to contain the batteries so they are more secure since they have some weight to them.