Timing issues - Serial Response Box

220 views
Skip to first unread message

Vaaal

unread,
Jul 30, 2013, 7:42:16 AM7/30/13
to e-p...@googlegroups.com
Hello to everyone,

I am struggling to get accurate reaction time without starting put my hand in engineering stuff, since I don't have the required knowledge to do like that.
I would like to buy a Serial Response Box, but the technical details in the page are really not enough. I am particularly worried about the serial port connection.
I know that the pooling rate of the usb port is normally 125 hz, that is 8 milliseconds. I am able to overclock that value in order to have a pooling rate of 1000Hz, which is 1 milliseconds, which is quite fine. But, I am still not sure of the accuracy of my measurement, just because using a normal keyboard can add some latency in the process of transmitting information.  This is why I am willing to buy a professional device.

The problem is that I don't know the technical specification of a serial port. There is anything similar to a pooling rate of a serial port? If it is so, how much it is, and there is any way to overclock it? Basically how much accurate is the response box?

The other option is to use DirectIN High Speed Button-Box here http://www.empirisoft.com/directin.aspx, which actually uses a USB port that I can overclock. BUT since I use E-Prime I would like to buy a piece of hardware that is designed to be used with E-Prime, just to avoid unnecessary headache in the future.

So generally my question is: what are the limit and the advantages of having a serial port? Do you think that the Serial Response Box is really 1 ms accurate? Do you use any other equipment?

Thank you for your reply,
Valerio

Paul Groot

unread,
Jul 30, 2013, 8:12:23 AM7/30/13
to e-p...@googlegroups.com
Hi Valerio,

You best option with eprime is to use the serial button box on a *NATIVE* RS232 port. I.e., keep away from USB to RS232 converters if timing accuracy is critical. RS232 ports use a baud rate to specify throughput (in this case configurable to 9600 or 19k2, if I remember correctly). Specific to the serial response box is the so called CPS-setting, which defines the number of bytes are send to the computer per second. This defines the resolution data flow (i.e. refreshes per second) and is 800 by default. Native RS232 ports are interrupt driven, so latencies should be minimal. Although PST doesn't give any details about this, I think that EPrime has some built-in intelligence to increase the accuracy of the reported RT's. (The data stream has a fixed CPS-rate, so it is possible to fix for small 'hiccups' in the interrupt handling.) Such a mechanism could also minimize RT-variance when using a USB converter.

If USB is your only option, you should have a look at the following page:
http://www.pstnet.com/support/kb.asp?TopicID=1835

Also, I personally think that the 1ms requirements are overrated for almost all experiments...

cheers
Paul



--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/efd28746-7911-4f5f-9ef9-87da1954f8b1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Vaaal

unread,
Jul 30, 2013, 9:27:24 AM7/30/13
to e-p...@googlegroups.com
Hi Paul, thank you for your reply.
I am totally not stuck with USB. Actually the machine that I am going to use has a serial port. I just wanted to be sure that the pooling rate with the serial port and in general the latency is better than with usb port. In this case I read from the e-prime file that the latency is around 1.73 with a low standard deviation, which should work fine for my purposes.

The problem with normal keyboard is that I usually record what I call "movement time". This is the time between the releasing of a button until the pressing of a second button. These two buttons are really close, so the reaction times are low. Since the keyboard pooling rate is about 125Hz (8 milliseconds), I found out that all my movement times are multiply of 8 millisecond. This means also that they are all even. As you can imagine, this outcome is hardly acceptable in any journal.
Plus, since I am performing RT experiment in really short latencies, I would like to use a more professional equipment that a simple keyboard, at least because I want to know how much error I am putting in the measurement.
So I suppose that after all the Serial Response Box is the best choice.
Thank you very much,
Valerio

Vaaal

unread,
Jul 30, 2013, 9:35:20 AM7/30/13
to e-p...@googlegroups.com
I was reading your post and I realized that this part is not clear to me:
"CPS-setting, which defines the number of bytes are send to the computer per second. This defines the resolution data flow (i.e. refreshes per second) and is 800 by default?"
What is the difference between this value and the baud rate? When can I change this last value?


On Tuesday, 30 July 2013 13:12:23 UTC+1, Paul Groot wrote:

David McFarlane

unread,
Jul 31, 2013, 10:21:35 AM7/31/13
to e-p...@googlegroups.com
Valerio,

In this context, "baud" refers to bits-per-second
while transmitting data (see
http://en.wikipedia.org/wiki/Baud ). "CPS" here
stands for characters-per-second, which in this
case means bytes-per-second. So every 1000/800 =
1.25 ms the SRBox sends one byte of data (each of
8 bits indicating the state of one switch), with
1000/19200 = 52 µs for transmitting each bit within that byte.

For our purpose, the baud rate is irrelevant as
long as it is fast enough to handle the CPS, so
the CPS is all we care about. Note that, once
started, the SRBox transmits data continuously at
800 CPS, which means that the latency from
response to transmission will be 0-1.25 ms
(depending on when the response happens within
that 1.25 ms window). While that much
uncertainty results from the design alone, other latencies may also occur.

-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder: 1) I do not work for PST. 2)
PST's trained staff take any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp
, and they strive to respond to all requests in
24-48 hours, so make full use of it. 3) In
addition, PST offers several instructional videos
on their YouTube channel
(http://www.youtube.com/user/PSTNET ). 4) If you
do get an answer from PST staff, please extend
the courtesy of posting their reply back here for the sake of others.
\----
><http://www.pstnet.com/support/kb.asp?TopicID=1835>http://www.pstnet.com/support/kb.asp?TopicID=1835
><http://www.empirisoft.com/directin.aspx>http://www.empirisoft.com/directin.aspx,
Reply all
Reply to author
Forward
0 new messages