Research PaperTransitioning EEG experiments away from the laboratory using a Raspberry Pi 2
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)
- et al.
EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics including independent component analysis
J. Neurosci. Methods
(2004) - et al.
A new method for off-line removal of ocular artifact
Electroencephalogr. Clin. Neurophysiol.
(1983) - et al.
A low cost implementation of multi-label classification algorithm using mathematica on raspberry pi
Procedia Comput. Sci.
(2015) - et al.
A direct comparison of active and passive amplification electrodes in the same amplifier system
J. Neurosci. Methods
(2014) - et al.
Measuring the face-sensitive N170 with a gaming EEG system: a validation study
J. Neurosci. Methods
(2015) Validation of the Emotiv EPOC EEG system for research quality auditory event-related potentials in children
PeerJ.
(2015)Brain Products actiCAP—Selecting a Suitable EEG Recording Cap: Tutorial. [Manual]. Munich, Germany
(2014)The psychophysics toolbox
Spat. Vis.
(1997)- InitializePsychAudio. (December 18, 2012). Retrieved from...
Cited by (41)
Event-related potential studies of emotion regulation: A review of recent progress and future directions
2022, International Journal of PsychophysiologyCitation 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 PsychophysiologyCitation 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 NeurologyCitation 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 ResearchCitation 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.