Elsevier

Journal of Neuroscience Methods

Volume 277, 1 February 2017, Pages 75-82
Journal of Neuroscience Methods

Research Paper
Transitioning EEG experiments away from the laboratory using a Raspberry Pi 2

https://doi.org/10.1016/j.jneumeth.2016.11.013Get rights and content

Highlights

  • Raspberry Pi 2 a viable, low-cost alternative to desktop PC for administration of EEG experiments.

  • Similar ERP activity obtained from an auditory oddball task run on both the Raspberry Pi 2 and PC.

  • Raspberry Pi 2 allows for more mobile EEG experiments in a variety of settings.

Abstract

Background

Electroencephalography (EEG) experiments are typically performed in controlled laboratory settings to minimise noise and produce reliable measurements. These controlled conditions also reduce the applicability of the obtained results to more varied environments and may limit their relevance to everyday situations.

New method

Advances in computer portability may increase the mobility and applicability of EEG results while decreasing costs. In this experiment we show that stimulus presentation using a Raspberry Pi 2 computer provides a low cost, reliable alternative to a traditional desktop PC in the administration of EEG experimental tasks.

Results

Significant and reliable MMN and P3 activity, typical event-related potentials (ERPs) associated with an auditory oddball paradigm, were measured while experiments were administered using the Raspberry Pi 2. While latency differences in ERP triggering were observed between systems, these differences reduced power only marginally, likely due to the reduced processing power of the Raspberry Pi 2.

Comparison with existing method

An auditory oddball task administered using the Raspberry Pi 2 produced similar ERPs to those derived from a desktop PC in a laboratory setting. Despite temporal differences and slight increases in trials needed for similar statistical power, the Raspberry Pi 2 can be used to design and present auditory experiments comparable to a PC.

Results

Our results show that the Raspberry Pi 2 is a low cost alternative to the desktop PC when administering EEG experiments and, due to its small size and low power consumption, will enable mobile EEG experiments unconstrained by a traditional laboratory setting.

Introduction

Laboratory settings provide highly controlled environments ideal for sensitive measures and experimentation such as electroencephalography (EEG) recordings, which can otherwise be contaminated by background interference due to sound, muscle activity, and radio frequency waves (Van Hoey et al., 2000). Unfortunately these benefits are also coupled with certain drawbacks as results may not be entirely applicable to settings outside the laboratory. Alternative EEG designs allow for increased mobility but are often expensive, utilise fewer electrodes, or require the use of cumbersome equipment. A proposed solution to escaping the confines of the laboratory involves a Raspberry Pi 2 computer, a small, low-cost (∼$35) device that has become popular among hobbyists and computer engineers but has also been utilised for research purposes. The Raspberry Pi device has been programmed to use a camera for real-time identification of individuals using palm vein patterns (Joardar et al., 2015), for comparison of protein sequences (Robson and Barker, 2015), analysis of light pulses used in non-invasive diffuse correlation spectroscopy (Tivnan et al., 2015), and is capable of intensive data analysis and data mining (John et al., 2015).

In traditional laboratory experiments a Macintosh or Windows PC running customisable software, such as E-Prime, Superlab, or Matlab with the Psychophysics toolbox, are used to present various stimuli. Such desktop computers are computationally powerful and can present a variety of highly controlled and accurate stimuli, but these systems come at both a monetary and mobility cost, weighing several kilograms and costing hundreds of dollars. While something more portable, such as a laptop or tablet can be used, the cost of EEG hardware is still significant. The Raspberry Pi 2 is a versatile solution to the issue of cost, mobility, and reliability when it comes to stimulus presentation. This device is inexpensive, lightweight (approximately 45 g), and highly versatile. The Raspberry Pi 2 offers several ways to connect external USB peripherals, displays, and auditory equipment, and it has 40 General Purpose Input/Output (GPIO) pins. Many of these pins can be programmed for use in various tasks such as flashing LEDs and controlling electric motors. The low power requirements allow the Raspberry Pi 2 to be powered by any 5 V, 1.2A power supply (such as 4 AA batteries in series) without generating a considerable amount of heat, allowing the device to run for long periods depending on battery size and any connected peripherals. The Python programming language can be used to generate auditory and visual stimuli while software specific for cognitive psychological testing, such as OpenSesame (Mathôt et al., 2012), offers an intuitive method for experimental design. Through OpenSesame and Python it is possible to recreate a traditional auditory oddball task involving the presentation of common, standard tones and rare, target tones. Event related potentials (ERPs) that occur time-locked with the presentation of these tones can then be derived from collected EEG data.

This paper demonstrates that the Raspberry Pi 2 can be used to present stimuli for EEG experiments and recordings, allowing for more mobile psychological experiments. An auditory oddball-paradigm was presented using both the Raspberry Pi 2 and a traditional desktop PC while EEG data was recorded to an external laptop. The results demonstrate that similar temporal and spatial ERP activity is evoked by both computer systems.

Section snippets

Participants

A total of 10 members of the university community participated in the experiment (mean age = 21.10; age range = 18–25; 1 male). Each participant completed an identical session on both the Raspberry Pi 2 computer and a desktop PC computer with order being counterbalanced. Participants were all right-handed, and all had normal or corrected normal vision and no history of neurological problems. All participants gave informed consent, were compensated at a rate of $10/h for their time, and the

Trigger-tone latency

To directly and accurately measure potential latency differences between the TTL pulse onset and tone onset, following the conclusion of the study both tones were played to the speakers and simultaneously attenuated then digitized by the EEG amplifier using custom built hardware. This hardware was connected to the 3.5 mm headphone jack of the Raspberry Pi 2 or PC and would send a unique TTL pulse to the amplifier each time the tone was played to accurately mark tone onset. This setup allowed for

Discussion

We directly compared a Raspberry Pi 2 computer to a traditional desktop PC to assess if the Raspberry Pi 2 can act as a viable, low-cost alternative in presenting stimuli for EEG experiments and producing reliable ERP measurements. This comparison was done using an auditory oddball task which has been shown to reliably produce ERPs such as the MMN and P3 in response to rare target tones. Despite differences in trigger-tone timing quality EEG data and significant ERP responses were obtained on

Acknowledgements

This work was supported by a discovery grant to KEM from the Natural Sciences and Engineering Research Council (NSERC) of Canada and start-up funds from the Faculty of Science. Thank you to all members and volunteers of the Mathewson lab for assisting with data collection and experimental setup.

References (19)

There are more references available in the full text version of this article.

Cited by (41)

  • Event-related potential studies of emotion regulation: A review of recent progress and future directions

    2022, International Journal of Psychophysiology
    Citation Excerpt :

    Future work needs to carefully assess this balance and evaluate signal-to-noise ratio in mobile EEG studies. Significant innovations are being continually developed in this domain, and may eventually even provide affordable alternatives to today's in-lab EEG setups (e.g., a Raspberry Pi 2 as an alternative for administration of EEG/ERP experiments; Kuziek et al., 2017). Nonetheless, prior reviews of mobile EEG/ERP research have noted insufficient reporting of rates of unusable, lost, and noisy data in mobile EEG/ERP studies (Raugh et al., 2019), and additionally, we have not seen any reporting of internal consistency reliability of ERP components (Patrick and Hajcak, 2016) in mobile EEG studies ourselves.

  • A ride in the park: Cycling in different outdoor environments modulates the auditory evoked potentials

    2020, International Journal of Psychophysiology
    Citation Excerpt :

    This is because all uncontrolled sensations have the possibility of introducing noise into the EEG signal (Schlögl et al., 1999; White and Van Cott, 2010), and this noise can be a large factor in the statistical power when analyzing EEG and ERP data (Luck, 2014). New technologies are beginning to make it easier to record laboratory-quality EEG data outside of the lab while subjects are mobile (Debener et al., 2012; Kuziek et al., 2017; Scanlon et al., 2019a). Performing experiments in real-world environments allows greater generalizability and understanding of how the brain works in everyday life.

  • Self-health monitoring and wearable neurotechnologies

    2020, Handbook of Clinical Neurology
    Citation Excerpt :

    When thorough methods are employed, such as specific methods to increase the signal quality (i.e., clean hair, clean skin, a shielded environment, comfortable recording conditions), accurate results can be obtained. In fact, a fair number of studies have now used several different sophisticated low-cost wearable EEG headsets to study a wide array of fundamental topics such as visual and auditory attention and perception (Debener et al., 2012; Boutani and Ohsuga, 2013; Wascher et al., 2014; Badcock et al., 2015; Abujelala et al., 2016; Maskeliunas et al., 2016; Barham et al., 2017; Kuziek et al., 2017; Krigolson et al., 2017a, b), emotions (Peter et al., 2005; Brown et al., 2011; Bashivan et al., 2016; Jiang et al., 2016, 2017; Brouwer et al., 2017), learning, and memory (Berka et al., 2005a, 2007b). Laboratory studies in psychology and cognition that have conducted research using artificial stimuli and fixed response options inevitably result in findings that are less ecologically valid in relation to real-world behavior.

  • Taking off the training wheels: Measuring auditory P3 during outdoor cycling using an active wet EEG system

    2019, Brain Research
    Citation Excerpt :

    The mentioned technology was connected using a Vantec 4-Port USB 3.0 Hub. A Raspberry Pi 2 model B computer, which was running version 3.18 of the Raspbian Wheezy operating system, using version 0.24.7 of OpenSesame software (Mathȏt et al., 2012), was used both to run the oddball task and to mark the data for ERP averaging (see Kuziek et al., 2017 for validation study). Audio output was via a 900 MHz quad-core ARM Cortex-A7 CPU connected through a 3.5 mm audio connector.

View all citing articles on Scopus
View full text