Wireless Brainwave Sensing Using an EEG Headset and Labview Programming
Using a Bluetooth HC-06 module and an electroencephalogram (EEG) Mindflex headset, I developed a wireless brainwave sensing system based on Labview graphical programming. Using the system, EEG raw data was attained, saved and processed. Brainwaves were recorded during three activities: relaxing, reading and gaming. The results indicate that the Mid-gamma wave (30 Hz~39 Hz) dramatically increased while playing games.
The electroencephalogram (EEG) is a recording of the electrical activity in the brain from the scalp. It is a noninvasive method to detect brain activities. Although similar studies had been carried out in animals as early as 1870, Hans Berger made the first EEG recordings in 1929. EEG signals are also called brainwaves. Brainwaves have different frequencies for different brain activities. According to signal frequency, there are five brainwave patterns: Delta wave, Theta wave, Alpha wave, Beta wave, and Gamma wave[2,3]. Scientists have studied the relationship between brain activities and brainwaves[4,5]. In recent years, they’ve also discovered the significance of high frequency Gamma waves (over 70 Hz). Table I lists the frequencies, amplitudes and significances of different brainwaves.
Table I: Brainwave patterns and their frequencies, amplitudes and significances.
|Theta||3.5~6.75||<30||Deep relaxed, daydream, repetitive task|
|Low-Beta||13~16.75||<20||Alert & focused: homework, teaching, conversation|
|Low-Gamma||31~39.75||<10||High concentration, solving problem|
A Mindflex EEG headset was used to receive EEG signals. Mindflex is a toy that allows its user to control the height of a ball with mental concentration. The headset transmits ThinkGear Data Values, encoded within ThinkGear Packets, as a serial stream of bytes over Bluetooth via a standard Bluetooth Serial Port Profile (SPP). ThinkGear Data Values include the following: POOR_SIGNAL Quality, Esense Meters of Attention and Meditation, Raw Wave Value, ASIC_EEG_POWER.
POOR_SIGNAL Quality. It describes how poor the EEG signal is, ranging from 0 to 200. The higher the number, the more noise is detected. A value of 200 means that the electrodes are not touching the user’s skin.
Esense Meters of Attention and Meditation. The values were reported on a relative scale of 1 to 100. A value between 40 to 60 is considered “neutral”; a value from 60 to 80 is considered “slightly elevated”; and a value from 80 to 100 is considered “elevated”, meaning it is strongly indicative of heightened level of that Esense.
Raw Wave Value. It represents a single raw wave sample. Its value is a signed 16-bit integer ranging from -32768 to 32767. In one second, 512 raw wave values are sent.
ASIC_EEG_POWER. This data value represents the magnitude of eight brainwave types. The eight EEG powers are output in the following order: delta (0.5-2.75 Hz), theta (3.5-6.75 Hz), low-alpha (7.5-9.25 Hz), high-alpha (10-11.75 Hz), low-beta (13-16.75 Hz), high-beta (18-29.75 Hz), low-gamma (31-39.75 Hz), and mid-gamma (41-49.75 Hz). These values range from 0 to 256 and have no units. They are only meaningful compared to each other and to themselves. They are typically output once a second.
The digital data was delivered as an asynchronous serial stream of bytes. The serial stream was parsed and interpreted as ThinkGear Packets. A ThinkGear Packet consists of 3 parts: Packet Header, Packet Payload, and Payload Checksum.
[SYNC] [SYNC] [PLENGTH] [PAYLOAD] [CHECKSUM]
The Header of a Packet consists of 3 bytes: two [SYNC] bytes (0xAA 0xAA) and a [PLENGTH] (Payload length) byte. The length of [PAYLOAD] is from 0 to 169 bytes. The byte of [CHECKSUM] was used to verify the integrity of the Packet. Therefore, the length of a valid Packet is from 4 bytes to 173 bytes.
Wireless brainwave sensing system
Figure 1(a) shows the Mindflex headset. There are three electrodes in the headset. The sensing electrode is aligned on the forehead. The other two electrodes are clipped to the ear lobes as reference electrodes. Figure 1(b) shows the circuit board in the headset. Figure 1(c) shows the Bluetooth HC-06 module and the way of connecting with the circuit board.
Figure 1. (a). Mindflex headset. (b). Circuit board in the headset. (c). Bluetooth module of HC-06 to send the data and the connection method with the circuit board.
The steps brainwave data takes to transfer over Bluetooth are as follows.
Step 1: To transfer EEG raw data, it is necessary to set the HC-06 Bluetooth module’s baud rate to 57600. The default baud rate of HC-06 is 9600. A video shows how to change the baud rate of HC-06.
Step 2: Set up an electrical connection between the circuit board of the EEG headset and the Bluetooth HC-06 module. The “+”, “-”, “R”, and “T” on the circuit board are connected with the “+5V”, “GND”, “TX”, and “RX” of the HC-05 respectively. (Figure 1)
Step 3: Set up communication between the computer and the Bluetooth HC-06 module.
Step 4: Switch Mindflex from 0x01 mode to 0x02 mode through Bluetooth. In the default 0x01 mode, the circuit transmits at a 9600 baud rate and sends processed data every second which includes the values of Meditation, Attention, and the values for the power spectrums of various brainwave patterns. To get raw EEG data, it is essential to switch the Mindflex headset to 0x02 mode by sending the hex string 0x00, 0xF8, 0x00, 0x00, 0x00, 0xE0 to the circuit board at a 57600 baud rate. Figure 2 shows the Labview program used to send the hex string.
Figure 2. Labview program to switch the Mindflex headset mode from 0x01 to 0x02.
Step 5: Collect EEG data from the Mindflex headset. Figure 3 displays the Labview program used to collect raw EEG data and the brainwave values from the headset. Figure 4 shows the Labview program’s interface.
Figure 3. Labview program to get the data transferred from Mindflex headset.
Figure 4. Interface of the Labview program for brainwave measurement.
Figure 5 is an illustration of the wireless brainwave measurement. The electrical potential between the forehead electrode and ear electrode was amplified and digitized, then the data was processed by Fast Fourier Transform (FFT) in the headset board to produce the power values of the eight brainwave types. The digitized raw data and other ThinkGear Data Values were transmitted via wireless connection over Bluetooth to the computer. The Labview program displayed, processed and saved the brainwave data.
Figure 5. Illustration of the wireless brainwave measurement.
Based on the raw data, brainwaves change over time. Figure 6(a) shows the brainwave caused by eye-blinks. As signals of eye-blinks are quite disruptive, they may cover useful EEG signals. Figure 6(b) shows the brainwaves caused by chewing; the values are lower than those caused by eye-blinks.
Figure 6. (a). brainwaves caused by eye-blinks. (b). brainwaves caused by chewing.
Figure 7(a) shows the Alpha brainwave when relaxing, and Figure 7(b) shows the Gamma brainwave when playing a computer game.
Figure 7. (a). Alpha brainwave when relaxing. (b). Gamma brainwave when playing a computer game.
The brainwaves of 11 persons (ages 10 – 50) were measured when they were gaming, reading and relaxing. Table II shows the average signal power values of the eight brainwave types for those 11 people. Results are plotted in Figure 8. Different activities produce varying levels of mid-gamma waves.
Table II: Average values the powers for each type of brainwaves
Figure 8. Average values the powers for each type of brainwaves.
Conclusion and discussion
This wireless brainwave sensing system was developed using an EEG headset, a Bluetooth HC-06 module and Labview graphical programming. Using the system, the brainwaves of 11 people were measured while they were relaxing, reading and gaming. From Table II and Figure 8, the value of the Mid-γ waves when playing games can be seen to be higher than when reading or relaxing. The reason for this is that the brain is more active when playing games. The low-α wave to high-β waves were higher in the game state, but no significant changes were observed in the high-α range; the levels of low frequency δ and θ waves were also higher during game play compared to when relaxing and reading. Based on these results, during games, some parts of the brain are active while some parts of the brain may be inactive. Gaming disorders are becoming a severe problem for young people. This research may help to solve the problem of game addiction. In the future, further research could be done using a multi-channel EEG measurement system to determine the active and inactive parts of the brain when playing games.
I appreciate the help and support from directors Mr. Ryosuke Araki, Mr. Kanade Matsuo and Mr. Mitsuhide Sakurai. I also appreciate the measurement supports.
- Coenen A., Fine E., Zayachkivska O. 2017 “Adolf Beck: a forgotten pioneer in electroencephalography.” Journal of the History of the Neurosciences Vol. 23, 276–86.
- Foster J.J., Sutterer D.W., Serences J.T., Vogel E.K., Awh E. July 2017. “Alpha-band oscillations enable spatially and temporally resolved tracking of covert spatial attention.” Psychological Science Vol. 28, 929–941.
- Dement W., Kleitman N. “Cyclic variations in EEG during sleep and their relation to eye movements, body motility, and dreaming,” Electroencephalography and Clinical Neurophysiology Vol. 9, 673–90, November 1957.
- Engel A.K., Singer W. “Temporal binding and the neural correlates of sensory awareness.” Trends in Cognitive Sciences Vol. 5, 16–25, January 2001.
- Varela F., Lachaux J.P., Rodriguez E., Martinerie J. “The brainweb: phase synchronization and large-scale integration.” Nature Reviews. Neuroscience Vol. 2, 229–39. April 2001.
- Nottage J.F., Horder J. “State-of-the-art analysis of high-frequency (gamma range) electroencephalography in humans.” Neuropsychobiology Vol. 72, 219-228, 2015
- MindSet Communications Protocol, May7, 2015, http://neurosky.com/.
About the Author