Glowing Jacket

From MCS Wiki
Jump to: navigation, search
Glowing Jacket.jpg

Contents

Origination

This project was inspired by the author kepmtop who created Light for life: Glowing button cycling jacket project. The idea is if you ride your bicycle during the night, other drivers will see you and drive carefully. This project was created by David Morgan and Benjamin Buchanan. The name given to this project is Glowing Jacket.

Feature Explanation

Lights

The jacket consists of two sets of lights which are on the rear side of the jacket. When you connect an arduino and a power source, both sets of lights turn on. When you ride the bike on the street at night, car drivers who are behind you will see you well because of the red glowing lights and hopefully drive safer.

Buttons

Error creating thumbnail: Invalid thumbnail parameters

Sometimes, the biker needs to change lanes or make a turn. To handle such situation, two buttons were installed on both sleeves of the jacket. If the biker presses the button on the right sleeve, the right side of the lights starts blinking. If the biker presses the button on the left sleeve, the left side of the lights starts blinking. The red lights blink for 15 seconds. (The code can be modified to start blinking when the button is pressed and stop blinking when the button is pressed again. However, we considerated that a biker would want to make the least amount of clicks when biking.) The blinking indicates to the person behind, that the biker wants to turn and hopefully the driver behind would be more careful.

Equipment

Finished project

  • Arduino Uno - controlled the buttons & LEDs
  • Battery pack - provided power to the arduino
  • Cardboard paper (tiny piece) - used as a layer between the button and the jacket (so hot solder would not damage the jacket)
  • Cloth (white) - sown to the jacket & held LEDs
  • Electrical tape - held the wires together (near the shield) for convenience
  • Jacket - double layer UVA-Wise jacket
  • LED red 3mm x20 - provided lighting on the jacket
  • Push buttons x2 - controlled the blinking of the light
  • Shield - held the connection which enabled the entire system to work
  • Shield pins - used to connect Arduino to the shield
  • Solder - held metal connection in place, so a short-circuit would not occur
  • Thread (conductive)- provided electricity to LEDs
  • Thread (non conductive) - sewed the cloth to the jacket & held telephone wires in place
  • Wires (thickness of telephone wires & various color for simplification) - transferred electricity from buttons to Arduino to LEDs

While building the project

  • Computer with Arduino software - used to write code
  • Multimeter - tested arduino shield for mistakes
  • Paper & Pencil - drew the electric diagram
  • Scissors - used to cut open the jacket's pocket
  • Sewing needle - sewed the thread to the fabric
  • Shield cutter - reduced the size of the shield to fit in the pocket and take up minimum size
  • Soldering iron - melted metal on the shield & held buttons in place
  • USB cable - connected arduino to computer, to transfer the program

Source Code

For the arduino to work properly, this code needs to be loaded onto Arduino:

const int RBUTTON = 12;
const int RLED = 9;
const int LBUTTON = 8;
const int LLED = 13;

int RightButton = 0;
int LeftButton = 0;
int state = 0;
int x;


void setup()
{
  pinMode(RLED, OUTPUT);
  pinMode(LLED, OUTPUT);
  pinMode(RBUTTON, INPUT);
  pinMode(LBUTTON, INPUT);

}

void loop()
{
  digitalWrite(RLED, HIGH);
  digitalWrite(LLED, HIGH);

  RightButton = digitalRead(RBUTTON);
  LeftButton = digitalRead(LBUTTON);
  
  if(RightButton == HIGH)
  {
    for(x=0; x<50; x++)
    {
      if(state == 0)
      {
        digitalWrite(RLED, LOW);
	state = 1;
      }
      else
      {
	digitalWrite(RLED, HIGH);
	state = 0;
      }	
      delay(300);
    }
  }
  

  if(LeftButton == HIGH)
  {
    for(x=0; x<50; x++)
	{
	  if(state == 0)
	  {
	    digitalWrite(LLED, LOW);
	    state = 1;
	  }
	  else
	  {
	    digitalWrite(LLED, HIGH);
	    state = 0;
	  }	
	  delay(300);
	}
  }
}
Personal tools