Recording & storing data from sensors advice

Hi there, I hope this is the right forum to ask this question, apologies if not. I was wondering if anyone had any advice on how to go about doing the following, or whether they had done something similar...

I would like to process some data coming in from sensors that are placed on the body and detecting movements. It's for a physiotherapy purpose, and the situation would pan out something like this:

  1. patient puts on the device and is taken through the "correct" exercise, in terms of extent of movement and speed
  2. this "perfect motion" is recorded / remembered by the device somehow
  3. when the patient is at home doing their exercises, what they are doing is compared to the stored motion, and if they're doing it wrong, advice on correcting themselves can be given to them in real time
  4. at the same time, everything the patient is doing is also recorded, regardless of whether they're doing it wrong or not

I have the sensing bit all set up. I've got an Arduino that can be worn on the body wirelessly sending numbers to a receiving Arduino connected to a computer, which is outputting the numbers via the serial monitor. I have experimented a little bit with this nifty GoBetwino program and have created text files that record all of these numbers along with their timestamp. I can open these text files in Excel and plot graphs etc – maybe I could program something in Visual Basic to do this automatically. I'm asking round some acquaintances that know about databases to give me some advice on this too.

The thing is, ideally I would not have the computer involved. I would rather have the numbers transmitted to a portable object that simply sits on a table, waiting to be used. Basically what I want is a tiny computer, but sadly those don't exist. What can I use instead? Is the Logomatic something I should be looking into? http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=193

Sorry for writing a lot. Any advice would be greatly appreciated.

8.17 x 7 x 1.06 in http://usa.asus.com/product.aspx?P_ID=QUObl5lSRQQ3lSqJ would something like this work?

How about recording the data to an onboard SD card on the Arduino.

That way you would not need any external devices at all.

tiny computer, but sadly those don’t exist.

There are some pretty small computers around, for that matter there’s iPods/Pad.


Rob

Thanks for the replies guys. Ideally the object would be something about the size of a Rubiks cube. I'm trying to avoid having the patient have to power up a PC each time they need to do their exercises.

Never thought about iPods / iPhones, they run excel, I shall look into that.

MikMo, thanks for the GoBetwino program! The SD card method I'm vaguely aware of, I see there are a number of forum topics on this already so I shall go read those, such as these: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/8 http://www.arduino.cc/playground/Code/ExtendedDatabaseLibrary

What is the purpose of collecting the data? If the primary purpose is to provide immediate feedback, then I can't see how an SD card would be useful. Or any other long term storage mechanism for that matter.

The PC, which can both store and display data, makes sense.

The iDevices make sense to, if you want to buy a developers license to actually create apps for them, since they can both store and display data.

The SD card could be used to show you later what you did wrong, but it sounds like the feedback aspect is far more important than the storage aspect.

Well I want my cake and eat it really. The idea is to have both short and long term feedback. i.e. it tells you if you're doing the motion incorrectly as you're doing it, as well as recording the motions you actually do so that you can see your performance over time and tell where you are on the recovery journey.

I will go with a PC setup for the moment, that will be enough of a challenge to be getting on with. I thought perhaps that by storing numbers on an SD card, the Arduino could dip into it and get the info it needed where necessary

The reason I was asking is that it sounds like you are trying to teach correct movement from the beginning, so the patient forms muscle memory, not strictly brain memory.

To do that, the feedback needs to be immediate. Looking at data two weeks later in the doctors office won't be useful at all, I would think.

I would like to process some data coming in from sensors that are placed on the body and detecting movements.

What kind of sensors? How many?

At 115200 baud, you can send 11,520 bytes per second, or 5,760 ints. That's either a lot of sensors or a lot of idle time. Maybe not exactly idle, since some time is involved in reading the sensors, but there will be a fair amount of excess capacity.

The more interesting part of the project is the 3D animation on the PC, I think. What language/software are you planning to use? I like C# and OpenGL myself for something like this.

If the primary purpose is to provide immediate feedback, then I can’t see how an SD card would be useful. Or any other long term storage mechanism for that matter.

Why? You can read an SD card faster than you can read the arduino A/D or receive UART serial data(even if the SD card is in SPI mode) so whats the problem? Is there something wrong with the arduino SD card interface?

To do that, the feedback needs to be immediate. Looking at data two weeks later in the doctors office won't be useful at all, I would think.

Yeah, totally agree with you. We found that people tend to stop doing their exercises because they're just not sure what they're doing is right. Also if you do it wrong you may do more damage than good. But we need the historical aspect of it too as sometimes the recovery process is so gradual, you may feel that the exercise is having no effect and so you stop. Also, keeping a log will enable the therapist to check that the patient is doing what they've been prescribed.

What kind of sensors? How many?

Been experimenting with flex sensors and an accelerometer. I don't think we will use the latter, and instead have three bend sensors in different orientations working at the same time. The values coming out of them relative to each other should indicate what's going on. Strong emphasis on the should, we need to test that out.

The more interesting part of the project is the 3D animation on the PC, I think. What language/software are you planning to use? I like C# and OpenGL myself for something like this.

This is the interesting part for me too for sure! To be honest, we're not sure what form the feedback will take. It might be clear-cut, drill-sergeant spoken instructions, or something more abstract (matching colours, or audio tones for example). The only program I am slightly familiar with is Processing.

At 115200 baud, you can send 11,520 bytes per second, or 5,760 ints. That's either a lot of sensors or a lot of idle time. Maybe not exactly idle, since some time is involved in reading the sensors, but there will be a fair amount of excess capacity.

Thanks, I will take this into consideration for sure.