Volumn 2

Using Brain Computer Interface (BCI) method for controlling the speed of motor using mind wave signal

Brijesh Pathak
Department of electronic and telecommunication
Rashtrasant Tukdoji Maharaj Nagpur University
Nagpur, India

Prof.Anil Bavaskar
Department of electronic and telecommunication
Rashtrasant Tukdoji Maharaj Nagpur University
Nagpur, India


The main idea of this project is to control the speed of DC motor by using the mind wave signal such as attention signal .For example if attention level of the particular person who is wearing the mind wave mobile headset is increases the speed of the DC motor increases and if the attention level decreases the speed of motor also decreases


1) Introduction

Electroencephalography (EEG) is the measurement of electrical activity in the living brain. The first electrical neural activities of the human brain were registered by Hans Berger (1924) using a simple galvanometer. On the human Scalp was placed only one electrode, and one wave was identified. It was alpha wave (also called Berger’s wave).Nowadays in clinical use of EEG, 21 electrodes are used to identified 5 fundamental waves, but this kind of the device Costs thousands of dollars. In recent years, inexpensive mobile EEG devices have been developed by Avatar EEG Solutions, Neurosky, OCZ Technology, InteraXon, PLX Devices and Emotiv Systems. These devices are not used in clinical use, but are used in the Brain Control Interface (BCI) and neurofeedback (one of biofeedback types). The BCI is a direct communication pathway between the brain and an external device. The cheapest EEG device is single-channel MindWave MW001 produced by Neurosky Inc., San Jose, CA. It cost only around $80. The device consists of eight main parts, ear clip, flexible ear arm, battery area, power switch, adjustable head band, sensor tip, sensor arm and inside think gear chipset. Figure 1 presents the device design. The principle of operation is quite simple. Two dry sensors are used to detect and filter the EEG signals. The sensor tip detects electrical signals from the forehead of the brain. At the same time, the sensor picks up ambient noise generated by human muscle, computers, light bulbs, electrical sockets and other electrical devices. The second sensor, ear clip, is a grounds and reference, which allows thinkgear chip to filter out the electrical noise. The device measures the raw signal, power spectrum (alpha, beta, delta, gamma, theta), attention level, mediation level and blink detection. The raw EEG data received at a rate of 512 Hz. Other measured values are made every second. Therefore, raw EEG data is a main source of information on EEG signals using MindWave MW001.

Fig 1.mind wave mobile design


A. Types of wave:

In human brain there are different wave with its own particular frequency range such as alpha, beta, gamma, delta and theta.

  1. Gamma wave are in the frequency range of 31 Hz and up. It is thought that it refelect the mechanism of consciousness. Beta and Gamma waves together have been associated with attention, perception and cognition.
  2. Beta wave is in the frequency range of 12 and 30 Hz, but are often divided into β1 and β2 to get a more specific range. The wave is small and fast, associated with focused concentration and best defined in central and frontal areas. When resisting or suppressing movement, or solving a math task, there is an increase of beta activity.
  3. Alpha wave ranging from 7.5 to 12 Hz is slower and associated with relaxation and disengagement. Thinking of something peaceful with eye closed should given an increase of alpha activity. It is also called as Berger’s wave.
  4. Theta wave ranging from 3.5 to 7.5 Hz, are linked to inefficiency, day dreaming and the very lowest wave of theta represent line between being awake or in a sleep state. Theta arises from emotional stress, especially frustration or disappointment. It has also been associated with access to unconsciousness material, creative inspiration and deep meditation.
  5. Delta wave ranging from 0.5 TO 3.5 Hz is the slowest wave occurs when sleeping. If this wave occurs in the awake state, it thought to indicate physical defect in the brain. Movement can make artificial delta wave.

B. Selection of Signal

There is a particular frequency range for an attention and meditation level of a person. For calculating level of attention and meditation we have esense meter through which we can get the attention and meditation level of a personFor all the different types of eSenses (i.e. Attention, Meditation), the meter value is reported on a relative eSense scale of 1 to 100. On this scale, a value between 40 to 60 at any given moment in time is considered “neutral”, and is similar in notion to “baselines” that are established in conventional.

EEG measurement techniques (though the method for determining a ThinkGear baseline is proprietary and may differ from conventional EEG). A value from 60 to 80 is considered “slightly elevated”, and may be interpreted as levels being possibly higher than normal (levels of Attention or Meditation that may be higher than normal for a given person). Values from 80 to 100 are considered “elevated”, meaning they are strongly indicative of heightened levels of that eSense. An eSense meter value of 0 is a special value indicating the ThinkGear is unable to calculate an eSense level with a reasonable amount of reliability. This may be (and usually is) due to excessive noise.

This unsigned one-byte value reports the current eSense Attention meter of the user, which indicates the intensity of a user’s level of mental “focus” or “attention”, such as that which occurs during intense concentration and directed (but stable) mental activity. Its value ranges from 0 to 100. Distractions, wandering thoughts, lack of focus, or anxiety may lower the Attention meter levels. See eSense(tm) Meters above for details about interpreting eSense levels in general. By default, output of this Data Value is enabled. It is typically output once a second.

This unsigned one-byte value reports the current eSense Meditation meter of the user, which indicates the level of a user’s mental “calmness” or “relaxation”. Its value ranges from 0 to 100. Note that Meditation is a measure of a person’s mental levels, not physical levels, so simply relaxing all the muscles of the body may not immediately result in a heightened Meditation level. However, for most people in most normal circumstances, relaxing the body often helps the mind to relax as well. Meditation is related to reduced activity by the active mental processes in the brain, and it has long been an observed effect that closing one’s eyes turns off the mental activities which process images from the eyes, so closing the eyes is often an effective method for increasing the Meditation meter level. Distractions, wandering thoughts, anxiety, agitation, and sensory stimuli may lower the Meditation meter levels. See “eSense Meters” above for details about interpreting eSense levels in general. By default, output of this Data Value is enabled. It is typically output once a second.

From both of the esense above we are using the attention signal for controlling the speed of motor .It will be more beneficial and useful for controlling the speed of motor .we have to  just focus on controlling the speed of motor so by attention signal we can control the speed of motor. If the attention level increases the speed of the motor increases and if the attention level decreases the speed of motor also decreases.

C. Fuzzy logic

Fuzzy logic can be conceptualized as a generalization of classical logic. Modern fuzzy logic was developed by Lotfi Zadeh in the mid-1960s to model those problems in which imprecise data must be used or in which the rules of inference are formulated in a very general way making use of diffuse categories. In fuzzy logic, which is also sometimes called diffuse logic, there are not just two alternatives but a whole continuum of truth values for logical propositions. Here we are using fuzzy logic such as for controlling the speed of motor. As attention level ranges from 0-100 so we divide the level of attention with the particular value of voltage .If the attention level of the person is 20 so DC motor will be getting 1 volt supply voltage. So DC motor will run according to the power getting from 1volt. If the attention level increases the supply voltage to the DC motor increases which would help in increasing the speed of motor.



The headset delivers digital data in an asynchronous serial stream of byte which is of 173 byte. It is in packet format consist of three part:
1) Packet Header
2) Packet Payload
3) Payload Checksum

Packets are sent as an asynchronous serial stream of bytes. The transport medium may be UART, serial COM, USB, bluetooth, file, or any other mechanism which can stream bytes. Each Packet begins with its Header, followed by its Data Payload, and ends with the Payload’s Checksum Byte

The [PAYLOAD…] section is allowed to be up to 169 bytes long, while each of [SYNC], [PLENGTH], and [CHKSUM] are a single byte each. This means that a complete, valid Packet is a minimum of 4 bytes long (possible if the Data Payload is zero bytes long, i.e. empty) and a maximum of 173 bytes long (possible if the Data Payload is the maximum 169 bytes long). The [CHKSUM] Byte must be used to verify the integrity of the Packet’s Data Payload. The Header of a Packet consists of 3 bytes: two synchronization [SYNC] bytes (0xAA 0xAA), followed by a [PLENGTH] the two [SYNC] bytes are used to signal the beginning of a new arriving Packet and are bytes with the value 0xAA (decimal 170). Synchronization is two bytes long, instead of only one, to reduce the chance that [SYNC] (0xAA) bytes occurring within the Packet could be mistaken for the beginning of a Packet. Although it is still possible for two consecutive [SYNC] bytes to appear within a Packet (leading to a parser attempting to begin parsing the middle of a Packet as the beginning of a Packet) the
[PLENGTH] and [CHKSUM] combined ensure that such a “mis-sync’d Packet” will never be accidentally interpreted as a valid packet. The [PLENGTH] byte indicates the length, in bytes, of the Packet’s Data Payload [PAYLOAD…] section, and may be any value from 0 up to 169. Any higher value indicates an error (PLENGTH TOO LARGE). Be sure to note that [PLENGTH] is the length of the Packet’s Data Payload, NOT of the entire Packet. The Packet’s complete length will always be [PLENGTH] + 4. The Payload’s Checksum is defined as:

1. Summing all the bytes of the Packet’s Data Payload
2. Taking the lowest 8 bits of the sum
3. Performing the bit inverse (one’s compliment inverse) on those lowest 8 bits

A receiver receiving a Packet must use those 3 steps to calculate the checksum for the Data Payload they received, and then compare it to the [CHKSUM] Checksum Byte received with the Packet. If the calculated payload checksum and received [CHKSUM] values do not match, the entire Packet should be discarded as invalid.

Fig. 2 Block diagram of interfacing of Bluetooth and dc motor the arm controller

From the block diagram we can see that the headset transmitting the signal in an asynchronous stream of byte which can be receive by the Bluetooth at 57k baud rate . It receives 173 byte of data from the headset and it has to follow certain procedure to parse the data which has been discussed above. As this procedure gets complete we can select the data which is required there is particular code for selection of particular signal. If we want attention signal we have to use the code 0x04 which give the attention level of the person who is wearing the headset. Every second its provide the value of the attention signal so we have to store the attention level of the person to a particular memory location so we can get continuously the fresh data .This data has to be used with DC motor so that we can provide the supply voltage according to level of attention signal .If the attention level increases the speed of the motor increases and if the attention level decreases the speed of the motor decreases.


We have been working on the programming so that we can control the speed of motor using mind wave. We will finish with programming as soon as possible.


I would like to express sincere gratitude and appreciation to all those who gave me the possibility to complete this paper. A special thanks to my Project Guide Prof. Anil Bavaskar, whose help, simulating suggestions and encouragement, helped to coordinate project especially in writing this paper. Word often fail to pay one’s gratitude oneself, still we would like to convey sincere thanks to our H.O.D Prof. Sanjeev Sharma, without whose encouragement and guidance this project would not have materialized.


  1. Processing and spectral analysis of the raw EEG signal from the MindWave by Wojciech Salabun ISSN 0033-2097, R. 90 NR 2/2014.
  2. Fuzzy Logic Technique to Control a Robot Based on Non-Invasive Brain Computer Interface by Human Group by Hassan Samadi, Mahdi Karimi. IEEE International Conference on Robotics and Mechatronics -2014.
  3. Developing brain computer interface by fuzzy logic by Mandeep Kaur and Poonam Tanwar.
  4. Neuro-fuzzy classification of brain computer interface data using phase based feature by Atiye Pourbakhtiar, Mousa Shamsi, and Fateme Farrokhshad. IEEE2013.
  5. Brain-Computer Interface Analysis using Continuous Wavelet Transform and Adaptive Neuro-Fuzzy Classifier by Sam Darvishi and Ahmed Al-Ani .IEEE EMBS 2007.
  6. Use of fuzzy logic for segmenting of brain images by multi-agent system by S. Nasser, R. Mekki. IEEE International Conference on Systems and Control 2013.
  7. BCI revolutionizing human computer interaction by Bernhard Graimann, Brenda ALLISON, Gertfurtscheller.
  8. Toward BCI byGuido Dornhege, José del R. Millán, Thilo Hinterberger, Dennis J. McFarland,and Klaus-Robert Müller.

Related posts



E-Retailing – A perception & changing trend of central India’s customers.




Leave a Comment