27 International Journal of Engineering Insights, (2024) 2:1
the hardware section you can view the Emotiv EPOC
device as it sends brain signals via Bluetooth to the
PC, the block that receives, manages, and allows ac-
cess to said signals is the manufacturer’s own (Emo-
tiv Launcher) [13], the Unity module is connected to
this block. ii) This macro module is made up of two
sections, 2d environment and the scripts section. The
scripts section exemplifies all the programming carried
out, which consists of a Subscription module, which
connects to the Emotiv Launcher and manages the data
it will obtain, the sending of authentication credentials
(since it is a proprietary system, it is necessary to meet
the requirements from the manufacturer to access the
data) and allows you to read the sections of interest for
the application. In this case, the subscribed sections
are ECG (encephalogram data), Motion (data on the
user’s head movement), Facial Expressions (data pro-
cessed by the launcher that directly allow us to know if
the user smiles or grimaces), Mental Commands (they
are pre-processed signals training the user to move ob-
jects (pull, push, left, right for example) [14]. These
signals go directly to the records module which stores
the displayed data in volatile memory and then writes
the displayed data to files on the hard drive. It should
be noted that a marker module has been added, which
the user can place as a reference to a stimulus made to
the user. tests as a timestamp that identifies this event.
The data from the subscription module is also con-
sumed by the serialization values module since it must
be transformed into valid formats for later display. The
next module through which the serialized data travel is
the GameObject UI, which manages the user interface,
that is, it allows you to decide the data that will be
displayed, change parameters such as the scale in am-
plitude and function of time, the option has also been
placed to numerically visualize the signal together with
its 2D visual representation. iii) finally, there is the
generated product management module which includes
the export and import of files in .*CSV and Json for-
mat, for later viewing in the application or processing
in third-party tools. A database module has also been
added so that it can be made available in real time and
consumed without the need for file transfers. See Fig.
2.
4 Test
This section describes the methodology used to test the
real-time brainwave visualization solution using Emotiv
EPOC and Unity. The initial conditions of the experi-
ment, the procedures to follow and how the replicability
of the results is guaranteed will be detailed. The test-
ing objective of this solution is the visualization of user
waves in real time without mental, logic or stress test-
ing approach. Only the visualization of its waves will be
carried out within the 2D environment and the manip-
ulation of visualization parameters. To continue with
the procedure, it is necessary to recalibrate the device
with the new test user since everyone is a unique case.
1. Calibration is carried out using the tool provided
by the manufacturer (see Fig. 3), Emotiv launcher.
2. It is necessary to place the sensors in the ap-
proximate position of the graph until reaching 100%
connection (see Fig. 4). It may be necessary to increase
the saline levels in each transducer to achieve the green
color in all sensors.
3. Now it is necessary to ask the patient to calm
down and breathe deeply with his eyes closed, all to
achieve 100% signal capture in the ECG (see Fig. 5).
4. Next, run the solution in the Unity environment
(see Fig. 6). It is recommended not to create an exe-
cutable since in the testing stage it may be necessary
to make hot adjustments for the correct visualization
of the signals.
5. Select the information modules that you want to
display in the 2D plane, in this case it will be the ECG
and Motion (see Fig. 7).
6. ECG signals can be displayed in 2D line format in
time domain, in addition to Motion data in numerical
format (see Fig. 8).
7. Press the record button to start capturing the
data displayed in the 2D environment.
Finally, the products resulting from the experiment
can be viewed for subsequent review and analysis. In
the case of replicability, it is detailed that each test
is unique, and that the analysis of results focuses on
obtaining the final products.
5 Results and Analysis
In this section, the results obtained from real-time brain
wave visualization tests using Emotiv EPOC and Unity
are presented. The products generated by the solution
are described and their implications for future research
and applications are analyzed. The successful imple-
mentation of the solution has generated the following
products:
1. Signal Structure: A complete and structured col-
lection of all brain signals recorded during testing. In-
cludes preprocessed data and relevant metadata in JSON
format (see Fig. 9).
2. Excel File for Processing: An Excel file that con-
tains the brain signals ready to process and analyze,
contains the values with their respective timestamp, as
well as a column in which you can detail the markers
made by the investigator (see Fig. 10).