1 Introduction

The brain is the most complex system known and contains approximately 14–16 billion neurons. Electroencephalograms (EEGs) are the recording of electrical signals generated by ion movements flowing through brain neurons. Activities of the neurons produce circulating ion movements and the space–time potential generated by these ion movements is extracted by placing a range of electrodes across the scalp [1, 2]. In the early twentieth century, Hans Berger had recorded the first electrical EEG signal from the anthropological brain using a d’Arsonval meter placed in the brain with one electrode and identified a single wave known as an alpha wave. Modern EEG-based instrumentation systems are commonly based on several electrodes and can identify five basic waves, e.g. delta, theta, alpha, beta, and gamma, but these systems are extremely expensive and often require specialized training [3, 4].

The brain control interfaces (BCIs) is an approach that records, interprets and converts neurological activities into actions that are communicated to actuators to perform the required tasks [5, 6]. BCIs can be categorized into two major classes, invasive and non-invasive. In the invasive BCIs class, electrodes are internally inserted into the grey brain tissue via neurosurgery, and the best value of brain signals can be obtained by this method. Although this method may be used to control various actuators and output devices, this method is not feasible, since the incorporation of intrusive procedures require more expense and can jeopardize the subject.

As a result, non-invasive BCIs have become popular that do not require a surgical procedure to obtain brain signals [7]. Over the last few years, various technology firms such as OCZ Technology, Emotiv Systems, NeuroSky, Avatar Solutions, PLX Inc. and InteraXon have developed low-cost EEG recording headsets based on the non-invasive BCIs [8]. Scientists and engineers around the world have reported a number of studies using these EEG headsets for games, toys, education [9], health and automotive applications [10]. However, these devices are rarely used in clinical applications. Most neuroscience studies use multiple electrodes that are costly and not readily available, although they give a detailed results [11, 12]. Recent advances in commercial EEG devices have seen the use of low-cost [13], non-invasive EEG headsets in various applications [14, 15]. These headsets are easy to use, comfortable to wear and readily available for people to purchase and rarely require technical expertise in electrode handling and installation [16]. One such low-cost EEG headset is a single-channel MW2 developed by NeuroSky Inc., San Jose, California. Its price is less than USD 100. MW2 is a portable, non-invasive, user-friendly, lightweight headset with unipolar conduction and Bluetooth communication.

The operating principle of MW2 is very simple. The tip of the Frontopolar (Fp1) electrode is used for the capture of EEG signals. The EEG signals are often corrupted by biological noise (EMG, ECG, and eye artefacts) and electrical circuit noise [17]. In the same way, the MW2 Fp1 electrode can capture various artefacts produced by different nearby electrical devices, sockets, light bulbs, computers and human muscles [18]. Additional electrodes are located on the ear jack and these electrodes are grounded and referenced, allowing the MW2 processor to remove the artefacts. The EEG measurement is obtained by MW2 at 512 Hertz. This paper used the Laboratory Virtual Instrument Engineering Workbench (LabVIEW) tool, produced by National Instruments USA, for EEG signal processing, it is a visual programming language-based development environment and system design tool [19]. LabVIEW is easily understood by engineers, doctors, and technicians, because it depends on graphic symbols and icons instead of text-based, complex programming language, where text-based instructions are used to execute the flow of acquired data. In addition, LabVIEW supports parallel processing, which enables more processing power at a given code and faster speed.

This research work has four key contributions. First, comprehensive investigation of the changes in EEG signals during the course of focused and relaxed state of mind using MW2 headset. Second, MW2 exploration, MW2 is adopted because it is non-invasive, portable, small, and user friendly with low power consumption. It is discussed in detail how to capture and analyze the raw EEG signal via MW2 and LabVIEW respectively. We found a fine difference in relaxation and focused EEG signals, and the eye-blink artifacts. Third, we developed two scenarios, by stimulating focus and relaxation state for recording of EEG signals. We also performed preprocessing to remove noise and described the procedure for extracting delta, theta, alpha, beta, and gamma waves from EEG signals. Fourth, analysis of the shapes of waves was performed and evaluated based on the power spectrum technique, mean values, and other parameters in LabVIEW. The analysis showed that, in a focused state, the PSD value was significantly different from the relaxed state. We found that beta waves of focused state EEG signal were also 1.5 times higher than relaxed state signal, and PSD value of alpha wave of relaxed state was nearly twice the focused state value. To the extent of our knowledge, there is no report that used an inexpensive, single-channel device for such study. Our study can be used for checking mental health wellness, by training the mind to rapidly enter a relaxed state, moreover, this study can open up new avenues for the BCIs and neurofeedback applications. As at present, there is no standard EEG signal database available for analysis regarding a relaxed and focused state.

2 Related Work

Over the last few years, several studies have used MW2 and other single-channel portable EEG devices for various applications [20,21,22]. Rebolledo-Mendez et al. conducted a controlled experiment with 34 participants on the basis of a MW device and found that the EEG signal attention score was positively correlated with self-reported attention [23]. They did not, however, examine the relaxation aspects. Juti Naraballobh et al. studied the effect of music on the human brain based on the MW2 device that was employed to collect EEG signals. They found the effect of relaxing music stimulation on normal stress level participants and found a significant reduction in values of mid-gamma, high alpha, and theta waves. Whereas the same stimulation on over stress level participants resulted in an increase in low alpha value and a decrease in low gamma value [24]. Likewise, CKA Lim et al. studied the effectiveness of cognitive stress recognition algorithms using the same MW device. The accuracy obtained in the recognition of stress-related EEG signals was 72 percent, based on DCT as a feature extraction method with KNN Classification [25]. Crowley et al. successfully demonstrated MW as a non-invasive device for recording the degree of mediation and attention of participants. EEG signals clearly indicated when the subject undergoes a change of mediation and attention emotions. The results were verified on the basis of the Hanoi and Stroop towers. Several studies have been carried out on the basis of EEG signals to examine emotions, to recognise feelings after watching different sports or listening to music, to assess mental exhaustion [26]. Yaomanee et al. found scalp positions suitable for the detection of attention-related EEG signals. The work involved three phases (response questionnaires, location of 3D images and study of a book) to assess whether the participants were attentive. To stimulate relaxation, participants were asked to listen to music prior to data acquisition. Higher Beta waves were found when subjects were alert and higher alpha waves when subjects were unattentive [27]. JM Rogers et al. employed the MW headset to identify EEG signals during 3 min of a cognitive visual task, three minutes of eyes open and three minutes of eyes closed counterbalanced with 19 elderly participants, 21 adults, and 19 youths. The findings showed a significant increase in alpha waves and a decrease in theta waves in the closed-eye state. Likewise, alpha waves decreased, and beta waves increased, in the open eyes and visual cognition conditions. However, the work did not confirm the relaxation and focus state scores from the headset, as their goal was to understand whether MW's EEG patterns were consistent with EEG patterns reported for eyes closed and opened states in the previous studies [28]. SJ Johnstone et al. carried out a comparative validation analysis between (1) the PSD of the raw EEG data obtained via the MW headset and (2) the PSD of the raw data obtained from the 10–20 EEG research-grade system. Participants were adults with no mental health problems. The study showed a clear positive association between the power spectra of the two headsets without a significant difference. Although the authors had described the ‘relaxation’ and ‘attention’ score, they did not carry out a comparative validation of those scores achieved during each task [29]. There is a research gap, for the identification of relaxed and attentive brain states based on commercially available low-cost headset. As previous studies have not statistically distinguished between relaxed and attentive states. We address this research gap in this work.

3 Methodology

The reproducible acquisition of EEG signals is a basic requirement for an effective analysis and for the monitoring of brain activity and abnormalities that are formed [30, 31]. Over the years, many methods and techniques have been reported based on the size, frequency and shape of EEG signals and associated signals for the diagnosis of various diseases and other applications [32, 33]. This paper uses Fast Fourier Transform (FFT) which decreases the number of computations required for N points from 2N2 to 2NlogN and it is an excellent algorithm for computing Discrete Fourier Transform (DFT) and Inverse Discrete Fourier Transform (IDFT) [34]. This algorithm involved the divide-and-conquer technique. The main scheme is to truncate the transform of size N into 2 transforms of size N/2. FFT algorithm used for the size of the sample is given by the formula:

$$N \, = \, 2^{k}$$

In this work, the MW2 device acquired EEG signals by a single dry sensor positioned based on the 10–20 electrode placement standard. MW2 collects the electrical neural activities from the scalp when electrodes conduct voltage usually at microvolt level, next the microvolt signals fed to amplifiers which amplify the signal thousand times and then digitize the signal for further processing. For transforming signals from thinkgear chipset to LabVIEW, Bluetooth dongle is being used, MW2 can make Bluetooth communication at different rates, for instance, 115,200, 57,600, 9600, 2400, and 1200 bps. Moreover, two formats of data streams can be used, file packets and 5 V raw EEG data. In this work, we have used 9600 bits per second rate for transmission and 5 V raw EEG data stream since these configurations have negligible communication noise. In LabVIEW, the raw data from MW2 was received by using subVIs supported by the NI LabVIEW compatible NeuroSky driver. This library consists of communication protocols that permit the execution of the following procedures. The secure On/off MW2 connections, the initial setting of Bluetooth link, and the evolution of EEG wave quality. We calculated mean, standard deviation, and variance through time analysis and PSD values were calculated by spectral analysis based on Fast Fourier Transform. Supporting information Figure S1 shows the block diagram of LabVIEW program, the procedure begins by viewing the EEG collected data in the LabVIEW. EEG collected data obtained from MW2 typically consist of very low-frequency ranges and with low amplitudes. Analyzing steps include the detection of various kinds of interference noises that are mixed with EEG signals due to the number of reasons, including external electrical interference, occurred in the recording system, leads & electrodes distorting the neural electrical pulses, the subject’s eye blinking, muscle movement, breathing and heart rate, etc. Various filters are available in LABVIEW to filter out the signals and to get the desired frequency and amplitude response. The second-order band-pass was used to remove high-frequency artefact, the threshold values were set to ± 150 μV. The processed EEG signals were free of ocular artifacts and other noises. Supporting information Figure S2 shows another 2nd order bandpass filter with upper and lower cut-off frequencies to acquire PSD values of different waves. The details are as follows: Gamma waves (30–100 Hz), Beta waves (13–30 Hz), Alpha waves (8 -12 Hz), Theta waves (4–7 Hz), and Delta waves (0.5—4 Hz). All these mentioned waves show different mental states of mind that make it easier to detect brain disorders [35, 36]. Single-tone measurement was used for each frequency band in terms of frequency and amplitude and FOR loop was used in execution for N no. of time.

We performed all the experiments presented in the paper with healthy 6 subjects and all subjects were free from any health problems. The age range was 23–26 years with an average age of 24.5 years, consisting of 3 males and 3 females chosen on a voluntary basis. Participants' health state, mental state, and hearing ability were normal. Moreover, the participants had not undergone any education specific to EEG studies. All subjects signed the formal consent form after receiving instructions about the aims and procedures of the experiment.

4 Results and Discussion

In order to facilitate the management of mental health and psychological treatment effects, the aim of this research study was to successfully identify and observe whether the subject is focused or relaxed by simple EEG signal detection. At this present time, a standard EEG signal database on a relaxed and focused state is not developed for reference purposes. This research work used minimal EEG channels of MW2 devices, as shown in Fig. 1. We choose MW2 because it is non-invasive, portable, small, and user-friendly with low power consumption. The MW2 recorded and digitised small EEG signals generated by neural activity are then transferred to the LabVIEW via Bluetooth wirelessly to facilitate mobility. The left side of Fig. 1 shows the design of the MW2, consisting of eight main parts, on–off switch, internal thinking gear chipset, ear clip, adjustable headband, battery area, adjustable ear arm, sensor arm, and sensor tip [37]. The sampling frequency was 512 Hz for the transmission of raw EEG signals. The MW2 uses ThinkGear AM chip innovations to collect, process and transmit EEG signals to LabVIEW.

Fig. 1
figure 1

a The MW2 device and the application technique, fp1 electrodes, is placed based on 10–20 electrode positioning standard. The MW2 headset is non-invasive, portable, small and user-friendly with low power consumption b The experimental procedure block diagram

Since all areas of the cortex are capable of generating neural activity. Through in-depth assessment, brain scientists have identified a number of standard locations for the collection of EEG signals. The standard system is known as the 10–20 international electrode positioning technique (10–20 method), which includes attaching multiple electrodes on the cortex. While this method enables the assessment of variations in the EEG signal to be comprehensive, it is inconvenient and impractical to apply this technique to subjects due to complexity and discomfort, particularly in focus and relaxation monitoring studies.

In addition, mental states, human emotions, and degrees of focus are handled by the frontal cerebral cortex, the tracing of neural activities generated in this scalp region is a feasible and effective technique for assessing whether the subject is in a relaxed or focused state. Consider Fig. 1, which shows the standard placement of dry electrodes of MW2 by 10–20 electrodes. The active electrode in the 10–20 standard records the EEG signals at the front polar lobe position 1 (fp1), the position of the electrode at the left position from the midline, while the position of the left earlobe electrode position A1 was selected as the reference and time position 4 (T4) for the ground point. Furthermore, due to the overall similarities between Fp1 and Fp2 signals, the MW2 device designer placed the electrode at Fp1, which is analogous to the physical configuration normally employed for head phones. Dry electrodes are generally susceptible to surrounding factors (e.g. subject's eye blinking, muscle movement, breathing, and artefacts of the heart rate), therefore, noise is present in the captured signals. Though the electrode in the MW2 is dry, it is cost-effective and trouble free to wear and can therefore be widely used for various applications. The work therefore assessed the viability of MW2 headset to distinguish between relaxed and focused states on the basis of EEG data. Figure 1B gives an overview of the experimental procedures. EEG data was processed using LabVIEW, and an FFT technique was used to change the EEG signal to the frequency domain. The experimental details are shown in SI Figures S1 and S2 and described in detail under Methodology section.

The EEG signals were recorded for 200 s and then divided into 50 equal parts (each part of 4 s). We selected one part of a signal out of those 50 equal parts which represent a similar spectrum as that of the entire signal and named as focused or relaxed state signals. As currently standard EEG signal databases on the focused and relaxed state are not available for reference. Generating such signals correctly was a challenging task. We have developed an appropriate environment and acquired the requiring EEG signals from the participants.

Signals were captured in a quiet lab, participants were asked to sit comfortably on a couch. Before the signal was recorded, the participants were given 10 min to calm down and settle. Non-definitive EEG signals containing many artefacts were discarded. In addition, apart from capturing their EEG signals, all facial expressions and associated environmental noises at the time of the study were also documented to allow post-study processing.

We recorded the focused sample when the subject was solving a mathematical quiz with open eyes. The signal cut off points were set as − 120 to 120 uV. Figure 2 depicts the focused state EEG signals in the temporal domain. The voltage values ranged from − 15 to 57 µV and the mean value of the EEG voltage was 15.330 µV. Figure 3 shows the relaxed state sample EEG signal, recorded when the subject was in a relaxed state, in a quiet lab listening to a slow music track without blinking and other artefacts.

Fig. 2
figure 2

Signals obtained when the subject was in a focused state

Fig. 3
figure 3

Signals obtained when the subject was in a relaxed state

The signal represented in the time domain has voltage values ranging from − 28 to 41 µV having an average value of 20.23 µV. Characteristics of both samples were different such as the maximum amplitude was higher for the focused sample than the relaxed sample, and spectrum power was also higher in a focused state than the relaxed state sample. Both focused and relaxed sample signals were converted to the frequency domain based on the FFT technique, Fig. 4 shows the frequency spectrum of both samples.

Fig. 4
figure 4

The spectrum of frequency components of the focused and relaxed state EEG signal

Figure 4 shows that signal components in the focused sample have more power than in the relaxed sample due to the presence of gamma waves commonly used in the range of 35 to 75 Hz. Brain wave parameters are shown in Table 1. Gamma waves show the highest levels of consciousness responsible for different sensory processes. Gamma waves of both concentrated and relaxed states are depicted in Figs. 2 and 3, respectively. The degree of Gamma waves observed in a focused state is higher than the relaxed sample due to the less strain on the mind. If a person is calm, but awake state of mind, alpha waves are detected [38].

Table 1 EEG waves summary

Figures 2 and 3 depict alpha waves for focused and relaxed samples, respectively. We traced the higher alpha activity rate in a relaxed state sample due to the consequences of having fewer neural activities. Greater EEG alpha wave activities are often related to a higher degree of relaxation, however, during stress conditions alpha wave activities are reduced [39]. Figure 5 shows the average PSD values in dB of alpha waves under focused state and relaxed state signal, the value of alpha wave of relaxed state was nearly twice the focused state value. These findings were consistent with the published literature.

Fig. 5
figure 5

Average PSD values in dB of both focused state and relaxed states EEG signals

Figure 5 shows average PSD values in dB of both focused state and relaxed states EEG signals. The slowest of all brain waves, but the strongest among all is known as delta waves, these waves are stronger when a subject is enjoying a dreamless state of sleep, this state also known as state where healing and rejuvenation are stimulated. Delta waves are described by a very low frequency of up to 5 Hertz and a magnitude value of greater than 110 µV. Both samples are very feeble compared with the nominal values of magnitude. Figures 2 and 3 also show the divergence between delta waves.

Beta waves indicate the mode of intense relaxation that occurs more frequently when the subject is dreaming in the sleep, or in the state of hypnosis. Research has shown a positive link between beta waves and creativity, memory and psychological well-being. Figures 2 and 3 represent beta waves for focused and relaxed states. Figure 5 shows the average PSD values in dB beta waves of both the focused state and the relaxed state signal, incidentally, the PSD value of the focused state signal is 1.5 times higher than the relaxed state signal.

Next, we study the blink detection ability of MW2, we perform two experiments, and signal acquisition conditions were identical in each experiment. In the first experiment, we ask the subject to blink intentionally, and in the second experiment, we ask the subject to blink involuntarily. We ask the subject between signal which contains blink and signal which does not. In the first experiment, each trial lasts for 3.5 s and signals are sampled every 10 ms. In each trial, the authors instructed the subject to blink two times. 30 trials comprised one session. The authors carried out experiments for 8 sessions. From the EEG signal, we found that blink produces a large positive peak followed by a large negative peak. Also, it has been observed that when a user blinks intentionally, the amplitude is relatively larger from blinks that occur involuntarily. Figure 6 shows the signal which contains involuntary and intentional blinking. The authors played a sound at the start and end of each trial to specify the beginning and end of a trial in both the experiments. Once the start sound was played, the user started blinking, it is evident that with intentional blinks large positive and negative deflection occurs.

Fig. 6
figure 6

Comparison of involuntary blink and intentional blinking

5 Conclusion

In this study, we have developed a passive EEG BCI technique for tracking a person's focused and relaxed mental states for tracing mental health and psychological treatment effects. We used a low-cost, portable, small size, user-friendly, single-channel MW2 device to measure EEG signals. We have developed two scenarios for assessing a focused and relaxed state of mind. The recorded raw signals were pre-processed to remove the artifacts. Different bandpass filters were applied to EEG signals to break the signals into gamma, beta, theta, alpha, and delta waves using LabVIEW. Average power and mean amplitude measurements were employed for the spectral analysis in LabVIEW. We have investigated the parameters like relative voltages, relative powers in the frequency domain, and power spectral density (PSD) of focused and relaxed states. The results from the comparisons based on these parameters validate our research objective. We found that the mean values of focused and relaxed EEG signals were 30.23 µV and 15.330 µV. Likewise, the average PSD value of beta waves of the focused state EEG signal was also 1.5 times higher than the relaxed state signal. In addition to this, we have also studied the blink detection ability of MW2 and it is observed that when a user blinks intentionally, the amplitude is relatively larger from blinks that occur involuntarily. Although, we can further justify our hypothesis by investigating some more parameters yet our results are valid and satisfy the research questions. Our study can be used for checking mental health wellness, by training the mind to rapidly enter a relaxed state. By using the proposed technique, students and teachers can evaluate focus while teaching, thereby facilitating both to improve their performances. Moreover, the technique can be employed for the BCIs and neurofeedback applications. However, this MW2 is not recommended for clinical applications.

In the future, we will try to carry out a scientific investigation with blind subjects and compare the different features with normal people. For improved results, more participants with increased time under different stimuli would be employed for the next analysis. Specifically, the post-COVID-19 era of facilitating long-distance online learning is another inspiration for future studies. Since classroom interaction between teachers and students is not possible with online teaching. The challenge of evaluating student knowledge in online teaching is higher than classroom teaching. Hence, we intend to start looking deeply at the connection between EEG signals, focus, and learning.