Category Archives: Hardware
I’ve mentioned OpenSesame briefly on here before, but for those of you who weren’t keeping up, it’s a pretty awesome, free psychology experiment-developing application, built using the Python programming language, and it has a lot in common with PsychoPy (which is also awesome).
The recently-released new version of OpenSesame has just taken an important step, in that it now supports the Android mobile operating system, meaning that it can run natively on Android tablets and smartphones. As far as I’m aware, this is the first time that a psychology-experimental application has been compiled (and released to the masses) for a mobile OS.
This is cool for lots of reasons. It’s an interesting technical achievement; Android is a very different implementation to a desktop OS, being focused heavily on touch interfaces. Such interfaces are now ubiquitous, and are much more accessible, in the sense that people who may struggle with a traditional mouse/keyboard can use them relatively easily. Running psychology experiments on touch-tablets may enable the study of populations (e.g., the very young, very old, or various patient groups) that would be very difficult with a more ‘traditional’ system. Similarly, conducting ‘field’ studies might be much more effective; I can imagine handing a participant a tablet for them to complete some kind of task in the street, or in a shopping mall, for instance. Also, it may open up the possibility of using the variety of sensors in modern mobile devices (light, proximity, accelerometers, magnetometers) in interesting and creative ways. Finally, the hardware is relatively cheap, and (of course) portable.
I’m itching to try this out, but unfortunately don’t have an Android tablet. I love my iPad mini for lots of reasons, but the more restricted nature of Apple’s OS means that it’s unlikely we’ll see a similar system on iOS anytime soon.
So, very exciting times. Here’s a brief demo video of OpenSesame running on a Google Nexus 7 tablet (in the demo the tablet is actually running a version of Ubuntu Linux, but with the new version of OpenSesame it shouldn’t be necessary to replace the Android OS). Let me know in the comments if you have any experience with tablet-experiments, or if you can think of any other creative ways they could be used.
A quick post to point you towards a great website with a lot of really cool content (if you’re into that kind of thing, which if you’re reading this blog, then I assume you probably are… anyway, I digress; I apologise, it was my lab’s Christmas party last night and I’m in a somewhat rambling mood. Anyway, back to the point).
So, the website is called cogsci.nl, and is run by a post-doc at the University of Aix-Marseille called Sebastiaan Mathôt. It’s notable in that it’s the homepage of OpenSesame - a very nice-looking, Python-based graphical experiment builder that I’ve mentioned before on these very pages. There’s a lot of other cool stuff on the site though, including more software (featuring a really cool online tool for instantly creating Gabor patch stimuli), a list of links to stimulus sets, and a selection of really-cool optical illusions. Really worth spending 20 minutes of your time poking around a little and seeing what’s there.
I’ll leave you with a video of Sebastiaan demonstrating an experimental program, written in his OpenSesame system, running on a Google Nexus 7 Tablet (using Ubuntu linux as an OS). The future! It’s here!
A very minimal post merely to point any interested readers towards an interesting discussion going on in the comments section of a post on Engadget here. A reader asked for suggestions for a tablet and/or apps for his developmentally-delayed daughter, and a large number of people have contributed some useful ideas and links. Just try to ignore the (inevitable *sigh*) Android vs. iOS fan-boy squabbling.
Seriously cool toys – Tobii mobile eye-tracking glasses, Pivothead HD video-recording eye-wear, and the Affectiva Q-sensor
The other day I was lucky enough to be able to help out with a bit of data-collection in a well-known London department store, being run by the magnificent Tim Holmes of Acuity Intelligence. This meant that I got to examine some seriously cool bits of new hardware – and new gadgets (especially scientific ones) are basically my kryptonite, so it was generally pretty exciting.
The first thing we used was a mobile eye-tracking system designed and built by Tobii. These have two cameras in – one front-facing to record video of what the participant is looking at, and another infra-red camera to record the participant’s exact eye-position. They can also capture sound in real-time too, and record the eye-tracking data at 30Hz. The system comes with a clip-on box where the data is actually recorded (in the background of the picture on the right) and which is also used for the (fairly brief and painless) initial calibration. It seems like a really great system – the glasses are very light, comfortable and unobtrusive – and could have a really broad range of applications for research, both scientific and marketing-related.
The next cool toy I got to play with was a pair of these:
These are glasses with a camera lens in the centre of the frame (between the eye-lenses) which can record full high-definition video – full 1080p at 30 fps, using an 8Mp sensor. Amazing! They have an 8GB onboard memory which is good for about an hour of recording time, and also have a couple of discreet buttons on the top of the right arm which can be used for taking still pictures in 5-picture burst or 6-picture time-lapse mode. They’re made by a company called Pivothead, and seem to be more intended for casual/recreational/sports use rather than as a research technology (hence the ‘cool’ styling). They’re a reasonably bulky pair of specs, but very light and comfortable, and I don’t think you’d attract much attention filming with them. It’s worth checking out the videos page at their website for examples of what they can do. They’re also only $349 – a lot for a pair of sunglasses, but if you can think of a good use for them, that seems like a snip. If you’re in the UK, they’re also available direct from the Acuity Intelligence website for £299, inc. VAT. I wonder how long it’ll be before they start showing up in law-enforcement/military situations?
The third device I got to geek-out over was one of these little beauties:
This is a ‘Q-Sensor’, made by a company called Affectiva and is about the size of an averagely chunky wristwatch. It has two little dry-contact electrodes on the back which make contact with the skin on the underside of the wrist, and also contains a 3-axis accelerometer and a temperature sensor. This little baby claims to be able to log skin conductance data (plus data from the other sensors) for 24 hours straight on a single charge, and will even stream the data ‘live’ via Bluetooth to a connected system for on-the-fly analysis. It seems like Affectiva are mainly pitching it as a market research tool, but I can think of a few good ‘proper’ research ideas that this would enable as well. This is seriously cool technology.
That’s all folks – TTFN.
I’ve been meaning to write a new post which would be an update to my previous one on good psychology-related iPhone/iPad apps for a while now, but I just came across one app which is just too good not to share immediately. It’s a free app called RFSpotter, written by Nicolas Cottaris of the IRCS and Dept. of Psychology at The University of Pennsylvania, and it generates simple visual psychophysics stimuli for use in mapping receptive fields and the tuning properties thereof. It has a very slick interface, where stimulus size, position and rotation can all be controlled by the usual iOS finger-gestures (e.g. pinch-to-zoom to change stimulus size, two-finger rotation for orientation) with many other parameters editable through a pop-up menu. It will do gratings, patches, dot-clouds, coloured stimuli – all kinds of things! Very, very neat indeed.
The iPad really has the potential to be a serious platform for research, and it’s tools like this that will make it possible to do some really interesting work with it – here’s hoping we see many more specialist, research-oriented apps like this in the future!
I received a couple of e-mails this week from the inimitable, the mighty, the intrepid Prof. Chris Rorden, related to one of my earlier posts about parallel port response boxes. This pleased me greatly a) because he sent me a butt-load of really great information and links that I hadn’t been aware of, and b) because it’s exactly the kind of interaction with researchers that I was hoping that this blog would initiate.
Anyway, he pointed out a lot of new information. First of all, the paper that I cited from 2007 was essentially a re-tread of an older paper from 1992 which also has some nice circuit diagrams in, as well as some useful Turbo Pascal code (does anyone use Turbo Pascal anymore? I guess someone must…). He also directed me to this page which has a lot of information and circuit diagrams for experimental control of a PC.
Another hint he passed on was that on some computers the D0-D7 pins on the parallel port are not bidirectional – so may not work well for some applications, but the C0-C3 pins apparently always work for this kind of application (bottom right in the diagram below).
Regarding using USB input – he pointed me to this fascinating paper (PDF here) which has some theoretical analyses related to the relationship between true and measured RT, with limited resolution clocks. The surprising conclusion is that even with a clock with only a 30ms resolution, the effect on measured RT is negligible. This means that the 125Hz/8ms default USB-polling rate might not be such a big problem after all. Of course one should still be very careful about using ‘standard’ USB devices (i.e. keyboards, mice) for response timing as they can introduce significant errors as well.
Most interestingly, he pointed me towards a really sexy little device board from a company called U-HID.
What this does, in Chris’ words is:
“This allows 8 digital inputs to be read through the USB port. What is great is that it comes with software that allows you to assign any input to any keyboard or mouse button. The included software allows you to flash these changes to the device, so afterwards any computer will see the mappings you assigned. By default, this has a pretty good polling rate of 5ms.”
So, you can attach any kind of switch or input on one end, and when that switch is closed, the computer will see it as a key-press, a mouse-click, or whatever else you assign to it. The ‘Nano’ version of the board is really tiny, and is available from this site for only $35! This looks to be an incredibly useful bit of kit, and is probably the best solution I’ve seen for hooking up arbitrary devices to a USB input – really cool. Chris mentioned that he uses these boards for collecting responses in experiments, and also for reading the optical triggers from a Siemens Trio MRI scanner with his EZlog software (described here).
So – fantastically useful information – many thanks Chris! I’m a fan of keeping things simple, and parallel port inputs for collecting reaction times are certainly a good and easy solution; unfortunately parallel ports are largely obsolete these days, and most new computers don’t have them. The cards are still available for desktops, but in a few years these simple in-out ports may be completely unavailable. We’ll all have to move to USB devices at some point, and the U-HID boards are definitely the best-looking (and cheapest!) solution I’ve seen. I am definitely going to order a couple to try out.
Anyone else have any experience with the U-HID boards? Let me know in the comments. TTFN.
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:
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.
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.