Go Down

Topic: reaction time measurement (Read 10006 times) previous topic - next topic

windrob73

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
http://playground.arduino.cc/ComponentLib/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



wildbill

What are you testing that can respond so quickly?

windrob73

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.


wildbill

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.

afremont

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.
Experience, it's what you get when you were expecting something else.

robtillaart


have a look at - http://playground.arduino.cc/Code/StopWatchClass - think it does a job for you
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

adrian_h

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.

windrob73

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

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

wildbill

#8
Mar 23, 2013, 11:12 am Last Edit: Mar 23, 2013, 11:15 am by wildbill Reason: 1

what do you mean with

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.

robtillaart


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

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

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?

windrob73

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?

:smiley-roll: :smiley-roll: :smiley-roll:

retrolefty


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

adrian_h



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.

afremont

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.
Experience, it's what you get when you were expecting something else.

Go Up