
<< Final shoe work>>
When you change the speed like walking and running, people around the shoes can see the color changes. The principle of the shoes mechanism is that movement goes up the voltage and voltage heat the heater and then heater finally change the color outside of the shoes.
circuit with piezo sensor
circuit on the perfboard 

<<Circuit>> 

A heater needs at least 12V and lots of amperage. Therefore, we tried to use a transistor or relay(just making an experiment). Transistor can allow 5V to amplify 12V. ( similarly, a relay is an electrical switch that opens and closes under the of another electrical circuit using magnet)
<<materials>>

We want to put all stuffs inside of the shoe but we need enough amperage for heater(left). So, we purchased 0.8amp battery. And, to facilitate attaching changing part to a shoe, we came up the idea of using magnet (middle). Lilypad is beautiful but when we connected all wires with conductive threads, we got loosened connection. That was a really problem!!
<< Thermochromic Paints>>

Thermochromic paint is color paints that can make color changes when heat add. We contact the one of the company, MATSUI( www.matsui-color.com), and we asked 35(disappear minimum 36 degree Celsius) and 37 (disappear minimum degree 41 degree Celsius) paints to the company. For showing beautiful color, we mixed with acrylic paints.
<<Sensor experiments>>
We, Alex and I, had a problem in that we use the piezo buzzer sensor. It has a kind of own capacitor. So, whenever making one step, it makes a pick and slowly goes down. How we can check one step not the bunch of steps? Thus, we made a threshold between current step and last step to discard useless value.
code
const int piezoSensor = 0; // Analog pin connected to piezo sensor.
const int swooshHeatOutput = 8; //PWM pin used to regulate temperature of heating pad.
const int runningIndicatorLED = 7;
const int footstepValueThreshold = 175; //Minimum voltage signal spike to required to count as a footsep.
const int footstepTimeThreshold = 200; //Minimum footspeed (in millis) required to count as a footstep.
const int minimumRunSpeed = 450;
long currentPiezoSensorValue[2];
long lastPiezoSensorValue[2];
int currentFootstepValue;
int lastFootstepValue;
long currentFootstepTime;
long lastFootstepTime;
float averageFootSpeed;
long cummulativeFootSpeed;
long currentFootSpeed;
int footstepCount;
int running;
void setup() {
Serial.begin(9600);
lastPiezoSensorValue[0] = lastFootstepValue = currentPiezoSensorValue[0] = currentFootstepValue = analogRead(piezoSensor);
lastPiezoSensorValue[1] = lastFootstepTime = currentPiezoSensorValue[1] = currentFootstepTime = millis();
cummulativeFootSpeed = footstepCount = 0;
currentFootSpeed = averageFootSpeed = 3000;
pinMode(swooshHeatOutput, OUTPUT);
}
void loop() {
if (currentPiezoSensorValue[1] % 3000 == 0) {
averageFootSpeed = 2000;
cummulativeFootSpeed = 0;
footstepCount = 0;
}
lastPiezoSensorValue[0] = currentPiezoSensorValue[0];
lastPiezoSensorValue[1] = currentPiezoSensorValue[1];
currentPiezoSensorValue[0] = analogRead(piezoSensor);
currentPiezoSensorValue[1] = millis();
//running = constrain(averageFootSpeed, minimumRunSpeed, maximumRunSpeed);
if (averageFootSpeed <= minimumRunSpeed ) {
digitalWrite(swooshHeatOutput, HIGH);
digitalWrite(runningIndicatorLED, HIGH);
}
else {
digitalWrite(swooshHeatOutput, LOW);
digitalWrite(runningIndicatorLED, LOW);
}
/*if (averageFootSpeed > minimumRunSpeed) {
analogWrite(swooshHeatOutput, 0);
}
else if (averageFootSpeed <= minimumRunSpeed && averageFootSpeed > mediumRunSpeed ){
analogWrite(swooshHeatOutput, 85);
}
else if (averageFootSpeed <= mediumRunSpeed && averageFootSpeed > maximumRunSpeed ){
analogWrite(swooshHeatOutput, 128);
}
else if (averageFootSpeed <= maximumRunSpeed) {
analogWrite(swooshHeatOutput, 255);
}*/
if ( (currentPiezoSensorValue[0] - lastPiezoSensorValue[0]) > footstepValueThreshold) {
//Serial.println(currentPiezoSensorValue[0] - lastPiezoSensorValue[0]);
if ( (currentPiezoSensorValue[1] - lastFootstepTime) > footstepTimeThreshold) {
//Serial.println(currentPiezoSensorValue[1] - lastFootstepTime);
lastFootstepValue = currentFootstepValue;
lastFootstepTime = currentFootstepTime;
currentFootstepValue = currentPiezoSensorValue[0];
currentFootstepTime = currentPiezoSensorValue[1];
currentFootSpeed = currentFootstepTime - lastFootstepTime;
if (currentFootSpeed > footstepTimeThreshold) {
footstepCount += 1;
cummulativeFootSpeed = cummulativeFootSpeed + currentFootSpeed;
averageFootSpeed = cummulativeFootSpeed / footstepCount;
Serial.print(”Step: “);
Serial.print(footstepCount);
Serial.print(” “);
Serial.print(”Current Step: “);
Serial.print(currentFootstepValue);
Serial.print(” “);
Serial.print(”Last Step: “);
Serial.print(lastFootstepValue);
Serial.print(” “);
Serial.print(”Current Time: “);
Serial.print(currentFootstepTime);
Serial.print(” “);
Serial.print(”Last Time: “);
Serial.print(lastFootstepTime);
Serial.print(” “);
Serial.print(”Current Foot Speed: “);
Serial.print(currentFootSpeed);
Serial.print(” “);
Serial.print(”Average Foot Speed: “);
Serial.println(averageFootSpeed, DEC);
//Serial.print(currentPiezoSensorValue, DEC);
//Serial.println(”,”);
}
}
}
}
<<
<< Piezo sensor>>
After an experiment of an accelerometer sensor, we recognized that it is not easy because we had to make a standard which value is walking and which value is running based on acceleration. So, we decided to change a accelerometer sensor into piezo sensor.
What is the piezo sensor?
A piezoelectric sensor is a device that uses the piezoelectric effect to measure pressure, acceleration, strain or force by converting them to an electrical signal.
It’s a charge amplifier as well. It’s an electronic amplifier which convert an input charge( stored on a capacitor, or significantly capacitive transducer) to a voltage output. -wikipedia