Louis Roche April 14 th to June 26 th 2009 Flavien Rousset Officers project : Velesmoy Tysso Georg Milvang
Louis Roche April 14th to June 26th 2009 Flavien Rousset Officers project :Velesmoy TyssoGeorg Milvang
Use of a component which become essential: accelerometer A project lead from start to finish
Detect the person falling Prevent with LED and sound alarm Determine the position of the person on
the ground
Lightness.Alarm sound audible to all.Fixing the final map on a clothe. Relatively small dimensions. Indoor use.Autonomy (cell board).
based on the fundamental law of dynamic-measurement : m/s² g (gravity)2 big families: bounded and non bounded
Applications:-Speed measurement-Displacement measurement-... in 3 big categories:-shock -vibration acceleration -mobiles acceleration
Wiimote;HDD protection;Aviation;...
Technology MEMS
New generation: NEMS
Time (ms) 0 200 400 600 800 1000 1200 1400 1600
X value 20 18 24 18 19 -6 -26 -25 -24
Y value 25 25 21 17 8 -38 25 26 25
Z value 24 24 30 35 34 -60 19 9 12
G vector 40,01 39,05 43,78 42,87 39,76 71,27 40,77 37,18 36,67
Powering in 3.3VWrapping and soldering of different modulesThis assembly works
One board with all componentsSelf-ruling thanks to 3V cellWirelessLittle space (just go in a pocket)
Input power for the speakerLongevity CPUIn order to protect the speaker
Let to detect an accelerationUse secondary function
void loop() { firstg = calculated (valX,valY,valZ);
Serial.print("\n g= ");Serial.print(firstg);
delay (200);
lastg = calculated (valX,valY,valZ); angle (valX,valY);
Serial.print("\n g'= ");Serial.print(lastg); threshold = abs(lastg - firstg);
if (threshold >= 20)
{ digitalWrite(ledPin,HIGH);
delay (1000); position_information (valZ);
workSpeaker (Halfperiod,StartSpeaker);
} }
Read the X,Y and Z valuesSubtract the middle level valueCalculate the G value
float calculated (long int valX,long int valY,long int valZ)
{ float result; valX = analogRead (xpin) - 235;
Serial.print("\n X= ");Serial.print(valX);
valY = analogRead (ypin) - 250;
Serial.print("\n Y= ");Serial.print(valY);
valZ = analogRead (zpin) -252;
Serial.print("\n Z= ");Serial.print(valZ);
result = sqrt((valX*valX) + (valY*valY) +
(valZ*valZ)); return result; }
Trigger the speaker Built a 500 Hz carry signal frequency
void workSpeaker (int Halfperiod,int StartSpeaker)
{ StartSpeaker = 1; while (StartSpeaker == 1) { digitalWrite(speakerPin, HIGH); delayMicroseconds(Halfperiod); digitalWrite(speakerPin, LOW); delayMicroseconds(Halfperiod); } }
It is important in order to have informations on the person position. Change radians to degrees.
void angle (long int valX,long int valY) { float Xangle; float Yangle; valX = analogRead (xpin) - 235;
valY = analogRead (ypin) - 250; Xangle = (180 / pi)*acos((valX) / (firstg)); Yangle = (180 / pi)*acos((valY) / (firstg)); Serial.print("\n Xangle=
");Serial.print(Xangle);Serial.print(" degrees");
Serial.print("\n Yangle= ");Serial.print(Yangle);Serial.print(" degrees");
}
Project which works Learned to solder SMD componant An interesting development in the futur
(Send informtion via bluetooth)
Louis Roche April 14th to June 26th 2009 Flavien Rousset Officers project :Velesmoy TyssoGeorg Milvang