How to make your own parallel port response boxes

I’ve previously written about the importance of response hardware for doing timing-accurate experiments – in a nutshell, anything you connect via USB is likely to be sub-optimal,* because the operating system only polls (or looks for an input) on the USB port some of the time – in Windows the USB polling rate is 125Hz, or every 8ms.

So, for accurate timing of responses, we want to use something other than the USB port. There are various options – my personal favourite is to use the 25-pin parallel (or ‘printer’) port. Some newer desktop models unfortunately don’t have parallel ports anymore, as they’re largely obsolete for connecting peripherals, however any model older than two or three years should have one – and you generally don’t need a super-fast, up-to-date computer for running stimulus programs and collecting data.

I needed a couple of response boxes for a project recently, and decided to just make them up myself. I came across this fantastic little paper  (PDF) which describes a simple method of taking apart a couple of standard computer mice, and rewiring the switches into a parallel port plug – this gives you up to six buttons. The circuit diagram is really, really simple:

Circuit Diagram for a six-button, parallel port response box. Reproduced from Voss, Leonhart and Stahl (2007).

It’s just the switches, and a 100-ohm resistor for each one, wired up to different pins on the data register of the port, with a common ground (pin 18). Honestly, if you were being lazy, you could even just forget about the resistors and it would still work fine. I decided not to take apart any mice, but just to use some buttons I bought off-the-shelf, as I only needed two for each box. Getting the right buttons is really important for this kind of thing – you want them to be a decent size, and have a good clicky-action, without being too difficult to depress. I also got some small plastic boxes, some multi-core cable (I used standard network cable as it’s quite stiff and robust, but almost anything will do), and some parallel port plugs. You can buy everything you need from Maplin or Radio Spares (Radio Shack, if you’re in the US) for about £10-15. I just drilled some holes in the boxes fairly roughly and secured the buttons there with a dab of epoxy resin, but you can get as fancy as you want in that respect.

The only really tricky bit is deciding which pins on the parallel port you want to wire your switches up to. This will largely be determined by which pins the software you’re going to use can read from. Psychology software like Inquisit or E-prime is able to read inputs from pins 2-9 on the data register (see below diagram) but it’s worth doing a bit of reading about the different pins on the parallel port and what they’re used for. A good place to start is here. Probably what you want to do is use one of the data pins for one pole of each switch, and wire the other pole to a common ground pin, as in the above diagram.

Parallel port pin diagram showing the three registers (data, status and control) and the ground pins (in green)

So there you have it – the most simple, inexpensive and accurate solution for recording response times in cognitive experiments. If you’re at all handy with a soldering iron you can probably knock up a couple of these in half an hour or so. If you’ve never done any electronics or soldering before, then this would be an ideal first project to get started with! This was my finished article:

Nice, huh? Happy soldering! TTFN.

*Not quite true – some of the expensive button-boxes you can buy from psychology software companies are USB, but have their own electronics inside them to get around this and time things accurately.


About Matt Wall

I do brains. BRAINZZZZ.

Posted on April 15, 2012, in Experimental techniques, Hardware and tagged , , , . Bookmark the permalink. 5 Comments.

  1. Hello Matt! Love the information and am liking the site! I was hoping that you wouldn’t mind expanding on this a little bit, maybe in a personal email? It’s just that I don’t know a whole lot about electronics (though I’m learning), and I would love just a couple of tips on how to actually implement this. Specifically:

    I’m not sure what you mean by a ‘common ground’. Some of the switches that I’ve seen in the local electronics store have two terminals, I assume one is ‘hot’ and the other is ‘cold’… I guess what I’m getting at is I don’t know what cables to hook up where. You strip the cables on one end of the parallel cable and solder them to the switches right? I guess I would just like to know which cable goes where.

    I was trying to figure this out by myself, but was hoping you wouldn’t mind throwing me a bone. I’d rather not blow out my motherboard in a trial and error process…

    Thanks again, take care.


  1. Pingback: More on response hardware: parallel port and USB. « Computing for Psychologists

  2. Pingback: Link-posting frenzy « Computing for Psychologists

  3. Pingback: How to pilot an experiment « Computing for Psychologists

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: