You are on page 1of 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/339632712

Biopotential Signals Acquisition from the Brain Through the MindWave


Device: Preliminary Results

Chapter · March 2020


DOI: 10.1007/978-3-030-42517-3_11

CITATIONS READS

4 724

5 authors, including:

Ivan Galindez Dagoberto Mayorca


Universidad Mariana Universidad Mariana
1 PUBLICATION 4 CITATIONS 34 PUBLICATIONS 33 CITATIONS

SEE PROFILE SEE PROFILE

Herman Hamilton Guerrero


Universidad Mariana
4 PUBLICATIONS 6 CITATIONS

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

SDAS-RP: Digital signal processing View project

SDAS-RP: Human-machine interaction View project

All content following this page was uploaded by Dagoberto Mayorca on 06 January 2022.

The user has requested enhancement of the downloaded file.


Miguel Botto-Tobar
Marcelo Zambrano Vizuete
Pablo Torres-Carrión
Sergio Montes León
Guillermo Pizarro Vásquez
Benjamin Durakovic (Eds.)
Communications in Computer and Information Science 1193

Applied Technologies
First International Conference, ICAT 2019
Quito, Ecuador, December 3–5, 2019
Proceedings, Part I
Communications
in Computer and Information Science 1193
Commenced Publication in 2007
Founding and Former Series Editors:
Phoebe Chen, Alfredo Cuzzocrea, Xiaoyong Du, Orhun Kara, Ting Liu,
Krishna M. Sivalingam, Dominik Ślęzak, Takashi Washio, Xiaokang Yang,
and Junsong Yuan

Editorial Board Members


Simone Diniz Junqueira Barbosa
Pontifical Catholic University of Rio de Janeiro (PUC-Rio),
Rio de Janeiro, Brazil
Joaquim Filipe
Polytechnic Institute of Setúbal, Setúbal, Portugal
Ashish Ghosh
Indian Statistical Institute, Kolkata, India
Igor Kotenko
St. Petersburg Institute for Informatics and Automation of the Russian
Academy of Sciences, St. Petersburg, Russia
Lizhu Zhou
Tsinghua University, Beijing, China
More information about this series at http://www.springer.com/series/7899
Miguel Botto-Tobar Marcelo Zambrano Vizuete
• •

Pablo Torres-Carrión Sergio Montes León


• •

Guillermo Pizarro Vásquez •

Benjamin Durakovic (Eds.)

Applied Technologies
First International Conference, ICAT 2019
Quito, Ecuador, December 3–5, 2019
Proceedings, Part I

123
Editors
Miguel Botto-Tobar Marcelo Zambrano Vizuete
Eindhoven University of Technology Universidad Técnica del Norte
Eindhoven, The Netherlands Ibarra, Ecuador
Pablo Torres-Carrión Sergio Montes León
Universidad Técnica Particular de Loja Universidad de las Fuerzas Armadas (ESPE)
Loja, Ecuador Quito, Ecuador
Guillermo Pizarro Vásquez Benjamin Durakovic
Universidad Politécnica Salesiana International University of Sarajevo
Guayaquil, Ecuador Sarajevo, Bosnia and Herzegovina

ISSN 1865-0929 ISSN 1865-0937 (electronic)


Communications in Computer and Information Science
ISBN 978-3-030-42516-6 ISBN 978-3-030-42517-3 (eBook)
https://doi.org/10.1007/978-3-030-42517-3

© Springer Nature Switzerland AG 2020


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are
believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors
give a warranty, expressed or implied, with respect to the material contained herein or for any errors or
omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in
published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface

The First International Conference on Applied Technologies (ICAT 2019) was held on
the main campus of the Universidad de las Fuerzas Armadas (ESPE), in Quito,
Ecuador, during December 3–5, 2019, and was jointly organized by the Universidad de
las Fuerzas Armadas (ESPE), the Universidad Técnica Particular de Loja, and the
Universidad Técnica del Norte, in collaboration with GDEON. The ICAT series aims
to bring together top researchers and practitioners working in different domains in the
field of computer science to exchange their expertise and discuss the perspectives of
development and collaboration. The content of this three-volume set is related to the
following subjects: technology trends, computing, intelligent systems, machine vision,
security, communication, electronics, e-learning, e-government, and e-participation.
ICAT 2019 received 328 English submissions written by 586 authors from 23
different countries. All these papers were peer-reviewed by the ICAT 2019 Program
Committee consisting of 191 high-quality researchers. To assure a high quality and
thoughtful review process, we assigned each paper to at least three reviewers. Based on
these reviews, 124 full papers were accepted, resulting in an acceptance rate of 38%,
which was within our goal of less than 40%.
We would like to express our sincere gratitude to the invited speakers for their
inspirational talks, to the authors for submitting their work to this conference, and the
reviewers for sharing their experience during the selection process.

December 2019 Miguel Botto-Tobar


Marcelo Zambrano Vizuete
Pablo Torres-Carrión
Sergio Montes León
Guillermo Pizarro Vásquez
Benjamin Durakovic
Biopotential Signals Acquisition
from the Brain Through the MindWave
Device: Preliminary Results

Iván Galı́ndez-Floréz, Andrés Coral-Flores, Edna Moncayo-Torres,


Dagoberto Mayorca-Torres, and Herman Guerrero-Chapal(B)

Facultad de Ingenierı́a, Universidad Mariana, Pasto-Nariño, Colombia


{igalindez,edmmoncayo,dmayorca,hhguerrero}@umariana.edu.co

Abstract. Brain Computer Interface (BCI) systems are the tools that
allow the acquisition of biopotential signal spectra, with the most used
attention, meditation and eye blinking signals. The main objective of BCI
is to translate brain activity in digital form that can be used in different
areas such as education, industrial, games, robotics, home automation
and medical areas. In particular, this paper focuses on the acquisition
and filtering of attention and meditation signals. For this, the variation
and behavior of these signals are analyzed against external stimuli and in
situations of stress and/or relaxation. EEG signals from the brain were
captured by the MindWave Mobile device through the NeuroSky inter-
face at a sampling rate of 1 Hz. The signals obtained are transmitted to
two different devices, Arduino (At mega 328) and Raspberry Pi 3 through
the Bluetooth module (HC-06) in order to compare the effectiveness of
the sending and receiving times. The preliminary results in controlled
scenarios allowed us identifying activities where complex mathematical
calculations, meditation activities and listening to relaxing music are
required. In this same sense, the comparison between the Arduino and
Raspberry devices is shown.

Keywords: MindWave · Bluetooth · Biopotential signals ·


Acquisition · Attention · Meditation · Disability · Microprocessor

1 Introduction
The human brain is composed of a set of neural networks, which fulfill the func-
tion of transmitting information through electrochemical activity (differential
electrical potential due to the change of existing ionic substances in the capture
of an external stimulus in the neuron), generating the appearance of electric
fields that can be called brain waves [1]. There are four main brain waves called
Alpha, Beta, Theta and Delta. The brain wave or Beta rhythm can be captured
in any area of the skull and is recorded in the parental and frontal areas, “. . . it
has a low EEG amplitude pattern, but a high frequency” [2], it is present when
a person is awake, excited or alert. The brain wave or Alpha rhythm, recorded
c Springer Nature Switzerland AG 2020
M. Botto-Tobar et al. (Eds.): ICAT 2019, CCIS 1193, pp. 139–152, 2020.
https://doi.org/10.1007/978-3-030-42517-3_11
140 I. Galı́ndez-Floréz et al.

in the region of the visual cortex (back of the head), is extremely rhythmic,
but with an amplitude that increases and decreases constantly [3], it appears
in people who are calm, resting in silence and especially with their eyes closed.
The brain wave or Theta rhythm is identified as unconscious material, creative
inspiration and deep meditation, and the brain wave or Delta rhythm, is related
to deep sleep, childhood and serious illness.
BCI (Brain-Computer-Interface) systems have become a very useful tool for
the development of several applications such as: trajectory and movement con-
trol, obstacle detection, lighting control, temperature, etc. We can highlight the
use of BCI systems in home automation control, focused on the care of the
human being through the use of biopotential signals of the brain. According
to this, an EEG signal processing system is implemented in real time for the
creation of home automation applications focused on people with motor disabil-
ities. In this way, a better quality of life and lifestyle is achieved. Among the
outstanding works we could mention “the implementation of biopotential sig-
nals in home automation rooms for quadriplegics” [4] and “Electronic lighting
system (on-off) by controlling brai4 signals” [5] with the main objective in both
works to generate a better quality of life for people with motor disabilities. One
of the commercial devices that allow the collection of brain activity (using the
Encephalographic recording technique) is the MindWave Mobile device which
was developed by the NeuroSky company.
These measurements are carried out by placing the contact sensor on the
forehead, or more specifically in the FP1 area of the brain, and the transfer node
with the click on the ear, since as it works with a sensor there is only one channel
to measure. The device fulfills the function of measuring the states of relaxation
and attention through the use of the algorithm called eSsence that measures these
levels on a scale of 0 to 100 through brain rhythms (alpha, beta, theta, etc.).
The device can also capture blinking. For the acquisition and processing of EEG
signals, UART communication (data transmission via Bluetooth) was performed
between the MindWave Mobile device and a microprocessor, which was chosen by
performing a measurement test between the Arduino and Raspberry pi, taking
into account that it counts the parameters related to the collection time and data
loss. In the second instance, the microprocessor defined (Raspberry pi), a study of
attention and meditation was conducted with 11 people (3 men and 4 women, 50
to 60 years old), 3 older adults and a child to determine the possible differences,
alterations and similar patterns that may exist in this type of measurement.

2 Materials and Methods

2.1 MindWave Mobile Interface

MindWave Mobile device acquires EEG signals; this is composed of a headband


that collects brain activity and separates the signals according to the frequency.
The device can be seen in Fig. 1.
Biopotential Signals Acquisition from the Brain 141

Fig. 1. MindWave Mobile device [1].

It uses the ThinkGear AM module developed by NeuroSky, which serves as an


interface between the brain and the computer. This module has a 98% reliability
serving in the same way as a non-invasive medium and it is through this module
that the filtration of brainwaves is done (alpha, beta, theta, etc.) obtaining the
values of meditation and attention through the eSsence algorithm which works
as the following: The data is sent by means of Network frame (successive series of
bits, organized in cyclic form, that carry information and that allow the reception
to extract this information) [6]. This data will be sent to the Serial COM port
forming a package that the structure seen in Fig. 2.

Fig. 2. Data package structure [7].

The Header section is composed of 3 bytes: two synchronizations [SYNC]


bytes (0xAA 0xAA), followed by a [PLENGTH] (payload length) of bytes: “The
two [SYNC] bytes are used to indicate the beginning of a new packet that arrives
and are bytes with the value 0xAA (decimal 170). The synchronization consists
of two bytes in length, instead of just one, to reduce the possibility that [SYNC]
(0xAA) bytes that occur within the Package could be confused with the princi-
ple of a package” [4]. The [PAYLOAD] section has a range of up to 169 bytes
in length, while each of [SYNC], [PLENGTH], and [CHECKSUM] is a single
byte each, where the maximum bit value is 169 Bytes of length. It is in the
[PAYLOAD] section where the meditation, attention and blinking data is sent.
142 I. Galı́ndez-Floréz et al.

2.2 Microcontroller-Based Data Acquisition Device


One of the microprocessors used for the acquisition and processing of the EEG
signals is the Arduino which is a board based on the ATMEL microcontroller
and is capable of recording programmed instructions, made by means of the
arduino IDE programming language. Arduino is one of the most used micropro-
cessors since it allows the construction of digital devices and their interaction
with the real world [8], between the main features the following can be mentioned:
Atmega328 microcontroller, 6 analog output pins, 14 digital pins, 32 KB flash
memory, 5 v operating voltage, 7–12 v input voltage. Another of the micropro-
cessors used for the acquisition and processing of EEG signals is the Raspberry
pi which is a small board computer that is capable of supporting several neces-
sary components in a common computer. It has an open source software where
its operating system is Raspbian, but allows the use of other operating systems
such as Linux or Windows 10 [9]. Among the main features can be mentioned:
Broadcom processor, RAM, GPU, USB ports, HDMI, Ethernet, 40 GPIO pins,
camera connector and SD card input.

2.3 Data Visualization


To determine and understand how the MindWave Mobile device works, Neu-
roSky offers a software package available for Windows, Mac and Android oper-
ating systems. As mentioned above, the device has a Bluetooth connection and
it is necessary to pair the MindWave Mobile with the computer; sometimes the
device requires a pairing code which is found in the instructions of the device.
NeuroSky also provides a guide shown in Fig. 3 where it shows how the Mind-
Wave Mobile device should be connected, as well as the meaning of the device
connection status symbols.
Through the interface shown in Fig. 4, you can see the variation of the signal
that is being acquired by the MindWave Mobile device where you can observe
parameters such as (Low Gamma, High Alpha, Delta, Theta, etc.) as well as the
values of attention and meditation between ranges from 0 to 100.
Referring to meditation and attention, NeuroSky also provides a program
called “MindWave Mobile Tutorial” whereby in addition to showing the level
being measured, it also presents some tips or advice to obtain a better measure-
ment of attention and/or meditation such as shown in Fig. 5.
Another parameter that can be meas-ured by MindWave Mobile is the blink-
ing of the eyes by sending a value only when the subject blinks, it can be better
observed in Fig. 6.

2.4 Data Acquisition and Processing with Arduino


For the data acquisition process of MindWave Mobile, it is necessary to decode
the sent values since, as previously mentioned, these packages are sent through
a net-work frame. In the case of Arduino, the NeuroSky company provides a
reference code where the process of decoding and data acquisition is explained.
Biopotential Signals Acquisition from the Brain 143

Fig. 3. MindWave Mobile connection guide.

Fig. 4. MindWave Mobile interface.

First of all, it is necessary to perform the interface with the Arduino and since it
does not have an internal Bluetooth device, it is necessary to connect an external
Bluetooth device and configure it in “slave” mode so that in this way it receives
the data sent from Mind-Wave Mobile. The interface is shown in Fig. 7.
144 I. Galı́ndez-Floréz et al.

Fig. 5. MindWave Mobile attention tutorial.

Fig. 6. MindWave Mobile visualizer attention game.


Biopotential Signals Acquisition from the Brain 145

Fig. 7. MindWave Mobile connection with Arduino and module HC-05.

The programming of the source code provided by NeuroSky begins by declar-


ing the variables to be used and the speed at which the MindWave is already
defined. It is worth mentioning the RadeOn Byte function that is used to read
what the device sends and the payload length function used to determine the
length of the useful data, since as the MindWave device uses the ThinkGear
module for signal filtering and the sending of data, there needs to be a verifica-
tion process of the data packet sent for the decoding process. This device sends
the data encoded in 512 bits per second, when the Arduino detects the first bit
input it has to start decoding the values and once it goes through the decoding
process, it gives us the values of attention, meditation, blinking, the quality of
the package (good or bad) and if there is loss of data packages.

2.5 Data Acquisition and Processing with Raspberry PI

For the process of acquiring data from MindWave Mobile through Raspberry pi,
it is possible to use the NeuroPy library which is based on the mentality commu-
nication protocol published by NeuroSky. This library is written for Python 2.7,
in which you get the values of attention, meditation, delta, theta, low Alpha, high
Alpha, low Beta, high Beta, low Gamma, mid Gamma, lost signal and blinking.
The programming of the source code begins by importing the NeuroPy library,
then through the assignment of an object it is called the COM port where the
MindWave Mobile was connected to the Raspberry pi and the speed defined by
the device. Then, depending on the required value, the function is called (value
required value) to then print the value obtained on the monitor. The interface
is seen in Fig. 8.
146 I. Galı́ndez-Floréz et al.

Fig. 8. MindWave Mobile connection with Raspberry pi.

2.6 Experimental Setup for Attention and Meditation Signals


A study was conducted with the values of attention and meditation to determine
the possible differences, alterations and similar patterns that may exist in this
type of measurement. A sample of 7 people (4 Women and 3 men) with an age
range of 40 to 50 years old was taken. To obtain more measurement parameters,
a study was also carried out on 3 older adults (2 men and one woman) and
one child. On the first instance, based on the code and ethical guidelines, an
informed consent was made where the necessary and detailed information of the
study is made known in an understandable way where it is specified that the
use of the data obtained will be used only for educational purposes and cannot
be used for commercial purposes, in the same way personal data will be handled
anonymously.

Test Attention. The estimated time of this test was two minutes. First, the
MindWave Mobile was placed on the subject’s head and an initial test was
performed to see if there was the sending of data, then he was asked to mentally
perform a series of specific multiplication problems with a certain degree of
complexity, initially with his eyes open and then with his eyes closed. After
that, it was requested that with his eyes closed, he focuses on specific dates
(birthdate or important moments) and finally, he was asked to try to describe a
place with specific detail.

Test Meditation. The estimated time was two minutes. The subject was first
asked to relax and start breathing slowly, then he was asked to breathe deeply
and close his eyes. While in this state, he was asked to think about a nice time
while listening to relaxing music and finally, the subject was asked to open his
eyes slowly.
Biopotential Signals Acquisition from the Brain 147

3 Results and Discussions


Around the decision that the microprocessor meets the needs required for the
data acquisition and coding process of the MindWave Mobile, a sample of 71
data was taken from the attention variable in both the Raspberry pi and the
Arduino. The resulting Arduino and Raspberry pi graphs are shown in Fig. 9.

Fig. 9. Arduino vs Raspberry pi.

Figure 10 shows the resulting graph comparing the attention values obtained
in the 3 men from 40 to 50 years old.

Fig. 10. Test men attention 40–50 years old.


148 I. Galı́ndez-Floréz et al.

Figure 11 shows the resulting graph comparing the meditation values


obtained in the 3 men from 40 to 50 years old.

Fig. 11. Test men meditation 40–50 years old.

Figure 12 shows the resulting graph comparing the attention values obtained
in the 4 women from 40 to 50 years old.

Fig. 12. Test women attention 40–50 years old.

Figure 13 shows the resulting graph comparing the meditation values


obtained in the 4 women from 40 to 50 years old.
Biopotential Signals Acquisition from the Brain 149

Fig. 13. Test women meditation 40–50 years old.

Figure 14 shows the resulting graph comparing the attention values obtained
from older adults.

Fig. 14. Test older adults attention.

Figure 15 shows the resulting graph comparing the meditation values


obtained from older adults.
150 I. Galı́ndez-Floréz et al.

Fig. 15. Test older adults attention.

Figure 16 shows the resulting graph comparing the attention values obtained
from the older adults and the child.

Fig. 16. Test older adults attention.

Figure 17 shows the resulting graph comparing the meditation values


obtained from the older adults and the child.
As shown in Fig. 9, it can be seen that the Arduino obtains in a shorter time
the data sent from the MindWave Mobile, unlike the Raspberry pi that needs a
longer acquisition time. You can also see that with the Arduino, there is a greater
loss of data and therefore there is a greater number of peaks and alterations,
unlike the Raspberry pi that presents a greater stability in the data obtained.
That is why the microprocessor Raspberry pi was used to study the values of
attention and meditation. Another of the present advantages with the Raspberry
pi is the making of the BCI system because this microprocessor presents the
necessary capacities and characteristics for the creation of the domotic system.
Biopotential Signals Acquisition from the Brain 151

Fig. 17. Test older adults attention.

In Fig. 10, where the data for the men between ages 40–50 is expressed, it is
observed that two of the three subjects have high values in comparison to subject
2; however, it is also observed that every time there is a peak, all the subjects
are impacted, but in different amplitudes and therefore, at different times where
you can see that there is a reason for the rise and fall, since the three subjects
were subjected to the same procedure and under the same conditions. On the
other hand, in Fig. 11, where the data for the meditation test of men between
ages 40–50 is expressed, a reason for the rise and falls can also be observed,
but this one instead has more alterations compared to Fig. 10. With the women
between ages 40–50, the same comparison can be made with the men’s graphs,
although with the exception of subject 1 and subject 2 where a low amplitude
and no reason for peaks can be seen (Fig. 12), where the values for the attention
test are expressed, but it can be said that in comparison to this in Fig. 13, their
meditation was higher. In the same way, Fig. 14 gives the reason to the previous
figures of attention in which it has reason in the two subjects, but instead with
this one, it’s possible to note that there are slower and of lower amplitude and
time. In Fig. 16, where the data for the two older adults’ meditation test is
expressed, a greater stability can be observed in both cases, few peaks in the
data and finally, in comparison to Fig. 17, it has peaks of attention however it’s
not possible to differentiate very well since it is too close to the other signs.
The feasibility of the use of the MindWave Mobile device in the creation of
BCI systems focused on domotic applications is validated in the study carried
out and in the data collected on brain activity, since it presents the necessary
requirements for a good acquisition and collection of EEG signals presented in
attention and meditation values [5].

4 Conclusions
Analyzing the data obtained, it can be concluded that it is possible to use the
Mind-Wave Mobile device for the acquisition and collection of brain activity.
152 I. Galı́ndez-Floréz et al.

It should be noted that it is possible to perform the acquisition and decoding


of the signals through the use of the Arduino and Raspberry pi microprocessors
(this being more suitable for the purposes of the project) and through these
applications in the creation of a BCI system in home automation applications.
In general, the use of biopotential signals for the creation of BCI systems can
be determined, with the main objective of presenting an alternative to people
suffering from motor disabilities, in order to provide them with an improved
lifestyle and a better quality of life. Based on the study in particular, it was
determined that the amplitude of the wave depends on the mood of the person
and external factors (noise and ambient lighting). This is better reflected in the
differences in age since a child can concentrate faster than an older adult, but
unlike this he fails to maintain this concentration for a long time since he is
more exposed to being altered by the above-mentioned factors. Unlike the case
of meditation in which older adults can relax more easily than children but do
not manage to maintain this state for a long time.

References
1. Calderón, D.: Procesamiento de ondas cerebrales con microprocesador ARM para
control de coche teledirigido (2016)
2. Vaca, E.: Prototipo de prótesis de un brazo con 12 DGL controlada mediante ondas
cere-brales (2017)
3. Kolb, B., Whishaw, I.: Neuropsicologı́a Humana, 5th edn. Panamericana (2017)
4. Ayala, J., Bautista, D., Espı́ndola A.: Implementación de señales electro encefálicas
a un prototipo de habitación domótica para pacientes cuadripléjicos. Instituto
Politécnico (2015)
5. Guevara, M.: Sistema electrónico de iluminación (on-off) mediante el control de
señales cerebrales basado en tecnologı́a eeg. Universidad técnica del Norte, Ibarra
(2015)
6. Hernández, A.: Desarrollo e implementación de una interfaz de comunicación que
permita la interacción entre un usuario y las señales emitidas por sus ondas
cerebrales usando un dispositivo de eeg de NeuroSKy para controlar periféricos
electrónicos (2014)
7. Garcı́a, l.: Control del robot IRB120 mediante el casco de electroencefalografı́a Neu-
rosky MindWave (2017)
8. Arduino. https://www.arduino.cc. Accessed 13 Oct 2019
9. Raspberrypi. https://www.raspberrypi.org. Accessed 13 Oct 2019

View publication stats

You might also like