reaction time measurement

Hi all!,
my research project involves the measurement of the time of reaction to a simple stimulus test.
I have decided to use arduino to implement a little box for the test execution, with a LED and a button, something like in
Arduino Playground - ReactionTimeTester (no need to display data)
I would like to get smaller error bars possible (my arduino duemilanove gives 4 microsecs of accuracy), so I am here to ask the following question:

Which arduino would you choose?

thank you!!

roberto

What are you testing that can respond so quickly?

I will collect people reaction time...something of the order of 300 msec...but using a pc introduces hw and sw delays that I cannot control (standard keyboard signal can take 15 - 20 msec to be detected, depending on the OS, and so on...)
So I think "arduino is what i need".

I would like to get 1 msec accuracy.

I'd expect your due to be able to give you that kind of accuracy, either using millis or micros. But if it's people you're measuring, I wouldn't expect them to be able to do much better than 10ms.

Any microcontroller can easily handle this. An Uno can give you much higher resolution than 4uS, as can any of the boards. The 4uS resolution has to do with the prescaler valued picked by the Arduino development team. If you choose no prescaler, you can get 62.5nS resolution with a 16MHz clock. The 16 bit Timer1 would overflow about every 4mS so you'd need to keep track of the overflows.

have a look at - Arduino Playground - StopWatchClass - think it does a job for you

What are your criteria? If it is just that it can handle 1ms accuracy, I'm pretty sure that they all can do that.

You need to narrow down your criteria some more.

ok, thank to all of you...
My need is to avoid the error introduced by hw and sw components as more as I can.

what do you mean with

wildbill:
I wouldn't expect them to be able to do much better than 10ms.

?
I don't care what they do, I'm interested to clear the process, from the LED lighting up to the button got pressed.

Now I am sure that all of arduino can do the job...thank you!

XD XD

windrob73:
what do you mean with

wildbill:
I wouldn't expect them to be able to do much better than 10ms.

?

In the CAD/CAM lectures I attended a long time ago, I think I recall hearing that the fastest reaction time humans can manage is measured in hundredths of a second. Fencers were given as an example.

when you measure in millis() you are definitely safe, see - http://www.humanbenchmark.com/tests/reactiontime/stats.php -

Arduino advises the resolution for micros() is 8 us for the Uno, and 4 us for the 16 MHz Arduino boards (e.g. Duemilanove and Nano). Does anyone know the micros() resolution for the Due?

ok...so now the problem is: which kind of button shoud i best for this kind of application? a momentary switch or some kind of arcade button?

:roll_eyes: :roll_eyes: :roll_eyes:

Watermargin:
Arduino advises the resolution for micros() is 8 us for the Uno, and 4 us for the 16 MHz Arduino boards (e.g. Duemilanove and Nano). Does anyone know the micros() resolution for the Due?

But a Uno is a 16 Mhz 328P board just like a Duemilanove or Nano board, why would the resolution be different?

Lefty

retrolefty:

Watermargin:
Arduino advises the resolution for micros() is 8 us for the Uno, and 4 us for the 16 MHz Arduino boards (e.g. Duemilanove and Nano). Does anyone know the micros() resolution for the Due?

But a Uno is a 16 Mhz 328P board just like a Duemilanove or Nano board, why would the resolution be different?

Lefty

Not verified, but I'd guess that it's how the timer counter and prescaler are setup initially. If so, it might be possible to modify these to have a finer resolution, but you'd have to write custom code (modify the base code) to read the timer to account for the change.

The "default" resolution for the Uno is also 4uS. It's due to the prescaler of /64 being chosen. Any board with an 8MHz oscillator will have 8uS resolution, and any 16MHz board will have 4uS resolution. You can see that by choosing a prescaler divisor of 1, that the maximum resolution possible is much finer grained at 62.5nS for a 16MHz clock.

Hi all,

I'd like to respond to this thread with ideas from a setup we did use in our lab to measure reaction times. But first off, let me briefly respond to this:

wildbill:
In the CAD/CAM lectures I attended a long time ago, I think I recall hearing that the fastest reaction time humans can manage is measured in hundredths of a second. Fencers were given as an example.

The order of magnitude is indeed right. But the problem we face isn't measuring short reaction times, but precise reaction times. In experimental psychology, we deal with human responses that are highly variable. Mostly because subjects don't necessarily attend to the experiment with care, and, well, we just can't control what's in their head that precisely.
So we want to minimize the variability associated with the reaction times measure. When using the computer, the variability from the human response is added to that of the computer. For us this means that to observe a statistically significant difference between two experiments we'll need the subjects to perform more trials so that this variabilty averages out. That's a loss of time for everyone.
Hence, whatever the average reaction time is (which depends on the task at hand), the problem here is to reduce the variance.

As for the solution we had implemented. We are mostly doing psychoacoustics, so we could use the following trick. A sound card is inherently a very precise piece of hardware temporally speaking. So what we did was using a three channel sound card, two of which send the simuli (stereo), and the last one sending a clic to an arduino (it wasn't an arduino, because they didn't exist at the time, but that's irrelevant). We then had the arduino start a timer that was stopped by a button on the arduino (the subject's response button). The value was then sent to the computer.

The idea is really to have the arduino do the timing, and find a way to send it a "start" signal. In vision experiments, you could imagine doing this by taping a photoresistor to a corner of the screen, which you would light up when the stimulus starts.

I hope this helps.

Hence, whatever the average reaction time is (which depends on the task at hand), the problem here is to reduce the variance.

recognition!
One of the problems I encountered in an experiment (in the early PC days) with reaction time is that we used a computer screen that refreshed @50 or 60 Hz.
It added between 0 and 20 ms to the average reaction time due to the time the screen took to build up.