Main Site Documentation

FEZ Panda fast enough?


#1

Hello

Me and a couple of friends from training (all engineers in different disciplines) are planning to build a force testing device. We practice martial arts and want to measure force and speed of the impact of kicks and punches. I’m the software guy in our group and my job is to bring the data together, so that we can visualize the data :slight_smile:

The Imapct is very fast and so I was wondering, what the sampling rate of the analog inputs is on FEZ Panda. And is it possible to buffer all the data until it is written or transfered via USB?

Regrads


#2

Should be more then fast enough to take the measurements from your force gauge or flex gauge. 20-30 times second at least.


#3

What is “fast”? Is 1000 times/sec fast? In some applications 1000/times a second is very slow and to some it is very fast :slight_smile:

Yes you can do buffering. You have 40KB of free RAM that you can use anyway you like.

I am too busy to test it out but can someone make a loop on FEZ and read an analog input 10000 times to see how long it would take?


int i = 10000;
while(i-- > 0)
{
   Analog.Read();
}


#4

lol I said a lower number due to kicking and punching. If someone can puch something 1000 times a second they dont really care about how hard they are hitting do they :o


#5

Force changes so rapidly that one kick or punch would need many samples to ensure you get a reading at or near the peak as well as the overall force over a longer time.

On a pre-prod Panda, using this code:

            starttime = DateTime.Now;
            while (i > 0)
            {
                AnPin.Read();
                i--;
            }
            endtime = DateTime.Now;
            Debug.Print("Start at " + starttime.Ticks.ToString());
            Debug.Print("Ended at " + endtime.Ticks.ToString());
            delta = (endtime.Ticks - starttime.Ticks);
            Debug.Print("Delta =  " + delta.ToString());

I get:

Start at 128752419463682345
Ended at 128752419471211310
Delta = 7528965

So 753msec to read 10k samples, not including stuffing them into anything…


#6

So is it FASTTTTTTTT? :smiley:


#7

probably too fast for it’s own good ! :wink:

10k samples in that length of time is good. Then you have to figure out what to do with the data you collected :slight_smile:


#8

The real question is how fast do you actually need to collect data? This is the Nyquist frequency: http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem . Basically, you should sample at 2x the max freq you are worried about capturing.

So take a look at how fast the phenomenon you want to measure will change, and how fast the sensor your using will respond to a change. Now you’ll have an idea of how fast you’ll need to read the signal. Now that your reading in data at about the correct rate how much of the signal to you really need to care about enough to save it? If what your reading is not changing than why keep 10,000 data points of the exact same reading (or data points with a delta that is down in the noise)? Time stamp the points of interest then the software that your using to interpret the data can interpolate between these points.


#9

Wow guys! Thanks a lot for all the helpful inputs and the mesurement!

This does really help our project!

We will now get the pressure sensors and the accelerometer and then make some tests to find out, what a good sampling rate would be!

Thanks a lot for the info! I Hope that GHI also ships to switzerland and then I will probably keep everybody whos interessted up-to-date in the project section :slight_smile:

Regards,

Lionel


#10

Please post more about the project and if you upload all details and code you will also receive experience points http://www.tinyclr.com/forum/users


#11

I saw, that there is an accelerometer available in the hardware section for FEZ Panda. Has anyone experience with that? What is the maximal acceleration that I can measure with this and how fast is it? I would prefer using this rather than an analog one-axis chip.

If anyone has this with FEZ Panda, you would do me a huge favor, if you could test it with the 10K data point loop as well :slight_smile:

Regards

Lionel


#12

I only know of 2 of us that have the panda’s out side of GHI. I don’t have that specific device to test for you.


#13

Kashimu,

Look at the chip’s datasheet, also this isn’t really the best way to ask that question. You’d get much more attention if you started a topic for it. :wink: