RTbox: A device for highly accurate response time measurements
ZHONG-LIN LU
0
0
University of Southern California
,
Los Angeles, California
AND Although computer keyboards and mice are frequently used in measuring response times (RTs), the accuracy of these measurements is quite low. Specialized RT collection devices must be used to obtain more accurate measurements. However, all the existing devices have some shortcomings. We have developed and implemented a new, commercially available device, the RTbox, for highly accurate RT measurements. The RTbox has its own microprocessor and high-resolution clock. It can record the identities and timing of button events with high accuracy, unaffected by potential timing uncertainty or biases during data transmission and processing in the host computer. It stores button events until the host computer chooses to retrieve them. The asynchronous storage greatly simplifies the design of user programs. The RTbox can also receive and record external signals as triggers and can measure RTs with respect to external events. The internal clock of the RTbox can be synchronized with the computer clock, so the device can be used without external triggers. A simple USB connection is sufficient to integrate the RTbox with any standard computer and operating system.
-
In behavioral studies, response times (RTs) provide
valuable measures of human performance (Jastrow, 1890;
Luce, 1991). Defined as the lapse of time between
stimulus or task onset and a subjects response, RTs have been
measured in a variety of tasks, ranging from simple visual
and auditory detection (Arieh & Marks, 2008), choice
reaction (Brown, Marley, Donkin, & Heathcote, 2008), and
object recognition (Lu, Morrison, Hummel, & Holyoak,
2006) tasks to more complex lexical decision tasks (Yap,
Balota, Cortese, & Watson, 2006). RT is also a key
component in speedaccuracy trade-off paradigms (Dosher,
1976; Ratcliff & Smith, 2004). In this article, we describe
the design, implementation, and test results of a new
device, the RTbox, for accurate RT measurements in
behavioral experiments. We focus on the most commonly used
response mode, button responses.
Accurate measurements of RTs require recording of
two time stamps, the onset time of a stimulus or task and
the time of a subjects response, with millisecond
accuracy. It would be ideal that both time stamps are
represented in the same time basethat is, according to the
same clock. They should also be reliable, free of
systematic bias and excessive measurement noise, and not
affected by any timing jitter caused by standard computer
hardware and operating systems. For an RT measurement
device to be widely applicable, it must be (1) compatible
with the standard, widely used computer hardware, such
as Intel PC-compatible computers and Apple Macintosh
computers; (2) compatible with the commonly used
operating systems, including Microsoft Windows, Apple
Mac OS X, and GNU/Linux; (3) easy to use and control
from stimulus presentation software; and (4) easy to set up
(only a minimal amount of work is required to integrate
the device into common experimental setups). To reduce
the impact of other component devices in experimental
setups on RT measurements, it is also essential that the
device can collect a subjects responses asynchronously: It
should be capable of storing the timing of all the response
events until it is convenient for the user software to
retrieve them. The ability to detect and time stamp signals
from external devicesfor example, transistortransistor
logic trigger signals from a stimulus or data acquisition
deviceis also a very useful feature. Before describing
our RTbox, we review a few commonly used RT collection
methods and devices.
Computer keyboards and mice are widely used for RT
measurements. These devices are cheap, do not require
any special hardware setup or programming, and naturally
work with any computer hardware, operating system, and
standard software toolkit. However, the use of a keyboard
and mouse often leads to huge variations and biases in
RT measurements. Figure 1 shows a typical sequence of
events involved in obtaining a buttonpress response with
a regular computer keyboard. There are several sources of
timing error in keyboard responses.
1. Mechanical lag. Typical keyboard and mouse buttons
are implemented as electrical contacts that close and open
an electronic circuit when the subject presses and releases
a key or button. A keyboard encoder chip is used to register
each closing of the electric circuit as a key-/buttonpress.
Depending on the mechanics of the keys/buttons, there is
some delay between key/button press/release and circuit
switch on/off. This kind of delay cannot be eliminated
totally, but some keyboards and mice may introduce
unknown long delays.
2. Debouncing. Due to mechanical imperfections,
button bouncingthat is, an electrical contact opening
and closing the circuit multiple times in quick
succession for a single key-/buttonpressoften happens. To
eliminate the errors caused by button bouncing, the
encoder chip performs debouncingtreating switch-on and
switch-off events within a certain time window as a single
event. Although the length of the time window and the
exact implementation of the debouncing algorithm vary
across keyboard models and manufacturers, a 20-msec
delay due to debouncing is not uncommon. This
introduces a systematic delay but does not affect relative RT
measurements.
Mechanical lag and
debouncing delay
Computer system gets
event from encoder
User code reads event
from computer system
Scanning bias: 520 msec
Operating system, CPU
load, and user
programdependent variable delay
3. Scanning. To save manufacturing costs, there is
not a dedicated electric connection from each key on a
keyboard to an input of the encoder chip. Instead, the
electrical contacts are arranged in a matrix form, with
the switches placed at the intersections of the rows and
columns in the matrix. A keyboard with up to 128 keys
typically uses 24 connections on the chip and an 8
16 matrix. Pressing a key closes the electric circuit in one
row and one column of the matrix. The keyboard encoder
sequentially and periodically scans the connections in all
the columns and rows and uses the state of the matrix to
identify the key/button pressed/released. Keys connected
to different rows and columns are checked at different
times in the cycle. Depending on the keyboard encoder,
the scan cycle typically takes 520 msec and may
introduce a 5- to 20-msec timing bias among keys (Shimizu,
2002) if multiple keys at different rows/columns of the
matrix are used in an experiment. A mouse typically has
only one to three buttons, so it is not vulnerable to
scanning bias. However, some mice may have up to a 70-msec
delay and variations due to other design issues (Plant,
Hammond, & Whitehouse, 2003).
4. Polling. Mice and keyboards are usually connected
to their host computers via the USB using the USBHID
protocolan inexpensive, flexible, and standardized
communicati (...truncated)