I am looking at: ADXL345 - Triple-Axis Accelerometer (+-2g/4g/8g/16g) w/ I2C/SPI (PRODUCT ID: 1231) for a project, but I wanted to run it by someone else who knows if this is actually the best accelerometer to use or if there is a better one.
My student is trying to measure the impact of head-blows for soccer players. This would be both from heading a soccer ball to running into the goal posts or another player (hopefully those last two don't happen too often). The student is then trying to use this data to predict concussions and brain trauma. Pretty cool, actually, and the current plan is to put a micro-arduino, battery pack, and a small accelerometer sewn into the back of a head band. Generally speaking, what the front of the head does is what the back of the head does :)
But the question is the ability to measure spikes. I have no idea what sort of instantaneous acceleration happens when heading a ball, but is 16g enough? Will the accelerometer mentioned above be able to measure an acceleration that happens as quickly as in heading a ball? Is this the droid I'm looking for or is there a chosen one I should be waiting for? (apologies to both Star Wars and Legos)
Best accelerometer for measuring Soccer impacts?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
I haven't instrumented any craniums, but for reference, dropping a ~1 lb hand-held medical instrument from 1.5 meters onto a tile floor yielded impact spikes of over 190 G (measured with an ADXL377). I'd expect heading a ball to be quite a bit less than that, but a collision with a goal-post or another player might approach that.
This page on sports concussions mentions forces in the 90-100G range, so I think you want something that will cover that at least. https://www.adafruit.com/product/1413
http://www.concussionconnection.com/bio ... ncussions/
This page on sports concussions mentions forces in the 90-100G range, so I think you want something that will cover that at least. https://www.adafruit.com/product/1413
http://www.concussionconnection.com/bio ... ncussions/
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
Re: Best accelerometer for measuring Soccer impacts?
Thank you! The 200g limit is much, much better!
New Question: I would love to use the Trinket or even just a Tiny to drive this since all I really need is to record the data from the accelerometer and kids will be wearing this on their heads (less weight is much, much better). Is there a way to go minimal but still have the ability to write the data to a microSD card?
Ex: Tiny + Battery Back + ADXL377 + SD card writer + Headband
New Question: I would love to use the Trinket or even just a Tiny to drive this since all I really need is to record the data from the accelerometer and kids will be wearing this on their heads (less weight is much, much better). Is there a way to go minimal but still have the ability to write the data to a microSD card?
Ex: Tiny + Battery Back + ADXL377 + SD card writer + Headband
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
Not enough memory or pins on the Trinket. The SD block buffer would take up all available SRAM. But a Pro-trinket should handle it. With the 3.3v version, you could run the whole thing from a small LiPo.
https://www.adafruit.com/product/2010
https://www.adafruit.com/product/2010
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
Re: Best accelerometer for measuring Soccer impacts?
OK - just to see if I have this right...
With the following four items, I could have a data-logging, mobile accelerometer device that will store accelerometer data to a micro SD card?
(1) Pro Trinket (3.3V)
(2) ADXL377 (200g accelerometer)
(3) MicroSD card breakout board +
(4) Adafruit Pro Trinket LiIon/LiPoly Backpack Add-On (with 500mA battery)
I am not worried about a RTC (would be nice, but not necessary), so I can use millis() to keep track of timing from start of the trinket. Everything combined looks to weight about 9.6g + the battery itself, which could be from 10.5g down to 3g depending on the amount of time I need. I would want a FDTI cable for debugging, but I would start with using an Arduino Uno with a breadboard to make sure everything worked, and then switch to the Pro Trinket. Any flaws/incompatibilities with this idea/set up?
Thank you in advance!
James
With the following four items, I could have a data-logging, mobile accelerometer device that will store accelerometer data to a micro SD card?
(1) Pro Trinket (3.3V)
(2) ADXL377 (200g accelerometer)
(3) MicroSD card breakout board +
(4) Adafruit Pro Trinket LiIon/LiPoly Backpack Add-On (with 500mA battery)
I am not worried about a RTC (would be nice, but not necessary), so I can use millis() to keep track of timing from start of the trinket. Everything combined looks to weight about 9.6g + the battery itself, which could be from 10.5g down to 3g depending on the amount of time I need. I would want a FDTI cable for debugging, but I would start with using an Arduino Uno with a breadboard to make sure everything worked, and then switch to the Pro Trinket. Any flaws/incompatibilities with this idea/set up?
Thank you in advance!
James
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
Re: Best accelerometer for measuring Soccer impacts?
Oh - and is it possible/reasonable to have different capacitors put on the ADXL377 so it can record faster than 500Hz? I do not know that this is needed, but the chip goes up to 1KHz (speed set by the capacitors), and for soccer head injuries (heading a ball, heading other heads, goal posts, etc.) I would think having all the possible data would be beneficial.
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
That looks like a workable configuration. Changing the caps is tricky, but can be done if you are good at SMT hand-soldering. But I'm not sure it is necessary. I get pretty good impact peaks just sampling open-loop with an UNO.
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
Re: Best accelerometer for measuring Soccer impacts?
Excellent. I am ordering all the above-mentioned stuff along with a 150mAh lipo battery. We will see if that is enough juice to last a full soccer game and bump up to the next battery if it isn't. However, you guys are out of stock on the Pro Trinket. That is not an immediate problem because I can use the Uno to prototype my student's, uhm, prototype, until the Pro Trinket becomes available, but the question now is will I be able to attach the battery pack to the Uno so I can recharge the lipo battery?
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
The UNO doesn't have a way to charge the battery. But you could temporarily breadboard a circuit for the backpack. You would just need to connect the 5v and GND pins.but the question now is will I be able to attach the battery pack to the Uno so I can recharge the lipo battery?
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
For reference, this is a simple 3-axis data logging sketch that works well with the ADXL377
Code: Select all
/*
Accelerometer Data Logger
W. Earl
10/22/2013
*/
#include <SD.h> // SD card library
#include <Wire.h> // i2c library
#include "RTClib.h" // DS1302 real-time clock
RTC_DS1307 RTC;
const int chipSelect = 10; // Adafruit Logger Shield.
const int buttonPin = 7;
const int ledPin = 6;
//---------------------
// Setup
void setup()
{
// Enable pullups on the button pin
pinMode(buttonPin, INPUT_PULLUP);
// Open serial communications and wait for port to open:
Serial.begin(9600);
// ------------------------
// Initialize the SD card:
// make sure that the default chip select pin is set to
// output, even if you don't use it:
pinMode(10, OUTPUT);
Serial.print("Initializing SD card...");
// see if the card is present and can be initialized:
if (!SD.begin(chipSelect))
{
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
Serial.println("card initialized.");
//--------------------------
// Initialize the Real-Time Clock
Wire.begin();
if (!RTC.begin())
{
Serial.println("RTC failed");
}
if (! RTC.isrunning()) // Sync to compile time if not running
{
Serial.println("RTC not running - Initialize!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}
}
// State data:
boolean logging = false;
File dataFile;
long start = 0;
long samples = 0;
//---------------------
// Main Loop
void loop()
{
// make a string for assembling the data to log:
String dataString = "";
//-------------------
// Data Acquisition
// read three sensors and append to the string:
for (int analogPin = 0; analogPin < 3; analogPin++)
{
analogRead(analogPin); // throw away
//digitalWrite(ledPin, logging);
int sensor = analogRead(analogPin);
dataString += String(sensor);
if (analogPin < 2)
{
dataString += ",";
}
samples++;
}
//------------------
// Logging Mode
if (logging) // write to file - look for stop button
{
if (dataFile)
{
dataFile.println(dataString);
}
if (digitalRead(buttonPin) == LOW)
{
dataFile.close();
// print to the serial port too:
Serial.println("End Log");
Serial.print("Samples = ");
Serial.println(samples);
Serial.print("milliseconds = ");
Serial.println(millis() - start);
logging = false;
delay(100); // debounce
while(digitalRead(buttonPin) == LOW);
}
}
// ------------
// Idle Mode
else // not logging - look for start button
{
if (digitalRead(buttonPin) == LOW)
{
// create a new file
char filename[] = "ACCEL000.CSV";
for (uint8_t i = 0; i < 1000; i++)
{
filename[6] = i/100 + '0';
filename[6] = (i%100)/10 + '0';
filename[7] = i%10 + '0';
if (! SD.exists(filename))
{
// only open a new file if it doesn't exist
dataFile = SD.open(filename, FILE_WRITE);
break; // leave the loop!
}
}
String DateTimeString = "";
DateTime now = RTC.now();
DateTimeString += String(now.year());
DateTimeString += "/";
DateTimeString += String(now.month());
DateTimeString += "/";
DateTimeString += String(now.day());
DateTimeString += "-";
DateTimeString += String(now.hour());
DateTimeString += ":";
DateTimeString += String(now.minute());
DateTimeString += ":";
DateTimeString += String(now.second());
Serial.println(filename);
Serial.println(DateTimeString);
// if the file is available, write to it:
if (dataFile)
{
// Print Header
dataFile.print("X, Y, Z,");
dataFile.println(DateTimeString);
// Confirm to Serial Monitor
Serial.println("Start Log");
samples = 0;
logging = true;
}
// if the file isn't open, pop up an error:
else
{
Serial.println("error opening datalog.txt");
}
delay(20); // debounce
while(digitalRead(buttonPin) == LOW)
{
delay(20);
}
start = millis();
}
}
}
- jctj
- Posts: 27
- Joined: Thu Dec 12, 2013 2:47 am
Re: Best accelerometer for measuring Soccer impacts?
I lurv you guys!
(thank you for all the advice, pointers, and the sample sketch - if we get this done, I will try to remember to link what the student does to you all. It will take time to gather the data, but this has some real potential in helping athletes and doctors better understand what is happening out there with concussions and brain trauma.)
(thank you for all the advice, pointers, and the sample sketch - if we get this done, I will try to remember to link what the student does to you all. It will take time to gather the data, but this has some real potential in helping athletes and doctors better understand what is happening out there with concussions and brain trauma.)
- aoborras
- Posts: 2
- Joined: Sun Oct 23, 2016 9:14 pm
Re: Best accelerometer for measuring Soccer impacts?
Could I use this same set-up to measure a punch on a punching bag?jctj wrote:OK - just to see if I have this right...
With the following four items, I could have a data-logging, mobile accelerometer device that will store accelerometer data to a micro SD card?
(1) Pro Trinket (3.3V)
(2) ADXL377 (200g accelerometer)
(3) MicroSD card breakout board +
(4) Adafruit Pro Trinket LiIon/LiPoly Backpack Add-On (with 500mA battery)
I am not worried about a RTC (would be nice, but not necessary), so I can use millis() to keep track of timing from start of the trinket. Everything combined looks to weight about 9.6g + the battery itself, which could be from 10.5g down to 3g depending on the amount of time I need. I would want a FDTI cable for debugging, but I would start with using an Arduino Uno with a breadboard to make sure everything worked, and then switch to the Pro Trinket. Any flaws/incompatibilities with this idea/set up?
Thank you in advance!
James
- Franklin97355
- Posts: 23912
- Joined: Mon Apr 21, 2008 2:33 pm
- aoborras
- Posts: 2
- Joined: Sun Oct 23, 2016 9:14 pm
Re: Best accelerometer for measuring Soccer impacts?
what would I have to change if I wanted to feed the data directly to my laptop?
- adafruit_support_bill
- Posts: 88095
- Joined: Sat Feb 07, 2009 10:11 am
Re: Best accelerometer for measuring Soccer impacts?
Replace calls to "datafile.println" with calls to "Serial.println". That will stream the data back to your computer via the USB/Serial connection.what would I have to change if I wanted to feed the data directly to my laptop?
Please be positive and constructive with your questions and comments.