TinyCircuits

Wrist accelerometer

Wrist accelerometer
« on: November 22, 2016, 02:43:59 PM »
Hi

I need to build wrist accelerometer to use raw accelerometer data for  sleep study .

Can I use Accelerometer TinyShield for this purpose ? I need your recommendation for this

Regards

Grimstone

  • ****
  • 64
  • Still downloading...
    • View Profile
Re: Wrist accelerometer
« Reply #1 on: November 23, 2016, 09:24:38 AM »
I would not see why you couldn't. You could very easily use a Tinyduino with the accelerometer and SD card shields to make a wrist datalogger. You could use the Bluetooth shield instead of the SD card and send the data to a tablet as well. I have made several wearables with them. Good luck with your experiment.

Re: Wrist accelerometer
« Reply #2 on: November 28, 2016, 01:12:00 PM »
Thanks for reply

I'm concerned about :

1.the memory (SD card)  capacity ? if I will use it for example one week everyday from 8 pm to 8 am .

2. for how long TinyDuino Processor Board with Lithium Battery Support can record data based on my requirements ?

3. is the output accelerometer reading is digital or analog ?


Regards

Re: Wrist accelerometer
« Reply #3 on: November 29, 2016, 08:23:02 PM »
What size is your SD card? Normally these days they are in GiB, and it's hard to believe you'd run out of space. Of course, this depends on how you store the data. If you take a sample every millisecond, and record each sample in verbose English, e.g.:

"Today is Wednesday, December 30 2016. The time is 8:10:56.123 p.m. Acceleration is X:aaa; Y:bbb; Z:ccc."

Then you will burn through space much faster than storing a single time_t value stored in binary, and whatever accelerometer data you have, also stored in binary, every 2 seconds.

In other words, you are the best person to answer this, but you will have to come up with a scheme for storing the data, and a sampling frequency that fits within your constraints. If you want it to last a week on a battery, I am going to guess you might have to deal with putting the chip to sleep and waking it periodically. Or use a bigger battery.

Note that you can also get "clever" with the data. Perhaps you use a new file every day, and name the file by the date. That way the date is only recorded once, rather than with every sample! You could also notice that with 86400 seconds in a day, if you sample every 2 seconds, you could simply number them 1-43200 which can be done within 16 bits, and you can save yourself half the timestamp space that way. *Or* you might decide, well, this is a very robust device, and I know it's going to work right up until the time it runs out of battery. Therefore, I will name files after the date and the beginning time, and switch to a new file at midnight, and simply record raw samples at whatever frequency suits me. That way, the time of the sample can be inferred from the start time (recorded in the file name) + the record number * the period. Etc., etc., etc. Lots of ways to potentially save space on recording the time of the data. One other thing to watch for is the maximum file size. On some filesystems/libraries, it's likely to be 2^32 bytes, so try to design a scheme that will fit within the constraint.

I wouldn't know how to help with the other questions.