Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

[open] precision keyboard

embodimentembodiment Posts: 90
edited January 2013 in Miscellaneous

Hi all.

I want to buy a (not expensive) USB keyboard for my experiment. I'm wondering if there are models that can guarantee a low latency. For example, this model has a (declared) 1ms response time, but I don't know how much this value is reliable.

Someone could suggest me any model?

Comments

  • sebastiaansebastiaan Posts: 2,811
    edited 1:17PM

    I don't have any experience with special low-latency keyboards. In principle, increasing the polling rate would reduce the latency, but since other factors are important as well (and I see no benchmarks to back up their claim), I'm inclined to think that 1ms is optimistic. But it might be better than a regular keyboard, of course.

    May I ask why you require a special low-latency keyboard? In general, the impact on the reliability of the results is very small, relative to a regular keyboard. See for example this paper by Damian (paywalled, I'm sorry to say). An exception might be the situation where you want to time-lock something to the response (ERP, voice signal, etc.), in which case a small jitter might be more detrimental.

    Personally, I think that using a button box is the best way to improve your data because (in addition to the relatively minor benefit of having a very low latency) they are easier for the participant: Less confusion about the correct keys, easier to instruct, and they look more professional.

    Cheers!

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • embodimentembodiment Posts: 90
    edited 1:17PM

    I also think that a button box is the best choice, but button boxes are very expensive for me. I knew Damian's paper, and I agree that the final improvement on the reliability is small. On the other hand, I think that this depends from the statistical analysis one choose to conduct. If the researcher carry out a regular ANOVA, or t-test etc., taking the means as the comparing value, it is very likely that the small hardware precision disappears in the whole group of trials. But if one conducts a mixed-effects model, taking the single trial reaction time as the statistic observation, I suspect that the things could be different. But this is only an opinion, I haven't read nothing about that.

  • sebastiaansebastiaan Posts: 2,811
    edited January 2013

    I knew Damian's paper, and I agree that the final improvement on the reliability is small. On the other hand, I think that this depends from the statistical analysis one choose to conduct. If the researcher carry out a regular ANOVA, or t-test etc., taking the means as the comparing value, it is very likely that the small hardware precision disappears in the whole group of trials. But if one conducts a mixed-effects model, taking the single trial reaction time as the statistic observation, I suspect that the things could be different.

    Yes, I hadn't really thought of that, but it kind of makes sense. You'd have to run a simulation to find out the extent to which it makes a difference, I suppose.

    I also think that a button box is the best choice, but button boxes are very expensive for me.

    Would you by any chance be interested in an early model of a Boks? This is a simple USB button box that we have been developing with a small Dutch electronics company. The idea is that it will be much cheaper than existing button boxes (although we can of course not match the price of mass produced electronics), and that part of the profit (if any!) goes to OpenSesame. A nice perk is that there is also a photodiode at the bottom of the device (see the last photo), which you can use to verify the responsiveness of your own system. I just tested it in the lab here, and on that setup this was about 0.3ms (so that's the whole cycle from presenting a display to recording the photodiode response to the display).

    I just received a prototype this week, and I played with a for a bit. It works really well, and the buttons feel sturdy and comfortable. If you would be interested in having one, I could ask the electronics guys how much they would charge for a prototype? It would be more expensive than the keyboard that you linked to, but probably not much (I cannot name a specific price right now, because it's not up to me). It's in development stage right now, so it would be very helpful to receive some feedback.

    Here are some pictures, let me know if you're interested (this model has 2 buttons, but there's also a 4 button model.)

    There's a power LED, but you can turn it off for testing in the dark. There is a USB connector at the back.

    image

    image

    Photodiode at the bottom. You can hold that against the computer monitor to test the responsiveness of the system, which should be in the sub-millisecond range.

    image

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • EdwinEdwin Posts: 638
    edited 1:17PM

    Hi Sebastiaan,

    If I get this correctly, you've produced a USB box with a latency of about 0.3 ms? I'm not that deep into hardware specs, but I always thought latencies via USB could be relatively big and unpredictable (mostly due to drivers and buffering). So, couple of questions: did you (/the company you refer to) create your own driver? (I'm thinking yes, since Windows' own generic drivers pull out stuff every 9 ms, I believe). We use photodiodes to pick up on screen flips and you mention that you can hold up your device's bottom (with photodiode) to the screen, so I'm guessing it's for registering the refreshing of the screen after a buttonpress on the Boks, right? Considering the refresh rate of most monitors, 0.3 ms seems like a really short time for this. So I'm really curious about what the device does exactly, how it's input is handled by a computer and how the figure of 0.3 ms was established.

    If your measurement is accurate, at that cost, the Boks sounds quite promising!

  • sebastiaansebastiaan Posts: 2,811
    edited 1:17PM

    If I get this correctly, you've produced a USB box with a latency of about 0.3 ms? I'm not that deep into hardware specs, but I always thought latencies via USB could be relatively big and unpredictable (mostly due to drivers and buffering).

    Right, I've heard that too, but I think that's just the way that most USB devices work, because a regular mouse and keyboard don't need a very high polling rate. The 0.3 milliseconds is actually a combined latency of the entire cycle from showing a display, to collecting and logging a response. If you just poll the device, you get a latency of about 90 microseconds (on my test setup).

    So, couple of questions: did you (/the company you refer to) create your own driver? (I'm thinking yes, since Windows' own generic drivers pull out stuff every 9 ms, I believe).

    Inside the Boks is an Arduino, which is a simple and cheap microcontroller (it can do a lot of stuff though!). For Windows it indeed has its own drivers, on Linux it works out of the box. But personally writing device drivers is out of my league!

    We use photodiodes to pick up on screen flips and you mention that you can hold up your device's bottom (with photodiode) to the screen, so I'm guessing it's for registering the refreshing of the screen after a buttonpress on the Boks, right?

    What I did is present a white display, which triggers a response from the boks (the photodiode is the fifth button, essentially). The 0.3 ms is the difference between the presentation time of the display and the response time of the boks. So the boks response is received 0.3 ms after the display is shown. I think this is a good test, because it sort of resembles how experiments work, with a stimulus followed by a response.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • embodimentembodiment Posts: 90
    edited 1:17PM

    I also think the button box is promising. Currently, I'm carrying out two experiments. In the first, participants have to press one button. In the other one, participants have to press three buttons, that have to be vertically (or also horizontally) aligned. Each button corresponds to a specific image on the screen (up, center, down or laft, center, tight). For this reason, an optimal button box should be more or less like this one, regarding the buttons position. The Cedrus model has five buttons, but alternatively, if the four buttons are horizontally aligned, it may be ok for me.

    My colleagues and I could be interested in a model of Boks, but this will depend on various aspects.

    Please, let me know the price and the lead/construction time.

  • EdwinEdwin Posts: 638
    edited 1:17PM

    Ah, yes, that explains it. Thanks for the explanation. Based on your testing, the Boks sounds really neat! If you have a more-or-less releasable version (complete with clear price tag), please do notify me. I do know of a few people here that would most definitely be interested!

  • sebastiaansebastiaan Posts: 2,811
    edited 1:17PM

    OK, I'll send Paul (one of the two guys who has built the device) an e-mail and put you guys in the CC. He can answer more specific questions about the price, possibilities for a custom design, and the extent to which the hardware is ready (the software is less important, as it can be updated).

    Btw, I realized that I should also clarify my previous point about the 90 microsecond latency. The way that it works is that the software relies (in part) on the clock of the Arduino itself to calculate response times. So the fact that it takes some time (although very little) to send data back to the computer does not introduce any noise or delay. But sending a command to the Arduino, and waiting for a response to be sent back takes more than 90 microseconds (which I might have implied).

    Just to have an idea of how it integrates with OpenSesame, this is a screenshot of the plug-in:

    image

    You can also use it in inline script, and (for other languages than Python) through a serial port connection.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • sebastiaansebastiaan Posts: 2,811
    edited February 2013

    Fyi, I just added a page for the Boks to the documentation site:

    With time, this page will evolve into something more complete, but it already contains some useful benchmarks, installation instructions, etc.

    Cheers!

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • embodimentembodiment Posts: 90
    edited 1:17PM

    Very well, thanks Sebastiaan.

  • EvertoxEvertox Posts: 23
    edited 1:17PM

    Hi Sebastiaan,

    It may be worth contacting Gary Freegard at Swansea University - http://psy.swan.ac.uk/staff/freegard/

    He has developed an alternative experimental response box and it has been tested with OpenSesame and various other experimental applications.
    He delivered an interesting talk on this subject during the Association of Technical Staff in Psychology (ATSiP) conference held in Plymouth last July.

    I am personally interested in this topic due to the increasingly amount of expensive Cedrus Boxes our department requests.

    Conference - http://atsip.herts.ac.uk/2012Conf.html

    Response box report - http://psy.swan.ac.uk/staff/freegard/Response Box Report.pdf

    Thanks

    Anthony McGuffie

  • sebastiaansebastiaan Posts: 2,811
    edited 1:17PM

    Hi Anthony,

    Thanks for the tip! That is an interesting resource, also with respect to the background and methodology that he used to test the response boxes. I'm happy to see that OpenSesame holds its own. But, more than anything else, I'm surprised that the Cedrus devices perform so poorly (even worse than a keyboard!). Certainly given that (as you say) they are pretty expensive.

    And, yeah, I knew about the conference. I actually spent some time in Plymouth (not at that moment, though) a while back. Really cool that Jamie Goodliffe won a prize with his demo of OpenSesame!

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • guipruguipru Posts: 19
    edited May 2016

    Hi,
    I'm intersted by the Sebastiaan intervention' about arduino and access to port.
    I tried to reproduce this with my sensor without success because opensesame doesn't find my button.
    How did you do?
    The link http://osdoc.cogsci.nl/devices/boks/ is closed. I think it is ... .nl/boks/ only.
    Thanks
    GT

  • sebastiaansebastiaan Posts: 2,811
    edited 1:17PM

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.