loading
My project is to make a heel (shoe) that senses when your foot is tired and then eases the pain. I will have a force sensor measure how much pressure is on your foot for 3 minutes. If the pressure is at a certain measure for 3 minutes, then a vibrator will go off and massage your foot for two sets of vibration massages. I am creating this because many women suffer the price of beauty and looking good. Women deserve some slack and shoes that sense when their feet hurt and provide a quick message is a perfect solution. My idea is different from other comfort shoes because the shoe adapts to the individual. The LED flower pattern that will be on the top of the shoe lights up in different patterns during the massage and gives the shoe a feminine look while embracing technology.

Materials:
high heel shoe  (Payless Shoe Store)
14 LEDs (available in class)
force(pressure) sensor  (available in class)
vibration motor  (http://www.sparkfun.com/products/8449)
wires (available in class)
Arduino Mini Pro 3.3V  (http://www.amazon.com/Arduino-Pro-Mini-328-3-3V/dp/B004G53J6M)
9V battery pack (available in class)
FTDI TTL-232R-3V3 USB - TTL Level Serial Converter Cable (available in class)
solder (available in class)

Step 1: Code for Force Sensor and LED

I practiced applying pressure to the force sensor and having an LED light up in response. Make sure the USB cord is connected to the Arduino even though the picture does not show it.

int sensePin = 2; // the pin the FSR is attached to
int pressureLevel = 4;
int timeCount = 0;
int pressureCount = 0;
int lengthOfTime = 5;

void setup() { Serial.begin(9600);
  pinMode(2, OUTPUT); //declare the ledPin as an OUTPUT need for all pins
}
void loop() { int pressure = analogRead(sensePin) ;

  if (millis() % 1000 == 0) { //60000 for one minute,
timeCount ++;
if (pressure > 500) {
pressureCount ++;}
if ((timeCount > lengthOfTime) && (pressureCount > pressureLevel)) { //activate when 4 out of 5 times
digitalWrite(2, HIGH);
timeCount=0;
}
Serial.println(pressure);
}
}



 

Step 2: Combining the LED, Force Sensor and Vibration Motor

I tested using the force sensor to make the vibration motor activate and have the LED light up afterwards.

int sensePin = 2; // the pin the FSR is attached to
int pressureLevel = 4;
int timeCount = 0;
int pressureCount = 0;
int lengthOfTime = 5;
int motorpin = 9;

void setup() { Serial.begin(9600);
  pinMode(2, OUTPUT); //declare the ledPin as an OUTPUT need for all pins pinMode(motorpin, OUTPUT);
}
void loop() { int pressure = analogRead(sensePin) ;

  if (millis() % 1000 == 0) { //60000 for one minute,
timeCount ++;
if (pressure > 500) {
pressureCount ++;}
if ((timeCount > lengthOfTime) && (pressureCount > pressureLevel)) { //activate when 4 out of 5 times

digitalWrite(motorpin, HIGH);
delay(500);
digitalWrite(motorpin, LOW);
delay(500);
digitalWrite(2, HIGH);
timeCount=0;
}
Serial.println(pressure);
}
}
 

Step 3: Making the Flowers

I created flowers by twisting the wires together (corresponding positive with positive and negative with negative) and then soldering them. I had to test the LEDs by applying a ground wire and 5V wire to each positive and negative wire at the same time to see if each LED would light up. If it lit up, it indicated that the wiring was done correctly. It took multiple tries to get this right. I had to test the each LED individually and record which wire was positive and which was negative. My original idea was to have three flowers. Since the third one crowded the Mini Pro Arduino 3.3V that I'm using, it didn't look like a flower pattern, but rather a clump of LEDs. I decided to exclude it. 

Step 4: Testing 2 Flower LEDs With Force Sensor and Vibration Motor

I used a breadboard to test whether the flower LEDs, force sensor and vibration worked altogether. Sometimes the LEDs would not light up. I had to be meticulous to make sure that the wires were not touching the others and therefore making them defective. Finally, the whole process worked. I re-tested it twice just to make sure.  (Make sure the USB is connected to the arduino, unlike the picture below)


int sensePin = 2; // the pin the FSR is attached to
int pressureLevel = 4;
int timeCount = 0;
int pressureCount = 0;
int lengthOfTime = 5;
int motorpin = 9;

void setup() { Serial.begin(9600);
  pinMode(2, OUTPUT); //declare the ledPin as an OUTPUT need for all pins
pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
  pinMode(motorpin, OUTPUT);}

void loop() { int pressure = analogRead(sensePin) ;

  if (millis() % 1000 == 0) { //60000 for one minute,
timeCount ++;
if (pressure > 800) {
pressureCount ++;}
if ((timeCount > lengthOfTime) && (pressureCount > pressureLevel)) { //activate when 4 out of 5 times
digitalWrite(motorpin, HIGH); //vibration motor
delay(3000);
digitalWrite(motorpin, LOW);
digitalWrite(6, HIGH);
delay(500);
digitalWrite(7, HIGH);
delay(500);
digitalWrite(8, HIGH);
delay(500);
digitalWrite(5, HIGH);
delay(2000);
digitalWrite(motorpin, HIGH); //vibration motor
delay(3000);
digitalWrite(motorpin, LOW);
digitalWrite(6, LOW);
delay(500);
digitalWrite(7, LOW);
delay(500);
digitalWrite(8, LOW);
delay(500);
digitalWrite(5, LOW);
timeCount=0;
}
Serial.println(pressure);
}

Step 5: Saudering to the Mini Pro Arduino 3.3V

I first soldered the 2 flower LEDs into the Mini Pro Arduino 3.3V. Then i soldered the force sensor and vibration motor into the arduino. The force sensor connected to VCC and A2. The vibration motor connected to pin9 and ground. The flower petals connected to their pin numbers(2-5, 10-13) and ground. I next soldered a connection for the FTDI TTL-232R-3V3 USB - TTL Level Serial Converter Cable that would upload my code from my laptop into the arduino. The arduino is connected to a 9V battery through soldering that is then attached to the back underside of the heel. 


Links to pictures of a FTDI TTL-232R-3V3 USB - TTL Level Serial Converter Cable:
http://arduino.cc/en/uploads/Guide/ArduinoProMiniFTDIBreakout2.jpg

http://arduino.cc/en/uploads/Guide/ArduinoProMiniFTDICable.jpg

Step 6: Attachment

I attached the 9V battery to the back underside of the heel. Then I attached the force sensor, vibration motor and arduino to the heel. 

Step 7: Upload

I used a FTDI TTL-232R-3V3 USB - TTL Level Serial Converter Cable to upload the code from my laptop to the Mini Pro Arduino. I turned on the battery and watch the heel work in action!

Code for Final Project

int sensePin = 2; // the pin the FSR is attached toint pressureLevel = 2;
int timeCount = 0;int pressureCount = 0;
int lengthOfTime = 3;int motorpin = 9;

void setup() { Serial.begin(9600);
  pinMode(2, OUTPUT); //declare the ledPin as an OUTPUT need for all pins pinMode(3, OUTPUT);
  pinMode(4, OUTPUT); pinMode(5, OUTPUT); //middle of flower
  pinMode(10, OUTPUT); //middle of flower pinMode(11, OUTPUT);
  pinMode(12, OUTPUT); pinMode(13, OUTPUT);
  pinMode(motorpin, OUTPUT);}

void loop() { int pressure = analogRead(sensePin) ;

  if (millis() % 60000 == 0) { //60000 for one minute,
timeCount ++;
if (pressure > 800) {
pressureCount ++;}
if ((timeCount > lengthOfTime) && (pressureCount > pressureLevel)) { //activate when 2 out of 3 times
digitalWrite(4, HIGH);
delay(500);
digitalWrite(3, HIGH);
delay(500);
digitalWrite(2, HIGH);
delay(500);
digitalWrite(13, HIGH);
delay(500);
digitalWrite(12, HIGH);
delay(500);
digitalWrite(11, HIGH);
delay(500);
digitalWrite(10, HIGH);
digitalWrite(5, HIGH);
digitalWrite(motorpin, HIGH); //vibration motor
delay(3000);

digitalWrite(11, LOW);
delay(300);
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
delay(300);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay(300);
digitalWrite(13, HIGH);
digitalWrite(2, LOW);
delay(300);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
delay(300);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
delay(300);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(5, LOW);
delay(300);
digitalWrite(10, HIGH);
digitalWrite(5, HIGH);
digitalWrite(11, LOW);
delay(300);
digitalWrite(11, HIGH);
digitalWrite(12, LOW);
delay(300);
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
delay(300);
digitalWrite(13, HIGH);
digitalWrite(2, LOW);
delay(300);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
delay(300);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
delay(300);
digitalWrite(4, HIGH);
digitalWrite(10, LOW);
digitalWrite(5, LOW);
delay(300);
digitalWrite(10, HIGH);
digitalWrite(5, HIGH);
digitalWrite(motorpin, LOW);
delay(1000);
digitalWrite(13, LOW);
digitalWrite(12, LOW);
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(5, LOW);
digitalWrite(4, LOW);
digitalWrite(3, LOW);
digitalWrite(2, LOW);
delay(1000);
digitalWrite(13, HIGH);
digitalWrite(12, HIGH);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(5, HIGH);
digitalWrite(4, HIGH);
digitalWrite(3, HIGH);
digitalWrite(2, HIGH);
digitalWrite(motorpin, HIGH); //vibration motor
delay(3000);

digitalWrite(4, LOW);
delay(500);
digitalWrite(13, LOW);
delay(500);
digitalWrite(3, LOW);
delay(500);
digitalWrite(12, LOW);
delay(500);
digitalWrite(2, LOW);
delay(500);
digitalWrite(11, LOW);
delay(500);
digitalWrite(10, LOW);
digitalWrite(5, LOW);
digitalWrite(13, HIGH);
delay(300);
digitalWrite(12, HIGH);
delay(300);
digitalWrite(11, HIGH);
delay(300);
digitalWrite(10, HIGH);
delay(300);
digitalWrite(5, HIGH);
delay(300);
digitalWrite(4, HIGH);
delay(300);
digitalWrite(3, HIGH);
delay(300);
digitalWrite(2, HIGH);
delay(300);
digitalWrite(13, LOW);
delay(500);
digitalWrite(4, LOW);
delay(500);
digitalWrite(12, LOW);
delay(500);
digitalWrite(3, LOW);
delay(500);
digitalWrite(11, LOW);
delay(500);
digitalWrite(2, LOW);
delay(500);
digitalWrite(5, LOW);
digitalWrite(10, LOW);

digitalWrite(motorpin, LOW);

timeCount = 0;
}
Serial.println(pressure);
}

Step 8: Video of How It Works

In the video, it is hard to see that the vibration motor is going off.

Step 9: Another Video of How It Works

<p>The Arduino Mini Pro doesn't have any connectors, so how would the FDTI TTl-232R-3V3 connect to the computer for programming. Also what is the circuit board layout for the Arduino, vibration motor, pressure sensor, and the battery pack and LEDs.</p>
Most of the LED coding is where you see HIGH and LOW. I'm sorry that it's not more specific but most of the coding is combined to relate to each function simultaneously
<p>If we got rid of the LEDs, would we use a different power rating, for instance would we only need 3v or 1.5v instead of 9v, and can you tell me what to delete from the code, since Im not using LED's. Thank you.</p>
I would try the 3v but it might still need the 9v. No problem!
Just love these.
Thanks!
Hi! I'm currently trying to try to make your project but I don't know how to connect each components. If its possible, could you send me a copy of your circuit design? or at least teach me to connect the components to each other. Thanks in advance!
I soldered it together :)

About This Instructable

5,163views

10favorites

License:

More by cbabtkis:High Heel Massage High Heel Massage 2 High Heel Massage 
Add instructable to: