ZYPPED

Concept:
Safety has always been an issue primarily for women for several reasons. One being media. Hearing about all those cases where women were endangered or victim to some crime, will most likely place women in fear of becoming the next victim. My design aims to enhance women’s sense of security through providing them wih a source of light when walking alone at night, a sound and flashing light feature to scare off any attackers and to attract the attention of people around her who may be able to help. Although it is not 100% effective in preventing rape or sexual harassment, it aims to increase the chances of the victim getting away unharmed. Studies show that victims of rape who were verbally forceful (ie yelling and screaming) got away 44-50% of the time whereas passive women only got away 4% of the time.
Circuit:


Process:

These are the sample zippers that I made, trying out different methods to see which worked best. The first version (left) was made using a continuous conductive thread. You can imagine what a nightmare that was. The thread kept snapping! So, I tried a different version, which was the centre one. Instead of a continuous thread all the way around the zipper, the side with the resistors uses short pieces of conductive thread, creating sections of three. With this version, it did not work at all. Perhaps it was because I mistakenly left a space between the teeth, when I should have sewn three consecutive ones to create a connection between the teeth and the zipper pull. So, I tried again. This time, not missing any of the zipper teeth. It worked!

Going into this project, I wanted to incorporate many elements into the jacket to make it more effective as a safety device. However, that also means a more complex circuit and code. I tried looking online for codes that did something similar to what I wanted, but with no luck. So, I started playing around with the codes, trying everything possible. I finally figured out how to make the digital zipper have not just on-off option, which is what most online tutorials were, but to have an auto option that was based on the input of a sensor. I found that when I tried to write the code to do everything at once, it got really confusing. So, I decided to split it into its different functions, test the circuit and when it worked like I wanted to, then I combined the codes together and tested it again.

So, with the code figured out, I started sewing the resistors to the actual zipper. I sewed 33 300ohm resistors so that it would add up to roughly 10k and sewed a 10k resistor on the other end of the zipper. With 33 changes in resistance, it allowed for a wide range of frequencies to be programmed for the speaker. I decided to go with 11 different frequencies (every 3 resistors would equal a change in frequency). So, as you pull the zipper down, the speaker produces a higher and higher pitched sound. Everything was working fine, until the night before the project was due. I was testing it again and there was no sound when I pulled the zipper. I hooked it up to arduino to look at the serial monitor, only to find that as I was pulling the zipper down, the numbers didn’t change. It remained at 1023. And 1023 was programmed to off (i.e. no sound) because it was when the zipper was zipped all the way up. I started to panic because without the zipper working, my concept was ruined. So, as a backup plan, I quickly sewed another zipper with the remaining resistors that I had and sewed that onto the jacket. Thankfully, it worked. However, with the reduced resistance change, I had to lower the number of frequency changes as well. So, it went from 11 different frequencies to 5. But hey, as long as it works, that’s fine by me! But, I would like to know why the original zipper suddenly stopped working!

This is the original jacket. Notice that there are only two zipper pockets. I wanted the LED “flashlight” to be near the wearer’s face, so I decided to create a zipper and pocket. The pocket houses all the circuitry and the zipper powers the LED flashlight. There are three modes: ON (keeps the LEDS on continuously), AUTO (brightness of the LEDs vary based on the ambient environment – i.e. light sensor) and OFF (turns the LEDs off). A code I had difficulty trying to figure out was the “blink without delay” code. Whenever I pulled the zipper and it was programmed to sound, the lights programmed to blink with a delay of 50 would blink very slowly. So, I wanted the LEDs connected to the long zipper to flash while not interferring with the reading off the sensors and zippers. However, all the tutorials online were not based on sensor inputs. I couldn’t make it work, so I ended up just using RB lights pre-programmed to blink.

On the left is the shoulder detail of the original jacket. As you can see, there are snaps on the shoulders that allow the shoulder straps to open and close. There is also a snap detail on the collar as a decorative element. I wanted the components I was going to add to the jacket to become integrated into the original jacket design. So, I removed the snaps and replaced it with the LED. The shoulder strap still functions as it did before – It can be lifted up and undone; the LED acts as a button that the hole of the strap can be secured around. At the same time, the shoulder LEDs will flash when the zipper is being undone. Placing it on the shoulder will draw the attention of people from all directions because it is visible from all directions. On the right is the pull switch that I incorporated to allow the power to be turned on and off. I took out the collar’s button snap detail and used the hole to thread my pull switch through. On the other side of the collar, I also sewed in a fake pull switch to create balance.

Final Product:

And here’s a video of it working!

And my presentation

Code:

/*
ZYPPED: Night Safety Jacket
Shelby Lung
Dec. 7, 2012
Uses an analog zipper (long zipper) to detect changes in resistance along the zipper,
increasing speaker’s frequency output
as resistance decreases (zipper is unzipped)

Uses a digital zipper (short zipper) to drive a “flashlight” made of 5 LEDs,
On-mode switch keeps LEDs on constantly despite environment changes
Sensor-mode switch activates LDR sensor,
changing the brightness of the LEDs based on the ambient environment
*/

//Short zipper
int ledPin = 9; // White LEDs connected to digital pin 9
int switchPin = 5; // On-mode switch connected to digital pin 5
int switchPin2 = 6; // Sensor-mode switch connected to digital pin 6
int sensorPin = A2; // LDR sensor connected to analog pin 2
int switchValue; // variable to keep track of when on mode is activated
int switchValue2; // variable to keep track of when sensor mode is activated
int sensorValue = 0; // set sensorValue to 0
int LEDbrightness; // variable to keep track of LEDbrightness

//Long zipper
int led = 10; // choose the pin for the LED
int zipperPin = A3; // choose the input pin (for analog zipper)
int val = 0; // variable for reading the pin status
int pinSpeaker = 11; // choose the pin for the speaker
int del = 250; // tone length
int low11 = 2400; // FREQSET11 – the lowest frequency value to use
int high11 = 4800; // FREQSET11 – the highest frequency value to use
int low9 = 2000; // FREQSET9 – the lowest frequency value to use
int high9 = 4000; // FREQSET9 – the highest frequency value to use
int low7 = 1600; // FREQSET7 – the lowest frequency value to use
int high7 = 3200; // FREQSET7 – the highest frequency value to use
int low5 = 1200; // FREQSET5 – the lowest frequency value to use
int high5 = 2400; // FREQSET5 – the highest frequency value to use
int low2 = 600; // FREQSET2 – the lowest frequency value to use
int high2 = 1200; // FREQSET2 – the highest frequency value to use

void setup()
{
//Short zipper
pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
pinMode(switchPin, INPUT); // sets the on-mode switch to be an input
pinMode(switchPin2, INPUT); // sets the sensor-mode switch to be an input
pinMode(sensorPin, INPUT); // sets the LDR sensor to be an input
digitalWrite(switchPin, HIGH); // sets the default (uncontacted) state of the on-mode switch to HIGH
digitalWrite(switchPin2, HIGH); // sets the default (uncontacted) state of the sensor-mode switch to HIGH

//Long zipper
pinMode(led, OUTPUT); // declare LED as output
pinMode(zipperPin, INPUT); // declare zipper as input
pinMode(pinSpeaker, OUTPUT); // declare speaker as output
Serial.begin(9600);
}

void loop() // run over and over again
//Long zipper
{
int val = analogRead(zipperPin); // read input value
if (val 900 && val < 940) { // check if the input is decreasing (unzipping)
for (int a = low2; a=low2; a–) // decreasing tone
{
tone (11, a, del);
}
digitalWrite(led, HIGH); // turn LED on
}

if (val > 800 && val < 900) {
for(int i = low2; i=low2;i–){
tone (11, i, del);
}
digitalWrite(led, HIGH);
}

if (val > 400 && val < 800) {
for(int i = low5; i=low5;i–){
tone (11, i, del);
}
digitalWrite(led, HIGH);
}

if (val > 200 && val < 400) {
for(int i = low7; i=low7;i–){
tone (11, i, del);
}
digitalWrite(led, HIGH);
}
if (val > 100 && val < 200) {
for(int i = low9; i=low9;i–){
tone (11, i, del);
}
digitalWrite(led, HIGH);

}

if (val < 100) {
for(int i = low11; i=low11;i–){
tone (11, i, del);
}
digitalWrite(led, HIGH);
}

//Short zipper
switchValue = digitalRead(switchPin); //read if on-mode switch is activated (in contact)
switchValue2 = digitalRead(switchPin2); //read if sensor-mode switch is activated (in contact)

if (switchValue == LOW) { // if the on-mode switch is activated, then
digitalWrite(ledPin, HIGH); // turn the LEDs on
}
else if (switchValue2 == LOW) { // if the sensor-mode switch is activated, the
sensorValue = analogRead(A2); // read input from LDR sensor
LEDbrightness = map(sensorValue, 0, 500, 255, 0); // map light levels to LED brightness
analogWrite(ledPin, LEDbrightness); // adjust LED brightness based on LDR sensor input
}
else { // otherwise,
digitalWrite(ledPin, LOW); // turn the LED off
}
}

Comments are closed.