Tuesday, January 12, 2016

Final Project

For this project, we used a sensor and recorded the data from a football hit. We did this by putting the sensor in a football helmet and changing the different amounts of air in the helmet.



We used a single axis accelerometer ADXL193 with a range of up to +/- 250g. We implanted the accelerometer into a 3D printed head and hooked up wires from the accelerometer to the arduino. With the code we used, we were able to gather information in the serial monitor and process it to find how the different amounts of air filled in the helmet changed the amount an impact the head feels.









int potPin = 2;                     // select the input pin for the potentiometer
int ledPin = 11;                    // select the pin for the LED
int val = 0;                        // variable to store the value coming from the sensor

void setup() {
  pinMode(ledPin, OUTPUT);      
  Serial.begin(9600);
}

void loop() {
  val = analogRead(potPin);         // read the value from the sensor
  val = map(val, 0, 1023, -250, 250);  // make val a number between 0 and 255
  analogWrite (ledPin, val);  
  if(val>30 || val<-30)
  {
  Serial.println (val);
  }
//delay(2);  
}


CONCLUSION- It was concluded that with more air added to the helmet, the greater the impact on the head.