SlideShare a Scribd company logo
1 of 64
Brain Controlled ‘SPM’
UNIVERSITY OF PUNE
A PROJECT REPORT ON
Brain Controlled Special Purpose Machine (SPM)
BY
ADITYA SANGAWAR –B80383002
AVINASH PAWAR –B80383028
PRATIK WALAWALKAR –B80383095
Under the Guidance of
Prof. Dr. V. M. Wadhai
Sponsored by
ThyssenKrupp India Pvt. Ltd
DEPARTMENT OF
ELECTRONICS & TELECOMMUNICATION ENGINEERING
MIT COLLEGE OF ENGINEERING
KOTHRUD, PUNE – 411 038
2013 - 2014
1
Brain Controlled ‘SPM’
CERTIFICATE
This is to certify that the project titled
Brain Controlled Special Purpose Machine (SPM)
BY
ADITYA SANGAWAR –B80383002
AVINASH PAWAR –B80383028
PRATIK WALAWALKAR –B80383095
is a bonafide work carried out by them, under my guidance, in partial
fulfillment of the requirement for the award of Degree of Bachelor of
Engineering in Electronics & Telecommunication of University of Pune.
Dr. V. M. WADHAI Prof. Dr. M. T. KOLTE
Project Guide Head of Department
Principal E&TC
DEPARTMENT OF
ELECTRONICS & TELECOMMUNICATION ENGINEERING
MIT COLLEGE OF ENGINEERING
KOTHRUD, PUNE – 411 038
2013- 2014
is approved for the degree of BACHELOR OF ENGINEERING – E&TC of University
of Pune.
Date: Place: Pune
2
Brain Controlled ‘SPM’
ACKNOWLEDGEMENT
Success is the manifestation of diligence, perseverance, inspiration, motivation and
innovation. Every new work begins with a systematic approach reaching successful
completion. The project is very complicated and involves a lot of careful decision making.
But the availability of proper guidance and inspiration from our teachers made the path
easier for us.
We ascribe our successful journey so far in this venture to our internal guide and mentor,
Dr. V. M. Wadhai, whose endeavor for perfection, undeniable zeal and enthusiasm,
foresight, innovation and dynamism have contributed the reflection of her thought, idea,
concepts and above all, her modest effort. We are indebted to him to take out time and
mentor us.
As the Head of Department also, we are thankful to her, to open a lot of avenues for us. We
are also deeply indebted to our principal, Prof. Dr. V. M. WADHAI and our project
coordinator,
Prof. R. D. KOMATI and all the teaching and non-teaching staff for the facility provided
and moral support without which our project would not have gotten off to a start.
At the end, we would like to thank our friends for their timely co-operation and help. Thank
you for all those who have directly or indirectly contributed towards making our thoughts
into a more real, tangible form.
3
Brain Controlled ‘SPM’
INDEX
CHAP.NO DESCRIPTION PAGE NO
LIST OF FIGURES 5
ABSTRACT 6
1 INTRODUCTION 7
1.1 WHAT IS BRAIN COMPUTER- INTERFACE? 8
1.2 HOW DOES THE BRAIN WORK? 10
1.3 HOW CAN WE MAKE IT POSSIBLE? 11
2 LITERATURE SURVEY 12
2.1 INVASIVE BCI 13
2.2 PARTIALLY INVASIVE BCI 14
2.3 NON INVASIVE BCI 15
3 ELECTROENCEPHALOGRAPHY THEORY 17
3.1 INTRODUCTION 18
3.2 EVENT RELATED POTENTIALS 18
3.3 STEADY STATE VISUAL EVOKED RESPONSES 19
3.4 SLOW CORTICAL POTENTIAL SHIFTS 19
3.5 OSCILLATORY SENSORIMETER ACTIVITY 19
3.6 SPONTANEOUS EEG SIGNALS 19
4 EEG SIGNAL ANALYSIS 20
4.1 P300 DETECTION 21
4.2 mu RHYTHM CONDITIONING 21
4.3 ALPHA RHYTHM MODULATION 22
5 BLOCK DIAGRAM 23
5.1 FUNCTIONAL BLOCK DIAGRAM 24
5.1.1 BLOCK DIAGRAM DESCRIPTION 25
6 SYSTEM DESIGN 29
6.1 SIGNAL ACQUISITION 30
6.2
6.3
6.4
SIGNAL PROCESSING
SIGNAL TRANSMISSION AND RECEPTION
DISPLAY
31
32
35
7
7.1
7.2
7.3
PROGRAM
TRANSMITTER
RECIEVER
MATLAB
39
40
44
49
8
9
10
11
11.1
11.2
12
PERFORMANCE EVALUATION OF THE
SYSTEM
FEATURES
COMPLEXETIES INVOLVED
APLLICATIONS AND FUTURE SCOPE
APPLICATIONS
FUTURE SCOPE
CONCLUSION
REFERENCES
51
54
56
58
59
60
61
63
4
Brain Controlled ‘SPM’
LIST OF FIGURES
ABSTRACT
5
Figure No. Description Page No.
1 NEURON CONNECTION 10
2 10/20 SYSTEM 11
3 RECORDINGS OF BRAINWAVES PRODUCED
BY AN ELECTROENCEPHALOGRAM
15
4 EEG WAVE FREQUENCY RANGES 18
5 FUNCTIONAL BLOCK DIAGRAM 24
6 SOURCE IS NEURON FIRING 25
7 BANDPASS FILTER 26
8 ATMEGA32 27
9 TWS 434 & RWS 434 27
10 16*2 LCD 28
11 DC MOTOR 28
12 SIGNAL ACQUISITION LAYOUT 31
13 ATMEGA32 SCHEMATIC 32
14 TRANSMITTER SCHEMATIC 33
15 TRANSMITTER LAYOUT 33
16 RECIEVER SCHEMATIC 34
17 RECIEVER LAYOUT 34
18 DISPLAY SCHEMATIC 36
19 DISPLAY LAYOUT 37
20 SPM SCHEMATIC 38
21 SPM LAYOUT 38
22 RELAXED STATE 52
23 CONCENTRATED STATE 53
24 PWM WAVE 53
Brain Controlled ‘SPM’
A brain computer interface is a direct technology interface between a brain and computer.
The brain’s electrical output is translated by a computer into physical output. These physical
outputs can be used to operate any real time objects like light, fan and even large CNC
machines using just the concentration of brain. The machines in industries can be controlled
from any position without being actually physically present near the machine. The aim of the
project is to operate all real time machines without using the present techniques but by using
the brain’s electrical signals.
Message and commands are not by muscle contractions but rather by electrophysiological
signals from the brain.
These generated signals will be analyzed, processed and sent via wireless communication to
the load which is needed to turn ON and OFF.
6
Brain Controlled ‘SPM’
CHAPTER 1: INTRODUCTION
1.1. What is a Brain-Computer Interface (BCI)?
Since the creation of computer rendered environments, the computers power has been
increasing to an amazing speed. Each year, the possibilities offered by a computer are
growing extraordinarily. However, the communications with a machine have unfortunately
7
Brain Controlled ‘SPM’
not significantly evolved. We still have to content ourselves of an old keyboard, a mouse and
a screen display. It is undeniable that it would be a wonderful evolution to improve our
interactions with the machines. Following this idea, eminent computer professionals were
concerned about developing a new way of communication using the brain. Based on
measures of the electrical activity of the brain, the goal was to discover the user's thoughts in
order to execute his orders. To accomplish this prowess, the natural properties of the brain
were used: to identify a particular mental activity of the subject, we observe the variation of
his mental activities in frequency and in time using an appropriate material. A mathematical
algorithm will next analyse the collected data and guess about the subject thoughts.
This technology offers creating a completely new way of communication offering lots of
possibilities. For example, for persons with movements' disabilities, a BCI could help them
to command their electric wheelchair without needing somebody else help, giving them
more independence.
As another example, we can image substitute some damaged nerves by computers
intercepting the brain messages and redirecting them to the muscle. For people having to
deal with epilepsy crisis, it would be interesting to improve their knowledge of the different
processes that stimulate a crisis and try to avoid them, controlling their own brain as another
muscle. The idea of using our brains to directly control a machine isn't particularly new. As
far back as 1967, Edmond Dewan described experiments using subjects wired to an
electroencephalograph (EEG), which records and graphs the electrical activity of the brain.
With practice, the subjects were able to reduce the amplitude of their brain's alpha rhythms,
to transmit Morse code to a teleprinter. Research into the Brain Computer Interface, or BCI,
began in earnest in the early 70's, when the United States Department of Defence saw the
promise of fighter pilots using their minds to directly control their planes. Given the
technology of the time, there was limited success, and the program was cancelled. But the
groundwork was laid for a field of research now growing rapidly. A major motivation has
been to help patients suffering from conditions such as cerebral palsy, or spinal injuries,
which inhibit physical control, but which leave intellectual faculties intact. Over the last
decade, great advances have been made.
Automatic systems capable of understanding different facets of human communication will
be at the heart of human-computer interfaces (HCI) in the near future. An HCI which is built
on the guiding principle: "think and make it happen without any physical effort" is called a
8
Brain Controlled ‘SPM’
brain-computer interface (BCI). Indeed, the "think" part of this principle involves the human
brain, "make it happen" implies that an executor is needed (here: a computer) and "without
any physical effort" means that a direct interface between the brain and the computer
is required.
To make the computer understand what the brain intends to communicate necessitates
monitoring the brain activity. Among the possible brain monitoring methods, the scalp
recorded electroencephalogram (EEG) constitutes an adequate alternative because of its
good time resolution, relative simplicity and non-invasiveness when compared to other
methods such as: functional magnetic resonance imaging, positron emission tomography,
magneto encephalography and electrocardiogram. Furthermore, there is clear evidence that
observable changes in EEG result from performing given mental activities. The sheer
complexity of the brain's measurable activity produces EEG traces which present a
formidable problem of interpretation. However, by focusing on very specific areas of brain
activity, such as motor function, it is possible to analyse EEG data using filters, Fourier
Transforms, and SVM to extract some useful signal from the noise. Electrophysiological
signals reflecting brain activity are acquired from electrodes on the scalp or within the head
and processed to produce measurements of specific signal features, such as amplitudes of
evoked potentials or EEG rhythms or firing rates of single neurons that reflect the user’s
intentions. These features are translated into commands that operate a device, such as a word
processor. Successful operation depends on the interaction of two adaptive controllers, the user
and the system. The user must develop and maintain good correlation between his or her
intentions and the signal features selected by the BCI; and the BCI must select features that the user
can control and must translate those features into device commands correctly and efficiently.
Brain-computer interface (BCI) technology is a potentially powerful new communication
and control option for those with severe motor disabilities. The pace and volume of BCI
research have grown very rapidly over the past decade. The success of this exciting work
depends on close and productive interaction of scientists, engineers, and clinicians from
many different disciplines and requires recognition and attention to a number of crucial
issues. This meeting is designed to foster such interdisciplinary interactions and address
these crucial issues, and
thereby promote the development of BCI systems of practical value to people with
disabilities.
9
Brain Controlled ‘SPM’
1.2 How does the brain work?
Our brain is mostly composed of neurons interconnected to each other’s forming an
enormous network (Figure 1). They communicate together through their axons using small
electric impulses (uV).
Figure 1: Neuron connection
During a particular mental activity (MA), we can observe electric potential variations of the
brain active regions. Neurons are generating small electrical variation that summed over a
region give a potential variation in the space. These variations can be decomposed in series
of electrical maps. This means that a mental activity can be seen as a sequential continuation
of brain electrical states. Based on recordings of the brain electrical activity, we would like
to reflect as well as possible the dynamic of the functional states of the brain and identify
the states representing a mental task as well has possible in order to be able to recognize later
on the same mental activity.
1.3 How can we make it possible?
In order to measure the electrical activity of the brain in a non-invasive way, nowadays, the
best choice is to employ electroencephalogram (EEG) material. EEG measurements have
10
Brain Controlled ‘SPM’
proved their utility in the medical world and are not expensive. The 10/20 international
system is used for positioning the electrodes on the scalp. This norm defines 16 electrodes
positions best positioned in order to represent as well as possible the electrical activity of the
Brain (Figure 2).
Figure 2 : 10/20 system placement
Our intention is acquiring EEG signal from the frontal lobe and sensorimotor cortex of the
brain and using it to obtain our desired result.
11
Brain Controlled ‘SPM’
CHAPTER 2 : LITERATURE SURVEY
Before moving to real implications of BCI and its application let us first discuss the three
types of BCI. These types are decided on the basis of the technique used for the interface.
Each of these techniques has some advantages as well as some disadvantages.
12
Brain Controlled ‘SPM’
The three types of BCI are as follows with their features:
2.1. Invasive BCI.
Invasive BCI are directly implanted into the grey matter of the brain during neurosurgery.
They produce the highest quality signals of BCI devices. Invasive BCIs has targeted
repairing damaged sight and providing new functionality to paralyzed people. But these
BCIs are prone to building up of scar-tissue which causes the signal to become weaker and
even lost as body reacts to a foreign object in the brain.
In vision science, direct brain implants have been used to treat non-congenital i.e. acquired
blindness. One of the first scientists to come up with a working brain interface to restore
sight as private researcher, William Dobelle.
Dobelle’s first prototype was implanted into Jerry, a man blinded in adulthood, in 1978. A
single-array BCI containing 68 electrodes was implanted onto Jerry’s visual cortex and
succeeded in producing phosphine, the sensation of seeing light. The system included TV
cameras mounted on glasses to send signals to the implant. Initially the implant allowed
Jerry to see shades of grey in a limited field of vision and at a low frame-rate also requiring
him to be hooked up to a two-ton mainframe. Shrinking electronics and faster computers
made his artificial eye more portable and allowed him to perform simple tasks unassisted.
In 2002, Jens Neumann, also blinded in adulthood, became the first in a series of 16 paying
patients to receive Dobelle’s second generation implant, marking one of the earliest
commercial uses of BCIs. The second generation device used a more sophisticated implant
enabling better mapping of phosphenes into coherent vision. Phosphenes are spread out
across the visual field in what researchers call the starry-night effect. Immediately after his
implant, Jens was able to use imperfectly restored vision to drive slowly around the parking
area of the research institute.
BCIs focusing on motor Neuroprosthetics aim to either restore movement in paralyzed
individuals or provide devices to assist them, such as interfaces with computers or robot
arms.
Researchers at Emory University in Atlanta led by Philip Kennedy and Roy Bakay were first
to install a brain implant in a human that produced signals of high enough quality to
stimulate movement. Their patient, Johnny Ray, suffered from ‘locked-in syndrome’ after
13
Brain Controlled ‘SPM’
suffering a brain-stem stroke. Ray’s implant was installed in 1998 and he lived long enough
to start working with the implant, eventually learning to control a computer cursor.
Tetraplegic Matt Nagle became the first person to control an artificial hand using a BCI in
2005 as part of the nine-month human trail of cyber kinetics Neurotechnology’s Brain gate
chip-implant. Implanted in Nagle’s right precentral gyrus (area of the motor cortex for arm
movement), the 96 electrode Brain gate implant allowed Nagle to control a robotic arm by
thinking about moving his hand as well as a computer cursor, lights and TV.
2.2. Partially Invasive BCI.
Partially invasive BCI devices are implanted inside the skull but rest outside the brain rather
than amidst the grey matter. They produce better resolution signals than non-invasive BCIs
where the bone tissue of the cranium deflects and deforms signals and have a lower risk of
forming scar-tissue in the brain than fully-invasive BCIs.
Electrocardiography (ECoG) uses the same technology as non-invasive
electroencephalography, but the electrodes are embedded in a thin plastic pad that is placed
above the cortex, beneath the Dura mater. ECoG technologies were first traled in humans in
2004 by Eric Leuthardt and Daniel Moran from Washington University in St Louis. In a later
trial, the researchers enabled a teenage boy to play Space Invaders using his ECoG implant.
This research indicates that it is difficult to produce kinematics BCI devices with more than
one dimension of control using ECoG.
Light Reactive Imaging BCI devices are still in the realm of theory. These would involve
implanting laser inside the skull. The laser would be trained on a single neuron and the
neuron’s reflectance measured by a separate sensor. When neuron fires, The laser light
pattern and wavelengths it reflects would change slightly. This would allow researchers to
monitor single neurons but require less contact with tissue and reduce the risk of scar-tissue
build up.
2.3. Non-Invasive BCI.
14
Brain Controlled ‘SPM’
As well as invasive experiments, there have also been experiments in humans using non-
invasive neuro imaging technologies as interfaces. Signals recorded in this way have been
used to power muscle implants and restore partial movement in an experimental volunteer.
Although they are easy to wear, non-invasive implants produce poor signal resolution
because the skull dampens signals, dispersing and blurring the electromagnetic waves
created by the neurons. Although the waves can still be detected it is more difficult to
determine the area of the brain that created them or the actions of individual neurons.
Figure 3 : Recordings of brainwaves produced by an electroencephalogram
Electroencephalography (EEG) is the most studied potential non-invasive interface,
mainly due to its fine temporal resolutions, ease of use, portability and low set-up cost. But
as well as the technology's susceptibility to noise, another substantial barrier to using EEG as
a brain-computer interface is the extensive training required before users can work the
technology. For example, in experiments beginning in the mid-1990s, Niels Birbaumer of
the University of Tübingen in Germany used EEG recordings of slow cortical potential to
give paralysed patients limited control over a computer cursor.(Birbaumer had earlier trained
epileptics to prevent impending fits by controlling this low voltage wave.) The experiment
saw ten patients trained to move a computer cursor by controlling their brainwaves. The
process was slow, requiring more than an hour for patients to write 100 characters with the
cursor, while training often took many months.
Another research parameter is the type of waves measured. Birbaumer's later
research with Jonathan Wolpaw at New York State University has focused on developing
technology that would allow users to choose the brain signals they found easiest to operate a
BCI, including mu and beta waves.
15
Brain Controlled ‘SPM’
A further parameter is the method of feedback used and this is shown in studies of
P300 signals. Patterns of P300 waves are generated involuntarily (stimulus-feedback) when
people see something they recognizes and may allow BCIs to decode categories of thoughts
without training patients first. By contrast, the biofeedback methods described above require
learning to control brainwaves so the resulting brain activity can be detected. In 2000, for
example, research by Jessica Bayliss at the University of Rochester showed that volunteers
wearing virtual reality helmets could control elements in a virtual world using their P300
EEG readings, including turning lights on and off and bringing a mock-up car to a stop.
In 1999, researchers at Case Western Reserve University led by Hunter Peckham,
used 64-electrode EEG skullcap to return limited hand movements to quadriplegic Jim
Jatich. As Jatich concentrated on simple but opposite concepts like up and down, his beta-
rhythm EEG output was analysed using software to identify patterns in the noise. A basic
pattern was identified and used to control a switch: Above average activity was set to on,
below average off. As well as enabling Jatich to control a computer cursor the signals were
also used to drive the nerve controllers embedded in his hands, restoring some movement.
Electronic neural-networks have been deployed which shift the learning phase from
the user to the computer. Experiments by scientists at the Fraunhofer Society in 2004 using
neural networks led to noticeable improvements within 30 minutes of training.
Experiments by Eduardo Miranda aim to use EEG recordings of mental activity associated
with music to allow the disabled to express themselves musically through an
encephalophone.
16
Brain Controlled ‘SPM’
CHAPTER 3 : ELECTRO-ENCEPHALO-GRAPHY
THEORY
3.1.INTRODUCTION
17
Brain Controlled ‘SPM’
The EEG signal has several components separated by frequency. Delta waves are
characteristic of deep sleep and are high amplitude waves in the frequency range 0 - 4 Hz.
Theta waves occur within the 4-8 Hz frequency band during meditation, idling, or
drowsiness. Alpha waves have frequency range 8-14 Hz and take place while relaxing or
reflecting. Another way to boost alpha waves is to close the eyes. Beta waves reside in the
13-30 Hz frequency band and are characteristic of the user being alert or active. They
become present while the user is concentrating. Gamma waves in the 30-100 Hz range occur
during sensory processing of sound and sight. Lastly, mu waves occur in the 8-13 Hz
frequency range while motor neurons are at rest.
FIGURE 4 : EEG WAVE FREQUENCY RANGES
Current BCls use the following EEG signals:
3.2.Event Related Potentials (ERPs)
ERPs are transient signals which are characterized by a voltage deviation in the EEG and are
caused by external stimuli or cognitive processes triggered by external events. When the user
pays attention to a particular stimulus, presented by the BCI an ERP that is time locked with
that stimulus appears in her EEG. The changes induced by the ERP in the EEG can be
18
Brain Controlled ‘SPM’
detected by the BCI. Therefore, by focusing her attention to the adequate stimuli, the user
can command the BCI. The advantage of an ERP based BCI resides in the fact that little
training is necessary for a new user to gain control of the BCI. Nonetheless, the
communication is slow since the user must wait for the relevant stimulus presentation.
3.3. Steady State Visual Evoked Responses (SSVERs)
SSVERs are elicited by a visual stimulus that is modulated at a fixed frequency. SSVERs are
characterized by an increase in the EEG activity at the stimulus frequency. Through
feedback, users learn to voluntarily control their SSVER amplitude, whose variations can be
detected by the BCI.
3.4.Slow Cortical Potential Shifts (SCPSs)
SCPSs are shifts of cortical voltage, lasting from a few hundred milliseconds up to several
seconds. Users can learn to produce slow cortical amplitude shifts in an electrically positive
or negative direction for binary control. This skill can be acquired if the users are provided
with a feedback on the course of their SCPS production and if they are positively reinforced
for correct responses.
3.5.Oscillatory sensorimotor activity
The 8-12 Hz and 18-26Hz activities recorded over the motor cortex exhibit noticeable
changes during movement, preparation for movement and imagined movement. Indeed, such
activities decrease in the hemisphere that is opposite (contralateral) to the movement and
increase in the other hemisphere (ipsilateral). The frequency ranges and the magnitude of the
changes are user dependent; if trained, a BCI can detect these changes and react according to
a previously established protocol.
3.6. Spontaneous EEG signals
These signals are recorded during the performance of mental activities other than imagined
motor tasks and are not elicited by external stimuli (e.g. mental counting, mental rotation of
an object, etc.). The BCI can function with spontaneous signals if the patterns characterizing
the corresponding mental activities are learned by the BCI in a training phase.
19
Brain Controlled ‘SPM’
-
CHAPTER 4 : EEG SIGNAL ANALYSIS
20
Brain Controlled ‘SPM’
In today’s time various techniques are used for BCI interface, there implementation ,
analysis and result manipulation.
4.1. P300 Detection
It is a technique for detecting the P300 component of a subject's event-related brain potential
(ERP) and using it to select from an array of 36 screen positions. The P300 component is a
positive-going ERP in the EEG with a latency of about 300ms following the onset of a
rarely- occurring stimulus the subject has been instructed to detect. The EEG was recorded
using electrodes placed at the Pz (parietal) site (10/20 International System), limited with
band-pass filters to 0.02-35Hz and digitized at 50Hz. The "odd-ball" paradigm was used to
elicit the P300, where a number of stimuli are presented to the experimental subject who is
required to pay attention to a particular, rarely-occurring stimulus and respond to it in some
non- motor way, such as by counting occurrences. Detecting the P300 response reliably
requires averaging the EEG response over many presentations of the stimuli.
4.2. mu- rhythm conditioning
mu- rhythm is a detectable pattern in a great majority of individuals in the EEG 8-12Hz
frequency range, centered about 9.1Hz. Wolpaw describes detecting subjects' mu-rhythm
amplitude, defined as the square-root of the spectral EEG power at 9Hz, using two scalp-
mounted electrodes located near location C3 in the International 10/20 System and a digital
signal processing board analyzing continuous EEG in 333ms segments, and using it to drive
a cursor up or down on a screen toward a target placed randomly at the top or bottom. An
experiment operator preset the size of the ranges and number of cursor movement steps
assigned to each range for each subject during testing prior to each experimental run.
Ranges were set so that the commonest mu-rhythm amplitudes (<4 microvolt’s) left the
cursor in place or moved it downwards moderately while higher amplitudes (>4 microvolt’s)
moved it upwards in increasing jumps. Weights were adjusted as subjects exhibited better
control of their mu-rhythm amplitudes for up and down targets in repeated trials. Wolpaw
substantiates subjects' learned intentional control over mu-rhythm amplitude in three ways:
by performing frequency analysis up to 192Hz on subjects during cursor movement trials
and failing to find any relationship between mu- rhythm changes and the higher frequencies
21
Brain Controlled ‘SPM’
associated with muscular (EMG) activity; by subjects statements about not making contra
lateral movements and observing none; and by failing to find any relationship between mu-
rhythm changes and posterior scalp recordings of the visual alpha-rhythm. Four out of five
subjects acquired impressive control over their mu-rhythm amplitude during 12 45-minute
sessions over a period of two months. Accuracies of 80-95% target hits across experimental
subjects were achieved and rates of 10-29 hits per minute. Off-line analysis of two subjects'
raw EEG data provided good support for Wolpaw's experimental results.
4.3 Alpha rhythm modulation
Alpha waves are neural oscillations in the frequency range of 8–12 Hz arising from
synchronous and coherent (in phase or constructive) electrical activity of thalamic
pacemaker cells in humans. They are also called Berger's wave in memory of the founder of
EEG.
Alpha rhythm is often considered to correspond to an ‘idling’ state of mental activity, and
equipment is sold for self-treatment by some health stores, supposed to enable the user to
develop a conscious self-induction of alpha rhythm.
Results show that short-lasting changes in brain's excitability state are reflected the relative
alpha power of the EEG, which may explain significant variability in perceptual processes
and ERP generation especially at boundary conditions such as sensory threshold.
22
Brain Controlled ‘SPM’
CHAPTER 5 : BLOCK DIAGRAM
23
Brain Controlled ‘SPM’
5.1. FUNCTIONAL BLOCK DIAGRAM
FIGURE 5.1 : FUNCTIONAL BLOCK DIAGRAM
24
Brain Controlled ‘SPM’
5.1.1 BLOCK DIAGRAM DESCRIPTION
 BRAIN & EEG ELECTRODES
Brain imaging experiments using functional magnetic resonance imaging (fMRI) have
shown that the human inferior frontal cortex and superior parietal lobe are active when the
person performs an action and also when the person sees another individual performing an
action. It has been suggested that these brain regions contain mirror neurons, and they have
been defined as the human mirror neuron system.
The single sensor on FP1 (10-20 Electrode System) provides a high degree of
freedom. The necomimi headband is used for providing the required brainwaves.
Figure 5.5.1 : SOURCE IS NEURON FIRING
 INSTRUMENTATION AMPLIFIERS & FILTERS
The amplitude of signal obtained from our brain is very small. Hence a series of amplifiers
in multiple stages is applied in order to amplify the signal.
25
Brain Controlled ‘SPM’
Bandpass Filter (BPF) allows our desired frequency signals to pass through it. Thus only
frequency of 10-15Hz is passed and rest are eliminated.
All electrical devices, including computers, light bulbs, wall sockets, etc., leak some level of
ambient “noise”. This noise is often loud enough to obfuscate brainwaves. As a result, EEG
devices may pick up random readings when both the reference electrode and the primary
electrode are connected to an object that is not emitting brainwaves.
Signal amplification makes the raw brainwave signal stronger. Filtering protocols eliminate
known noise frequencies such as muscle, pulse and electrical devices.
Notch filters eliminate electrical noise of 50Hz.
Extrapolating EEG brainwave signals from noise requires both a reference point and
electrical circuit grounding. The grounding makes the body voltage the same as the headset.
The reference is used to subtract the common ambient noise through a process known as
common mode rejection. The earlobe is a location that experiences the same ambient noise
as the forehead sensor but with minimal neural activity. Hence, it is crucial that the ear
connection be securely fit.
Figure 5.1.2 : BANDPASS FILTER
 MICROCONTROLLER – Atmega32
Atmega32 is a High-performance, Low-power Atmel AVR 8-bit Microcontroller with
32-Kbtyes in system programmable flash memory. It has advanced RISC architecture and
employs two 8-bit timers and one 16-bit timer. It has a 8 channel 10 bit ADC and a UART
support. It also supports SPI serial interface. It has 32 I/O programmable lines and an
operating range of 4.5V to 5.5V. It has many special microcontroller features too.
26
Brain Controlled ‘SPM’
Figure5.1.3 : ATMEGA32
 WIRELESS MODULE
The transmitter and receiver used is TWS 434 and RWS 434 respectively. These are locally
purchased and hence are very cost effective. The operating frequency range of this module is
300 to 433 Mhz. It has a capacity of transmitting up to a 4 bit word. It has an added
advantage that it provides both linear and digital output.In addition it uses a encoder and a
decoder which is HT12E and HT12D.
Figure 5.1.4 : TWS 434 & RWS 434
27
Brain Controlled ‘SPM’
 DISPLAY
The brainwaves can be displayed by the help of MATlab software on a PC. Also the state of
the user can be displayed on a LCD indicating whether a subject is in the concentrated and
the relaxed state along with their voltage levels.
Figure 5.1.5 : 16*2 LCD
 SPM / LOAD
A 12V DC Motor is used which is driven by motor driver : L298. It is a high voltage, high
current dual full-bridge driver which can drive two motors simultaneously. Operating
Supply. Voltage up to 46 V. Total DC Current up to 4 A
Figure 5.1.6 : DC MOTOR
28
Brain Controlled ‘SPM’
CHAPTER 6 : SYSTEM DESIGN
29
Brain Controlled ‘SPM’
System design of the project consists of mainly five parts viz. signal acquisition, signal
processing, signal transmission & reception, display and SPM.
6.1 SIGNAL ACQUISITION
EEG signal acquisition is a very costly and complicated venture. Thus, to simplify the
process a ‘Necomimi’ headband is used for the EEG acquisition. This headband is a product
which is exclusively developed by Neurosky. The bases for the signal acquisition that takes
place in the headband is the ThinkGear AM board. This board is responsible for the
obtaining, amplification and the filtering of the EEG signal. The headband cannot be directly
used for signal acquisition and must be first dismantled. Dismantling the ears revealed a
Emax ES08E analog servo motor which is used to wiggle the ears. The signal is extracted
through the connections provided to the circuit board for the left and right ears. This
provides us with a voltage signal which is clearly measurable. When tested on various
subjects the voltage appears to be 150mv for relaxed state of mind whereas it is 350mv for a
concentrated state of mind. The headband can indicate four different stages of the mind but
the project concentrates on just two. These readings are almost consistent irrespective of age
or gender.
Furthermore a module is required for converting the PWM waves obtained from the
headband to convert to analog signal. This module basically consists of a optocoupler for
isolating the signal ground and the module ground. It also consists of an peak detector, an
RF LPF, and an audio amplifier.
30
Brain Controlled ‘SPM’
6.1.1 MODULE SCHEMATIC AND LAYOUT
Figure 6.1.1 : SIGNAL ACQUISTION SCHEMATIC
6.2 SIGNAL PROCESSING
The signal so extracted from the headband is then processed with the help of a
microcontroller .For this project the microcontroller used is AtMega32. This is a
microcontroller which is developed by Atmel and has a 10 bit built in ADC. The resolution
of the ADC is calculated for the EEG signal. This resolution is then used to find the
minimum values of the two voltages obtained for concentrated and relaxed state. This then is
further given to an lcd display to display the current state of the subjects mind.
Secondly, two thresholds are set for the two states of mind obtained, that is, for a relaxed
state the threshold is 140mv whereas for the concentrated state the threshold is 300mv. Once
the signal crosses the predefined threshold then it is encoded with binary bits with the help
of HT-12E encoder which is used for encoding purposes. This word is then sent to the
transmission section.
31
Brain Controlled ‘SPM’
6.2.1 MODULE SCEMATIC
Figure 6.2.1 : ATMEGA32 SCHEMATIC
6.3 SIGNAL TRANSMISSION & RECEPTION
The binary word which is forwarded by the HT-12E is then given to the transmitter. For the
transmitter TWS 434 is used. It has a operating frequency range of 300 to 433 Mhz, can
transmit a 4 - bit data and is cost effective. The binary word is transmitted with the help of
the transmitter and is received by the receiver RWS 434. It has an added advantage that it
provides both linear and digital output. The output obtained from the receiver is then passed
on to the HT-12D decoder. A microcontroller attached to the decoder switches on the test
machine when the received binary word is identical to the one stored in its memory. Thus, a
machine can be switched on or off depending on the subject’s state of mind.
32
Brain Controlled ‘SPM’
6.3.1 MODULE SCHEMATIC AND LAYOUT
Figure 6.3.1 : TRANSMITTER SCHEMATIC
33
Brain Controlled ‘SPM’
Figure 6.3.2 : TRANSMITTER LAYOUT
Figure 6.3.3 : RECIEVER SCHEMATIC
Figure 6.3.4 : RECIEVER LAYOUT
34
Brain Controlled ‘SPM’
6.4 DISPLAY
The signals which are obtained from the necomimi headband can also be displayed with the
help of an lcd and on a PC with the help of MatLAB software.
Firstly, for the displaying the signals on the lcd display the resolution of the ADC of the
microcontroller is calculated. The resolution is used to calculate the minimum voltages for
the two states of mind that is the relaxed and the concentrated state. This is used to display
the state of mind and the voltage of the signal obtained for the given subject on an lcd.
Secondly, the signal can also be displayed on a PC. Interfacing the signal is to a PC is a
cumbersome task but the process was expedited with the use of a simple audio jack which is
found in earphones. An audio jack has three wire leads out of which only two are required.
One of the wire leads is used to connect to the EEG signal which is acquired through the
necomimi headband and the other wire lead is used as ground. The headphone port of the PC
is connected to the audio jack. The signal is displayed with the help of MatLAB software. It
has a function ‘display audio’ which can be used to display the EEG signal. Display audio
command works for the frequency range of 3 Hz to 3 Khz range, which is the audio
frequency range for human beings. Now, the EEG signals, all lie in the above mentioned
range and thus it is valid to use the command. The signal so obtained is not real time but
serves the primary purpose of displaying the signal.
35
Brain Controlled ‘SPM’
6.4.1 MODULE SCHEMATIC AND LAYOUT
Figure 6.4.1 : DISPLAY SCHEMATIC
36
Brain Controlled ‘SPM’
Figure 6.4.1 : DISPLAY LAYOUT
6.5 SPM/LOAD
The SPM is the special purpose machine or the load in the project. The SPM is the load that
is being run by the brain waves which are generated by the brain. The SPM that is used for
the project is the motor.
37
Brain Controlled ‘SPM’
6.5.1 MODULE SCHEMATIC AND LAYOUT
Figure 6.5.1 : SPM SCHEMATIC
Figure 6.5.2 : SPM LAYOUT
38
Brain Controlled ‘SPM’
CHAPTER 7: PROGRAM
39
Brain Controlled ‘SPM’
The Program code is basically divided into three basic stages – the Transmitter, the Receiver
and the Matlab Display.
7.1 TRANSMITTER
Chip type : ATmega32A
Program type : Application
AVR Core Clock frequency: 2.000000 MHz
Memory model : Small
External RAM size : 0
Data Stack size : 512
*****************************************************/
#include <mega32a.h>
#include <delay.h>
#define ADC_VREF_TYPE 0x00
// Read the AD conversion result
unsigned int read_adc(unsigned char adc_input)
{
ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);
// Delay needed for the stabilization of the ADC input voltage
delay_us(10);
// Start the AD conversion
ADCSRA|=0x40;
// Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10;
return ADCW;
}
int adc=0; // Declare your global variables here
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port A initialization
40
Brain Controlled ‘SPM’
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTA=0x00;
DDRA=0x00;
// Port B initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTB=0x00;
DDRB=0xFF;
// Port C initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTC=0x00;
DDRC=0xFF;
// Port D initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTD=0x00;
DDRD=0xFF;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=0xFF
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer1 Stopped
// Mode: Normal top=0xFFFF
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
41
Brain Controlled ‘SPM’
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// USART initialization
// USART disabled
UCSRB=0x00;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
42
Brain Controlled ‘SPM’
SFIOR=0x00;
// ADC initialization
// ADC Clock frequency: 125.000 kHz
// ADC Voltage Reference: AREF pin
ADMUX=ADC_VREF_TYPE & 0xff;
ADCSRA=0x84;
// SPI initialization
// SPI disabled
SPCR=0x00;
// TWI initialization
// TWI disabled
TWCR=0x00;
while (1)
{
adc=read_adc(1);
if(adc<40) // Below 200 mV
{
PORTC=0x06;
}
else if(adc>60) // Above 300 mV
{
PORTC=0x0F;
}
else
{
PORTC=0x03; // Between 200 - 300 mV
}
}
}
43
Brain Controlled ‘SPM’
7.2 Receiver
Chip type : ATmega32A
Program type : Application
AVR Core Clock frequency: 2.000000 MHz
Memory model : Small
External RAM size : 0
Data Stack size : 512
*****************************************************/
#include <mega32a.h>
// Alphanumeric LCD functions
#include <alcd.h>
#include <iobits.h>
#include <delay.h>
// Declare your global variables here
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port A initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTA=0x00;
DDRA=0xFF;
44
Brain Controlled ‘SPM’
// Port B initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTB=0x00;
DDRB=0xFF;
// Port C initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTC=0x00;
DDRC=0xFF;
// Port D initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out
Func0=Out
// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0
PORTD=0x00;
DDRD=0xFF;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=0xFF
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer1 Stopped
45
Brain Controlled ‘SPM’
// Mode: Normal top=0xFFFF
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer2 Stopped
// Mode: Normal top=0xFF
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
46
Brain Controlled ‘SPM’
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// USART initialization
// USART disabled
UCSRB=0x00;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;
// ADC initialization
// ADC disabled
ADCSRA=0x00;
// SPI initialization
// SPI disabled
SPCR=0x00;
// TWI initialization
// TWI disabled
TWCR=0x00;
// Alphanumeric LCD initialization
// Connections are specified in the
// Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu:
// RS - PORTA Bit 0
47
Brain Controlled ‘SPM’
// RD - PORTA Bit 1
// EN - PORTA Bit 2
// D4 - PORTA Bit 4
// D5 - PORTA Bit 5
// D6 - PORTA Bit 6
// D7 - PORTA Bit 7
// Characters/line: 16
lcd_init(16);
while (1)
{
if(PIND==0x06) // Below 200 mV
{
PORTC=0x00;
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf(" RELAXED...");
delay_ms(1000);
}
else if(PIND==0x0F) // Above 300 mV
{
PORTC=0xFF;
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf(" CONCENTRATION");
delay_ms(1000);
}
else if(PIND==0x03)
{
48
Brain Controlled ‘SPM’
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf(" INTERMEDIATE"); // In between 200-300 mV
delay_ms(1000);
}
}
}
7.3 Matlab
Fs = 44100; %# maximum sampling frequency in Hz
T = 1; %# length of one interval signal in sec
t = 0:1/Fs:T-1/Fs; %# time vector
nfft = 2^nextpow2(Fs); %# n-point DFT
numUniq = ceil((nfft+1)/2); %# half point
f = (0:numUniq-1)'*Fs/nfft; %'# frequency vector (one sided)
%# prepare plots
figure
hAx(1) = subplot(211);
hLine(1) = line('XData',t, 'YData',nan(size(t)), 'Color','black', 'Parent',hAx(1));
xlabel('Time (s)'), ylabel('Amplitude')
hAx(2) = subplot(212);
hLine(2) = line('XData',f, 'YData',nan(size(f)), 'Color','blue', 'Parent',hAx(2));
xlabel('Frequency (Hz)'), ylabel('Magnitude (dB)')
set(hAx, 'Box','on', 'XGrid','on', 'YGrid','on')
%#specgram(sig, nfft, Fs);
%# prepare audio recording
recObj = audiorecorder(Fs,24,1);
%# Record for 100 intervals of 1sec each
disp('EEG Recording...')
for i=1:100
49
Brain Controlled ‘SPM’
recordblocking(recObj, T);
%# get data and compute FFT
sig = getaudiodata(recObj);
fftMag = 20*log10( abs(fft(sig,nfft)) );
%# update plots
set(hLine(1), 'YData',sig)
set(hLine(2), 'YData',fftMag(1:numUniq))
title(hAx(1), num2str(i,'EEG Signal for %d seconds'))
% title(hAx(2), num2str(f,'EEG Signal for %d seconds'))
disp(f);
drawnow %# force MATLAB to flush any queued displays
end
disp('Done.')
50
Brain Controlled ‘SPM’
CHAPTER 8: PERFORMANCE EVALUATION OF
THE SYSTEM
51
Brain Controlled ‘SPM’
Amplified EEG Signal (ideal):
Relaxed State – 160 mv
(Alpha waves)
Concentrated State – 300 mv
(Beta waves)
Practical EEG Values:
Subject Gender Age(years) Concentration
State(mv)
Relaxed
State(mv)
Dr.Prof.V.M.Wadhai Male 50 315 165
VInayak Patil Male 22 320 159
Avinash Pawar Male 21 322 158
Pracheetee Joag Female 21 332 155
Ashwati Menon Female 20 305 161
Mrs. Walawalkar Female 46 323 172
Results
52
Brain Controlled ‘SPM’
Figure 8.1 : RELAXED STATE
Figure 8.2 : CONCENTRATED STATE
53
Brain Controlled ‘SPM’
Figure 8.3 : PWM WAVE
CHAPTER 9: FEATURES
54
Brain Controlled ‘SPM’
The project is very helpful in the study of EEG signals as it has a display section and also it
serves another purpose of controlling a device or machine. It has various features, viz.,
 The system is portable - It is realized with the help of a PCB.
 Installation is easier than other device - Only one
electrodes are connected to the test subject, which is connected to the headband.
 The system is cost effective – The main circuit board and its peripherals are made up
of low cost components.
 An EEG signal analysis is done with the help of the necomimi headband, simplifying
the process of signal acquisition.
 The project serves a dual purpose of display and control.
55
Brain Controlled ‘SPM’
CHAPTER 10: COMPLEXITIES INVOLVED
56
Brain Controlled ‘SPM’
Various problems were encountered while the development of the project was underway as
follows:
 Dismantling the necomimi headband.
 Signal extraction from the headband.
 Transmission of the signal.
 Developing effective real time signal for collecting and analyzing the signals.
 Repeated testing on various subjects to verify the results which are obtained for
another test subject.
57
Brain Controlled ‘SPM’
CHAPTER 11: APPLICATIONS & FUTURE SCOPE
58
Brain Controlled ‘SPM’
11.1. APPLICATIONS
BCI related research is a relatively new field but is finding its way in all areas of sciences.
There are various applications that can be realized with the help of BCI, such as,
 The Mental Typewriter
A paralyzed patient could communicate by using a mental typewriter alone – without
touching the keyboard. In the case of serious accident or illness, a patient’s limbs can be
paralyzed, severely restricting communication with the outside world. The interface is
already showing how it can help these patients to write texts and thus communicate with
their environment
 BCI offers paralyzed patients improved quality of life
Fundamental theories regarding consciousness, emotion and quality of life in sufferers of
paralysis from Amyotrophic Lateral Sclerosis (ALS, also known as 'Lou Gehrig’s disease')
59
Brain Controlled ‘SPM’
are being challenged based on new research on brain-computer interaction. ALS is a
progressive disease that destroys neurons affecting movement.
The study appears in the latest issue of Psychophysiology. The article reviews the usefulness
of currently available brain-computer –interfaces (BCI), which use brain activity to
communicate through external devices, such as computers.
 Neuro-feedback and Cursor Control
The alpha modulation and mu supression control schemes have diverse applications beyond
simply playing the game Pong in brain-computer interfaces. Wheelchair and cursor control
(both 1D and 2D) have been accomplished by mu rhythm suppression. In one instance, users
controlled a cursor in 2D by imagining clenching either their left hand, their right hand, or
moving their feet. This control scheme requires three channels measure three locations of the
sensorimotor cortex near the top of the scalp: user's left side (C_3), center (C_z), and user's
right side (C_4). Even though we had one channel, we could easily extend this to support 2D
cursor control, along with detecting eye blinking artifacts for "clicking" the mouse. One
could imagine applying this technology to allow users with special needs to control
computer mouse movement.
The other application is in the field of neurofeedback. Neurofeedback creates a feedback
loop for users attempting to meditate or treat ADHD disorder. The user visually sees or
audibly hears the power of their alpha waves and is able to manipulate their alpha intensity.
This neurofeedback has applications in the military and aircraft control as well, as users can
be trained to focus and are alerted if they lose concentration. The Pong game can be viewed
as a neurofeedback device since the user's concentration level is visually depicted on the
screen as the position of the left paddle. Thus, the Brain-Computer Interface component of
this project has diverse applications that go far beyond playing a simple computer game with
one's brain waves.
11.2. FUTURE SCOPE
Brain Computer Interface provides a direct communication between activities taking place
inside the brain and the computer. This system can be developed further to support wide
range of applications besides its use in medical field. For example it can be used in the
60
Brain Controlled ‘SPM’
military and aircraft control as the users can be trained to focus and alerted if they lose
concentration. Also this technology can be developed to allow users with special needs to
control computer mouse movement. The project deals with an elementary premise of
switching a machine on or off. It can be further expanded to include a complete home
automation. The various appliances that are used in in our everyday life can be controlled
with the help of the user’s thoughts. The appliances can be given a preference number and
can be controlled accordingly. The project can also be expanded to include industries where
a worker can control the machines, without being in their proximity. Thus, the project can be
developed in various ways according to the application that is needed.
CHAPTER 12 : CONCLUSION
61
Brain Controlled ‘SPM’
Over the past decade, productive BCI research programs have arisen. Facilitated and
encouraged by new understanding of brain function, by the advent of powerful low-cost
computer equipment, and by growing recognition of the needs and potentials of people with
disabilities, these programs concentrate on developing new communication & control
technology for those with severe neuro - muscular disorders.
The immediate goal is to provide these users, who may be completely paralyzed or "locked
in," with basic communication capabilities so that they can express their wishes to
caregivers, operate simple word processing programs etc.
With adequate recognition and effective engagement of these issues, BCI systems could
provide an important new communication and control option for those with motor
disabilities. They might also give to those without disabilities, a supplementary control
channel useful in special circumstances.
62
Brain Controlled ‘SPM’
The project deals with two aspects display of the EEG signals and control of a machine. The
signal is firstly acquired from the necomimi headband. The display of the EEG signal is
carried out with the help of the microcontroller Atmega32 and a LCD. Also the signals are
also displayed on a PC with the help of MatLAB software and an audio jack. Now, for the
control of machines the signal is first processed and is encoded with HT-12E and is
transmitted with the aid of TWS434. The encoded word is received by RWS 434 and is
decoded with HT-12D. This is then used to switch a machine on or off.
REFERENCES
PAPERS
[1] Wolpaw, J. R., Birbaumer, N., McFarland, D. J., Pfurtscheller, G., and Vaughan, T. M.
"Brain-Computer Interfaces for Communication and Control." Clin Neurophysiol 113,
no. 6 (2002): 767-91.
[2] S. Saeid and C. Jonathon. “EEG Signal Processing.” s.l.: John Wiley and Sons, 2007.
[3] “User Adaptive BCIs: SSVEP and P300 Based Interfaces.” Beverina, Fabrizio, et al.,
PsychNology Journal, pp. 331–354, 2003.
[4] “Cost-Effective EEG Signal Acquisition and Recording System.” Sabbir Ibn Arman,
Arif Ahmed, and Anas Syed, 2012
[5] “Brain-Computer Interfaces used for Virtual Reality Control.” Pfurtscheller, Gert and
Scherer, Reinhold, 2010.
63
Brain Controlled ‘SPM’
[6] Wolpaw JR, McFarland DJ. “Control of a two-dimensional movement signal by a
noninvasive brain–computer interface in humans.” Proc Nat Acad Sci 101:17849–17854,
2004.
[7] “The Spatial Location of EEG Electrodes: Locating the Best-Fitting Sphere Relative to
Cortical Anatomy.” VL, Towle, et al. 1993, Electroencephalogr Clin Neurophysiol.
[8] AtMega32 Datasheet – Atmel AVR 8 - bit Microcontroller. Atmel IC Database.
[Online]. Available:http://www.atmel.in/images/doc2503.pdf
WEBSITES
1. http://en.wikipedia.org/wiki/Braincomputer_interface.
2. www.videotutorials.org
3. www.ieee.com
4. www.atmel.com
64

More Related Content

What's hot

brain computer-interfaces PPT
 brain computer-interfaces PPT brain computer-interfaces PPT
brain computer-interfaces PPTVijay Mehta
 
Neural interfacing
Neural interfacingNeural interfacing
Neural interfacingKirtan Shah
 
Brain Computer Interface ppt
Brain Computer Interface pptBrain Computer Interface ppt
Brain Computer Interface pptAjay George
 
BRAIN MACHINE INTERFACE
BRAIN MACHINE INTERFACEBRAIN MACHINE INTERFACE
BRAIN MACHINE INTERFACESruthi Kumar
 
Brain Computer Interface.ppt
Brain Computer Interface.pptBrain Computer Interface.ppt
Brain Computer Interface.pptAmal Sanjay
 
Brain Machine Interface
Brain Machine InterfaceBrain Machine Interface
Brain Machine InterfaceRehan Fazal
 
Brain computer interface based
Brain computer interface basedBrain computer interface based
Brain computer interface basedMohammed Saeed
 
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry Pi
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry PiBrain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry Pi
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry PiVishal Aditya
 
BRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACEBRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACERushi Prajapati
 
Brain computer interface
Brain computer interfaceBrain computer interface
Brain computer interfaceSuman Chandra
 
BRAIN COMPUTER INTERFACE(BCI)
BRAIN COMPUTER INTERFACE(BCI)BRAIN COMPUTER INTERFACE(BCI)
BRAIN COMPUTER INTERFACE(BCI)josnapv
 
Brain computer interface by akshay parmar
Brain computer interface by akshay parmarBrain computer interface by akshay parmar
Brain computer interface by akshay parmarAkshay Parmar
 
Brain computer interface based smart keyboard using neurosky mindwave headset
Brain computer interface based smart keyboard using neurosky mindwave headsetBrain computer interface based smart keyboard using neurosky mindwave headset
Brain computer interface based smart keyboard using neurosky mindwave headsetTELKOMNIKA JOURNAL
 
Brain Machine Interface
Brain Machine InterfaceBrain Machine Interface
Brain Machine InterfaceNikitha Iyer
 
Brain machine interface
Brain machine interfaceBrain machine interface
Brain machine interfaceAnup72
 
BRAIN COMPUTER INTERFACE (BCI)
BRAIN COMPUTER INTERFACE (BCI)BRAIN COMPUTER INTERFACE (BCI)
BRAIN COMPUTER INTERFACE (BCI)Ayush Sharma
 

What's hot (20)

brain computer-interfaces PPT
 brain computer-interfaces PPT brain computer-interfaces PPT
brain computer-interfaces PPT
 
Neural interfacing
Neural interfacingNeural interfacing
Neural interfacing
 
Brain Computer Interface ppt
Brain Computer Interface pptBrain Computer Interface ppt
Brain Computer Interface ppt
 
Braingate
BraingateBraingate
Braingate
 
BRAIN MACHINE INTERFACE
BRAIN MACHINE INTERFACEBRAIN MACHINE INTERFACE
BRAIN MACHINE INTERFACE
 
BCI Paper
BCI PaperBCI Paper
BCI Paper
 
Brain Computer Interface.ppt
Brain Computer Interface.pptBrain Computer Interface.ppt
Brain Computer Interface.ppt
 
Brain Machine Interface
Brain Machine InterfaceBrain Machine Interface
Brain Machine Interface
 
Brain computing Interface
Brain computing InterfaceBrain computing Interface
Brain computing Interface
 
Brain gate ppt prem (5010)
Brain gate  ppt prem (5010)Brain gate  ppt prem (5010)
Brain gate ppt prem (5010)
 
Brain computer interface based
Brain computer interface basedBrain computer interface based
Brain computer interface based
 
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry Pi
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry PiBrain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry Pi
Brain Computer Interface & It's Applications | NeuroSky Minwave | Raspberry Pi
 
BRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACEBRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACE
 
Brain computer interface
Brain computer interfaceBrain computer interface
Brain computer interface
 
BRAIN COMPUTER INTERFACE(BCI)
BRAIN COMPUTER INTERFACE(BCI)BRAIN COMPUTER INTERFACE(BCI)
BRAIN COMPUTER INTERFACE(BCI)
 
Brain computer interface by akshay parmar
Brain computer interface by akshay parmarBrain computer interface by akshay parmar
Brain computer interface by akshay parmar
 
Brain computer interface based smart keyboard using neurosky mindwave headset
Brain computer interface based smart keyboard using neurosky mindwave headsetBrain computer interface based smart keyboard using neurosky mindwave headset
Brain computer interface based smart keyboard using neurosky mindwave headset
 
Brain Machine Interface
Brain Machine InterfaceBrain Machine Interface
Brain Machine Interface
 
Brain machine interface
Brain machine interfaceBrain machine interface
Brain machine interface
 
BRAIN COMPUTER INTERFACE (BCI)
BRAIN COMPUTER INTERFACE (BCI)BRAIN COMPUTER INTERFACE (BCI)
BRAIN COMPUTER INTERFACE (BCI)
 

Viewers also liked

Viewers also liked (7)

Lm386
Lm386Lm386
Lm386
 
Amplifier report
Amplifier reportAmplifier report
Amplifier report
 
Audio amplifier prj
Audio amplifier prjAudio amplifier prj
Audio amplifier prj
 
Simple Amp
Simple AmpSimple Amp
Simple Amp
 
Audio Amplifier Presentation
Audio Amplifier PresentationAudio Amplifier Presentation
Audio Amplifier Presentation
 
audio amplifier - Hamdard University
audio amplifier - Hamdard Universityaudio amplifier - Hamdard University
audio amplifier - Hamdard University
 
Group 1 Audio Amplifier Final Presentation
Group 1 Audio Amplifier Final PresentationGroup 1 Audio Amplifier Final Presentation
Group 1 Audio Amplifier Final Presentation
 

Similar to Final Project Report

The Dawn of the Age of Artificially Intelligent Neuroprosthetics
The Dawn of the Age of Artificially Intelligent NeuroprostheticsThe Dawn of the Age of Artificially Intelligent Neuroprosthetics
The Dawn of the Age of Artificially Intelligent NeuroprostheticsSagar Hingal
 
Brain machine interface
Brain machine interface Brain machine interface
Brain machine interface ShaikYusuf5
 
BRAIN COMPUTER INTERFACE Documentation
BRAIN COMPUTER INTERFACE DocumentationBRAIN COMPUTER INTERFACE Documentation
BRAIN COMPUTER INTERFACE DocumentationBhadra Gowdra
 
Brain Gate Technology (By HasanAli Nodoliya NRI)
Brain Gate Technology (By HasanAli Nodoliya NRI)Brain Gate Technology (By HasanAli Nodoliya NRI)
Brain Gate Technology (By HasanAli Nodoliya NRI)HasanAli Nodoliya (NRI)
 
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...IRJET Journal
 
System Architecture for Brain-Computer Interface based on Machine Learning an...
System Architecture for Brain-Computer Interface based on Machine Learning an...System Architecture for Brain-Computer Interface based on Machine Learning an...
System Architecture for Brain-Computer Interface based on Machine Learning an...ShahanawajAhamad1
 
Brain computer interfaces in medicine
Brain computer interfaces in medicineBrain computer interfaces in medicine
Brain computer interfaces in medicineKarlos Svoboda
 
research paper on Brain Computer Interface devices I - On Brain ...
research paper on Brain Computer Interface devices I - On Brain ...research paper on Brain Computer Interface devices I - On Brain ...
research paper on Brain Computer Interface devices I - On Brain ...butest
 
Brain computer interface
Brain computer interfaceBrain computer interface
Brain computer interfacerahulnale175
 
BrainGate_Technology_PPT.pptx
BrainGate_Technology_PPT.pptxBrainGate_Technology_PPT.pptx
BrainGate_Technology_PPT.pptxKunal Kalamkar
 
Brain Computer Interface
Brain Computer Interface Brain Computer Interface
Brain Computer Interface Deepti Singh
 

Similar to Final Project Report (20)

Ijetcas14 393
Ijetcas14 393Ijetcas14 393
Ijetcas14 393
 
The Dawn of the Age of Artificially Intelligent Neuroprosthetics
The Dawn of the Age of Artificially Intelligent NeuroprostheticsThe Dawn of the Age of Artificially Intelligent Neuroprosthetics
The Dawn of the Age of Artificially Intelligent Neuroprosthetics
 
Brain machine interface
Brain machine interface Brain machine interface
Brain machine interface
 
BRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACEBRAIN COMPUTER INTERFACE
BRAIN COMPUTER INTERFACE
 
BRAIN COMPUTER INTERFACE Documentation
BRAIN COMPUTER INTERFACE DocumentationBRAIN COMPUTER INTERFACE Documentation
BRAIN COMPUTER INTERFACE Documentation
 
1. Brain Computer-Interface
1. Brain Computer-Interface1. Brain Computer-Interface
1. Brain Computer-Interface
 
BRAIN CHIPS
BRAIN CHIPSBRAIN CHIPS
BRAIN CHIPS
 
Brain Gate Technology (By HasanAli Nodoliya NRI)
Brain Gate Technology (By HasanAli Nodoliya NRI)Brain Gate Technology (By HasanAli Nodoliya NRI)
Brain Gate Technology (By HasanAli Nodoliya NRI)
 
Final report-1
Final report-1Final report-1
Final report-1
 
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...
IRJET- Fundamental of Electroencephalogram (EEG) Review for Brain-Computer In...
 
BRAIN GATE
BRAIN GATEBRAIN GATE
BRAIN GATE
 
System Architecture for Brain-Computer Interface based on Machine Learning an...
System Architecture for Brain-Computer Interface based on Machine Learning an...System Architecture for Brain-Computer Interface based on Machine Learning an...
System Architecture for Brain-Computer Interface based on Machine Learning an...
 
Brain computer interfaces in medicine
Brain computer interfaces in medicineBrain computer interfaces in medicine
Brain computer interfaces in medicine
 
research paper on Brain Computer Interface devices I - On Brain ...
research paper on Brain Computer Interface devices I - On Brain ...research paper on Brain Computer Interface devices I - On Brain ...
research paper on Brain Computer Interface devices I - On Brain ...
 
Braingate seminar
Braingate seminarBraingate seminar
Braingate seminar
 
Brain computer interface
Brain computer interfaceBrain computer interface
Brain computer interface
 
[IJET-V1I5P6] Authors:M. Newlin Rajkumar, M. Lavanya
[IJET-V1I5P6] Authors:M. Newlin Rajkumar, M. Lavanya[IJET-V1I5P6] Authors:M. Newlin Rajkumar, M. Lavanya
[IJET-V1I5P6] Authors:M. Newlin Rajkumar, M. Lavanya
 
Brain gate
Brain gateBrain gate
Brain gate
 
BrainGate_Technology_PPT.pptx
BrainGate_Technology_PPT.pptxBrainGate_Technology_PPT.pptx
BrainGate_Technology_PPT.pptx
 
Brain Computer Interface
Brain Computer Interface Brain Computer Interface
Brain Computer Interface
 

Final Project Report

  • 1. Brain Controlled ‘SPM’ UNIVERSITY OF PUNE A PROJECT REPORT ON Brain Controlled Special Purpose Machine (SPM) BY ADITYA SANGAWAR –B80383002 AVINASH PAWAR –B80383028 PRATIK WALAWALKAR –B80383095 Under the Guidance of Prof. Dr. V. M. Wadhai Sponsored by ThyssenKrupp India Pvt. Ltd DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING MIT COLLEGE OF ENGINEERING KOTHRUD, PUNE – 411 038 2013 - 2014 1
  • 2. Brain Controlled ‘SPM’ CERTIFICATE This is to certify that the project titled Brain Controlled Special Purpose Machine (SPM) BY ADITYA SANGAWAR –B80383002 AVINASH PAWAR –B80383028 PRATIK WALAWALKAR –B80383095 is a bonafide work carried out by them, under my guidance, in partial fulfillment of the requirement for the award of Degree of Bachelor of Engineering in Electronics & Telecommunication of University of Pune. Dr. V. M. WADHAI Prof. Dr. M. T. KOLTE Project Guide Head of Department Principal E&TC DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING MIT COLLEGE OF ENGINEERING KOTHRUD, PUNE – 411 038 2013- 2014 is approved for the degree of BACHELOR OF ENGINEERING – E&TC of University of Pune. Date: Place: Pune 2
  • 3. Brain Controlled ‘SPM’ ACKNOWLEDGEMENT Success is the manifestation of diligence, perseverance, inspiration, motivation and innovation. Every new work begins with a systematic approach reaching successful completion. The project is very complicated and involves a lot of careful decision making. But the availability of proper guidance and inspiration from our teachers made the path easier for us. We ascribe our successful journey so far in this venture to our internal guide and mentor, Dr. V. M. Wadhai, whose endeavor for perfection, undeniable zeal and enthusiasm, foresight, innovation and dynamism have contributed the reflection of her thought, idea, concepts and above all, her modest effort. We are indebted to him to take out time and mentor us. As the Head of Department also, we are thankful to her, to open a lot of avenues for us. We are also deeply indebted to our principal, Prof. Dr. V. M. WADHAI and our project coordinator, Prof. R. D. KOMATI and all the teaching and non-teaching staff for the facility provided and moral support without which our project would not have gotten off to a start. At the end, we would like to thank our friends for their timely co-operation and help. Thank you for all those who have directly or indirectly contributed towards making our thoughts into a more real, tangible form. 3
  • 4. Brain Controlled ‘SPM’ INDEX CHAP.NO DESCRIPTION PAGE NO LIST OF FIGURES 5 ABSTRACT 6 1 INTRODUCTION 7 1.1 WHAT IS BRAIN COMPUTER- INTERFACE? 8 1.2 HOW DOES THE BRAIN WORK? 10 1.3 HOW CAN WE MAKE IT POSSIBLE? 11 2 LITERATURE SURVEY 12 2.1 INVASIVE BCI 13 2.2 PARTIALLY INVASIVE BCI 14 2.3 NON INVASIVE BCI 15 3 ELECTROENCEPHALOGRAPHY THEORY 17 3.1 INTRODUCTION 18 3.2 EVENT RELATED POTENTIALS 18 3.3 STEADY STATE VISUAL EVOKED RESPONSES 19 3.4 SLOW CORTICAL POTENTIAL SHIFTS 19 3.5 OSCILLATORY SENSORIMETER ACTIVITY 19 3.6 SPONTANEOUS EEG SIGNALS 19 4 EEG SIGNAL ANALYSIS 20 4.1 P300 DETECTION 21 4.2 mu RHYTHM CONDITIONING 21 4.3 ALPHA RHYTHM MODULATION 22 5 BLOCK DIAGRAM 23 5.1 FUNCTIONAL BLOCK DIAGRAM 24 5.1.1 BLOCK DIAGRAM DESCRIPTION 25 6 SYSTEM DESIGN 29 6.1 SIGNAL ACQUISITION 30 6.2 6.3 6.4 SIGNAL PROCESSING SIGNAL TRANSMISSION AND RECEPTION DISPLAY 31 32 35 7 7.1 7.2 7.3 PROGRAM TRANSMITTER RECIEVER MATLAB 39 40 44 49 8 9 10 11 11.1 11.2 12 PERFORMANCE EVALUATION OF THE SYSTEM FEATURES COMPLEXETIES INVOLVED APLLICATIONS AND FUTURE SCOPE APPLICATIONS FUTURE SCOPE CONCLUSION REFERENCES 51 54 56 58 59 60 61 63 4
  • 5. Brain Controlled ‘SPM’ LIST OF FIGURES ABSTRACT 5 Figure No. Description Page No. 1 NEURON CONNECTION 10 2 10/20 SYSTEM 11 3 RECORDINGS OF BRAINWAVES PRODUCED BY AN ELECTROENCEPHALOGRAM 15 4 EEG WAVE FREQUENCY RANGES 18 5 FUNCTIONAL BLOCK DIAGRAM 24 6 SOURCE IS NEURON FIRING 25 7 BANDPASS FILTER 26 8 ATMEGA32 27 9 TWS 434 & RWS 434 27 10 16*2 LCD 28 11 DC MOTOR 28 12 SIGNAL ACQUISITION LAYOUT 31 13 ATMEGA32 SCHEMATIC 32 14 TRANSMITTER SCHEMATIC 33 15 TRANSMITTER LAYOUT 33 16 RECIEVER SCHEMATIC 34 17 RECIEVER LAYOUT 34 18 DISPLAY SCHEMATIC 36 19 DISPLAY LAYOUT 37 20 SPM SCHEMATIC 38 21 SPM LAYOUT 38 22 RELAXED STATE 52 23 CONCENTRATED STATE 53 24 PWM WAVE 53
  • 6. Brain Controlled ‘SPM’ A brain computer interface is a direct technology interface between a brain and computer. The brain’s electrical output is translated by a computer into physical output. These physical outputs can be used to operate any real time objects like light, fan and even large CNC machines using just the concentration of brain. The machines in industries can be controlled from any position without being actually physically present near the machine. The aim of the project is to operate all real time machines without using the present techniques but by using the brain’s electrical signals. Message and commands are not by muscle contractions but rather by electrophysiological signals from the brain. These generated signals will be analyzed, processed and sent via wireless communication to the load which is needed to turn ON and OFF. 6
  • 7. Brain Controlled ‘SPM’ CHAPTER 1: INTRODUCTION 1.1. What is a Brain-Computer Interface (BCI)? Since the creation of computer rendered environments, the computers power has been increasing to an amazing speed. Each year, the possibilities offered by a computer are growing extraordinarily. However, the communications with a machine have unfortunately 7
  • 8. Brain Controlled ‘SPM’ not significantly evolved. We still have to content ourselves of an old keyboard, a mouse and a screen display. It is undeniable that it would be a wonderful evolution to improve our interactions with the machines. Following this idea, eminent computer professionals were concerned about developing a new way of communication using the brain. Based on measures of the electrical activity of the brain, the goal was to discover the user's thoughts in order to execute his orders. To accomplish this prowess, the natural properties of the brain were used: to identify a particular mental activity of the subject, we observe the variation of his mental activities in frequency and in time using an appropriate material. A mathematical algorithm will next analyse the collected data and guess about the subject thoughts. This technology offers creating a completely new way of communication offering lots of possibilities. For example, for persons with movements' disabilities, a BCI could help them to command their electric wheelchair without needing somebody else help, giving them more independence. As another example, we can image substitute some damaged nerves by computers intercepting the brain messages and redirecting them to the muscle. For people having to deal with epilepsy crisis, it would be interesting to improve their knowledge of the different processes that stimulate a crisis and try to avoid them, controlling their own brain as another muscle. The idea of using our brains to directly control a machine isn't particularly new. As far back as 1967, Edmond Dewan described experiments using subjects wired to an electroencephalograph (EEG), which records and graphs the electrical activity of the brain. With practice, the subjects were able to reduce the amplitude of their brain's alpha rhythms, to transmit Morse code to a teleprinter. Research into the Brain Computer Interface, or BCI, began in earnest in the early 70's, when the United States Department of Defence saw the promise of fighter pilots using their minds to directly control their planes. Given the technology of the time, there was limited success, and the program was cancelled. But the groundwork was laid for a field of research now growing rapidly. A major motivation has been to help patients suffering from conditions such as cerebral palsy, or spinal injuries, which inhibit physical control, but which leave intellectual faculties intact. Over the last decade, great advances have been made. Automatic systems capable of understanding different facets of human communication will be at the heart of human-computer interfaces (HCI) in the near future. An HCI which is built on the guiding principle: "think and make it happen without any physical effort" is called a 8
  • 9. Brain Controlled ‘SPM’ brain-computer interface (BCI). Indeed, the "think" part of this principle involves the human brain, "make it happen" implies that an executor is needed (here: a computer) and "without any physical effort" means that a direct interface between the brain and the computer is required. To make the computer understand what the brain intends to communicate necessitates monitoring the brain activity. Among the possible brain monitoring methods, the scalp recorded electroencephalogram (EEG) constitutes an adequate alternative because of its good time resolution, relative simplicity and non-invasiveness when compared to other methods such as: functional magnetic resonance imaging, positron emission tomography, magneto encephalography and electrocardiogram. Furthermore, there is clear evidence that observable changes in EEG result from performing given mental activities. The sheer complexity of the brain's measurable activity produces EEG traces which present a formidable problem of interpretation. However, by focusing on very specific areas of brain activity, such as motor function, it is possible to analyse EEG data using filters, Fourier Transforms, and SVM to extract some useful signal from the noise. Electrophysiological signals reflecting brain activity are acquired from electrodes on the scalp or within the head and processed to produce measurements of specific signal features, such as amplitudes of evoked potentials or EEG rhythms or firing rates of single neurons that reflect the user’s intentions. These features are translated into commands that operate a device, such as a word processor. Successful operation depends on the interaction of two adaptive controllers, the user and the system. The user must develop and maintain good correlation between his or her intentions and the signal features selected by the BCI; and the BCI must select features that the user can control and must translate those features into device commands correctly and efficiently. Brain-computer interface (BCI) technology is a potentially powerful new communication and control option for those with severe motor disabilities. The pace and volume of BCI research have grown very rapidly over the past decade. The success of this exciting work depends on close and productive interaction of scientists, engineers, and clinicians from many different disciplines and requires recognition and attention to a number of crucial issues. This meeting is designed to foster such interdisciplinary interactions and address these crucial issues, and thereby promote the development of BCI systems of practical value to people with disabilities. 9
  • 10. Brain Controlled ‘SPM’ 1.2 How does the brain work? Our brain is mostly composed of neurons interconnected to each other’s forming an enormous network (Figure 1). They communicate together through their axons using small electric impulses (uV). Figure 1: Neuron connection During a particular mental activity (MA), we can observe electric potential variations of the brain active regions. Neurons are generating small electrical variation that summed over a region give a potential variation in the space. These variations can be decomposed in series of electrical maps. This means that a mental activity can be seen as a sequential continuation of brain electrical states. Based on recordings of the brain electrical activity, we would like to reflect as well as possible the dynamic of the functional states of the brain and identify the states representing a mental task as well has possible in order to be able to recognize later on the same mental activity. 1.3 How can we make it possible? In order to measure the electrical activity of the brain in a non-invasive way, nowadays, the best choice is to employ electroencephalogram (EEG) material. EEG measurements have 10
  • 11. Brain Controlled ‘SPM’ proved their utility in the medical world and are not expensive. The 10/20 international system is used for positioning the electrodes on the scalp. This norm defines 16 electrodes positions best positioned in order to represent as well as possible the electrical activity of the Brain (Figure 2). Figure 2 : 10/20 system placement Our intention is acquiring EEG signal from the frontal lobe and sensorimotor cortex of the brain and using it to obtain our desired result. 11
  • 12. Brain Controlled ‘SPM’ CHAPTER 2 : LITERATURE SURVEY Before moving to real implications of BCI and its application let us first discuss the three types of BCI. These types are decided on the basis of the technique used for the interface. Each of these techniques has some advantages as well as some disadvantages. 12
  • 13. Brain Controlled ‘SPM’ The three types of BCI are as follows with their features: 2.1. Invasive BCI. Invasive BCI are directly implanted into the grey matter of the brain during neurosurgery. They produce the highest quality signals of BCI devices. Invasive BCIs has targeted repairing damaged sight and providing new functionality to paralyzed people. But these BCIs are prone to building up of scar-tissue which causes the signal to become weaker and even lost as body reacts to a foreign object in the brain. In vision science, direct brain implants have been used to treat non-congenital i.e. acquired blindness. One of the first scientists to come up with a working brain interface to restore sight as private researcher, William Dobelle. Dobelle’s first prototype was implanted into Jerry, a man blinded in adulthood, in 1978. A single-array BCI containing 68 electrodes was implanted onto Jerry’s visual cortex and succeeded in producing phosphine, the sensation of seeing light. The system included TV cameras mounted on glasses to send signals to the implant. Initially the implant allowed Jerry to see shades of grey in a limited field of vision and at a low frame-rate also requiring him to be hooked up to a two-ton mainframe. Shrinking electronics and faster computers made his artificial eye more portable and allowed him to perform simple tasks unassisted. In 2002, Jens Neumann, also blinded in adulthood, became the first in a series of 16 paying patients to receive Dobelle’s second generation implant, marking one of the earliest commercial uses of BCIs. The second generation device used a more sophisticated implant enabling better mapping of phosphenes into coherent vision. Phosphenes are spread out across the visual field in what researchers call the starry-night effect. Immediately after his implant, Jens was able to use imperfectly restored vision to drive slowly around the parking area of the research institute. BCIs focusing on motor Neuroprosthetics aim to either restore movement in paralyzed individuals or provide devices to assist them, such as interfaces with computers or robot arms. Researchers at Emory University in Atlanta led by Philip Kennedy and Roy Bakay were first to install a brain implant in a human that produced signals of high enough quality to stimulate movement. Their patient, Johnny Ray, suffered from ‘locked-in syndrome’ after 13
  • 14. Brain Controlled ‘SPM’ suffering a brain-stem stroke. Ray’s implant was installed in 1998 and he lived long enough to start working with the implant, eventually learning to control a computer cursor. Tetraplegic Matt Nagle became the first person to control an artificial hand using a BCI in 2005 as part of the nine-month human trail of cyber kinetics Neurotechnology’s Brain gate chip-implant. Implanted in Nagle’s right precentral gyrus (area of the motor cortex for arm movement), the 96 electrode Brain gate implant allowed Nagle to control a robotic arm by thinking about moving his hand as well as a computer cursor, lights and TV. 2.2. Partially Invasive BCI. Partially invasive BCI devices are implanted inside the skull but rest outside the brain rather than amidst the grey matter. They produce better resolution signals than non-invasive BCIs where the bone tissue of the cranium deflects and deforms signals and have a lower risk of forming scar-tissue in the brain than fully-invasive BCIs. Electrocardiography (ECoG) uses the same technology as non-invasive electroencephalography, but the electrodes are embedded in a thin plastic pad that is placed above the cortex, beneath the Dura mater. ECoG technologies were first traled in humans in 2004 by Eric Leuthardt and Daniel Moran from Washington University in St Louis. In a later trial, the researchers enabled a teenage boy to play Space Invaders using his ECoG implant. This research indicates that it is difficult to produce kinematics BCI devices with more than one dimension of control using ECoG. Light Reactive Imaging BCI devices are still in the realm of theory. These would involve implanting laser inside the skull. The laser would be trained on a single neuron and the neuron’s reflectance measured by a separate sensor. When neuron fires, The laser light pattern and wavelengths it reflects would change slightly. This would allow researchers to monitor single neurons but require less contact with tissue and reduce the risk of scar-tissue build up. 2.3. Non-Invasive BCI. 14
  • 15. Brain Controlled ‘SPM’ As well as invasive experiments, there have also been experiments in humans using non- invasive neuro imaging technologies as interfaces. Signals recorded in this way have been used to power muscle implants and restore partial movement in an experimental volunteer. Although they are easy to wear, non-invasive implants produce poor signal resolution because the skull dampens signals, dispersing and blurring the electromagnetic waves created by the neurons. Although the waves can still be detected it is more difficult to determine the area of the brain that created them or the actions of individual neurons. Figure 3 : Recordings of brainwaves produced by an electroencephalogram Electroencephalography (EEG) is the most studied potential non-invasive interface, mainly due to its fine temporal resolutions, ease of use, portability and low set-up cost. But as well as the technology's susceptibility to noise, another substantial barrier to using EEG as a brain-computer interface is the extensive training required before users can work the technology. For example, in experiments beginning in the mid-1990s, Niels Birbaumer of the University of Tübingen in Germany used EEG recordings of slow cortical potential to give paralysed patients limited control over a computer cursor.(Birbaumer had earlier trained epileptics to prevent impending fits by controlling this low voltage wave.) The experiment saw ten patients trained to move a computer cursor by controlling their brainwaves. The process was slow, requiring more than an hour for patients to write 100 characters with the cursor, while training often took many months. Another research parameter is the type of waves measured. Birbaumer's later research with Jonathan Wolpaw at New York State University has focused on developing technology that would allow users to choose the brain signals they found easiest to operate a BCI, including mu and beta waves. 15
  • 16. Brain Controlled ‘SPM’ A further parameter is the method of feedback used and this is shown in studies of P300 signals. Patterns of P300 waves are generated involuntarily (stimulus-feedback) when people see something they recognizes and may allow BCIs to decode categories of thoughts without training patients first. By contrast, the biofeedback methods described above require learning to control brainwaves so the resulting brain activity can be detected. In 2000, for example, research by Jessica Bayliss at the University of Rochester showed that volunteers wearing virtual reality helmets could control elements in a virtual world using their P300 EEG readings, including turning lights on and off and bringing a mock-up car to a stop. In 1999, researchers at Case Western Reserve University led by Hunter Peckham, used 64-electrode EEG skullcap to return limited hand movements to quadriplegic Jim Jatich. As Jatich concentrated on simple but opposite concepts like up and down, his beta- rhythm EEG output was analysed using software to identify patterns in the noise. A basic pattern was identified and used to control a switch: Above average activity was set to on, below average off. As well as enabling Jatich to control a computer cursor the signals were also used to drive the nerve controllers embedded in his hands, restoring some movement. Electronic neural-networks have been deployed which shift the learning phase from the user to the computer. Experiments by scientists at the Fraunhofer Society in 2004 using neural networks led to noticeable improvements within 30 minutes of training. Experiments by Eduardo Miranda aim to use EEG recordings of mental activity associated with music to allow the disabled to express themselves musically through an encephalophone. 16
  • 17. Brain Controlled ‘SPM’ CHAPTER 3 : ELECTRO-ENCEPHALO-GRAPHY THEORY 3.1.INTRODUCTION 17
  • 18. Brain Controlled ‘SPM’ The EEG signal has several components separated by frequency. Delta waves are characteristic of deep sleep and are high amplitude waves in the frequency range 0 - 4 Hz. Theta waves occur within the 4-8 Hz frequency band during meditation, idling, or drowsiness. Alpha waves have frequency range 8-14 Hz and take place while relaxing or reflecting. Another way to boost alpha waves is to close the eyes. Beta waves reside in the 13-30 Hz frequency band and are characteristic of the user being alert or active. They become present while the user is concentrating. Gamma waves in the 30-100 Hz range occur during sensory processing of sound and sight. Lastly, mu waves occur in the 8-13 Hz frequency range while motor neurons are at rest. FIGURE 4 : EEG WAVE FREQUENCY RANGES Current BCls use the following EEG signals: 3.2.Event Related Potentials (ERPs) ERPs are transient signals which are characterized by a voltage deviation in the EEG and are caused by external stimuli or cognitive processes triggered by external events. When the user pays attention to a particular stimulus, presented by the BCI an ERP that is time locked with that stimulus appears in her EEG. The changes induced by the ERP in the EEG can be 18
  • 19. Brain Controlled ‘SPM’ detected by the BCI. Therefore, by focusing her attention to the adequate stimuli, the user can command the BCI. The advantage of an ERP based BCI resides in the fact that little training is necessary for a new user to gain control of the BCI. Nonetheless, the communication is slow since the user must wait for the relevant stimulus presentation. 3.3. Steady State Visual Evoked Responses (SSVERs) SSVERs are elicited by a visual stimulus that is modulated at a fixed frequency. SSVERs are characterized by an increase in the EEG activity at the stimulus frequency. Through feedback, users learn to voluntarily control their SSVER amplitude, whose variations can be detected by the BCI. 3.4.Slow Cortical Potential Shifts (SCPSs) SCPSs are shifts of cortical voltage, lasting from a few hundred milliseconds up to several seconds. Users can learn to produce slow cortical amplitude shifts in an electrically positive or negative direction for binary control. This skill can be acquired if the users are provided with a feedback on the course of their SCPS production and if they are positively reinforced for correct responses. 3.5.Oscillatory sensorimotor activity The 8-12 Hz and 18-26Hz activities recorded over the motor cortex exhibit noticeable changes during movement, preparation for movement and imagined movement. Indeed, such activities decrease in the hemisphere that is opposite (contralateral) to the movement and increase in the other hemisphere (ipsilateral). The frequency ranges and the magnitude of the changes are user dependent; if trained, a BCI can detect these changes and react according to a previously established protocol. 3.6. Spontaneous EEG signals These signals are recorded during the performance of mental activities other than imagined motor tasks and are not elicited by external stimuli (e.g. mental counting, mental rotation of an object, etc.). The BCI can function with spontaneous signals if the patterns characterizing the corresponding mental activities are learned by the BCI in a training phase. 19
  • 20. Brain Controlled ‘SPM’ - CHAPTER 4 : EEG SIGNAL ANALYSIS 20
  • 21. Brain Controlled ‘SPM’ In today’s time various techniques are used for BCI interface, there implementation , analysis and result manipulation. 4.1. P300 Detection It is a technique for detecting the P300 component of a subject's event-related brain potential (ERP) and using it to select from an array of 36 screen positions. The P300 component is a positive-going ERP in the EEG with a latency of about 300ms following the onset of a rarely- occurring stimulus the subject has been instructed to detect. The EEG was recorded using electrodes placed at the Pz (parietal) site (10/20 International System), limited with band-pass filters to 0.02-35Hz and digitized at 50Hz. The "odd-ball" paradigm was used to elicit the P300, where a number of stimuli are presented to the experimental subject who is required to pay attention to a particular, rarely-occurring stimulus and respond to it in some non- motor way, such as by counting occurrences. Detecting the P300 response reliably requires averaging the EEG response over many presentations of the stimuli. 4.2. mu- rhythm conditioning mu- rhythm is a detectable pattern in a great majority of individuals in the EEG 8-12Hz frequency range, centered about 9.1Hz. Wolpaw describes detecting subjects' mu-rhythm amplitude, defined as the square-root of the spectral EEG power at 9Hz, using two scalp- mounted electrodes located near location C3 in the International 10/20 System and a digital signal processing board analyzing continuous EEG in 333ms segments, and using it to drive a cursor up or down on a screen toward a target placed randomly at the top or bottom. An experiment operator preset the size of the ranges and number of cursor movement steps assigned to each range for each subject during testing prior to each experimental run. Ranges were set so that the commonest mu-rhythm amplitudes (<4 microvolt’s) left the cursor in place or moved it downwards moderately while higher amplitudes (>4 microvolt’s) moved it upwards in increasing jumps. Weights were adjusted as subjects exhibited better control of their mu-rhythm amplitudes for up and down targets in repeated trials. Wolpaw substantiates subjects' learned intentional control over mu-rhythm amplitude in three ways: by performing frequency analysis up to 192Hz on subjects during cursor movement trials and failing to find any relationship between mu- rhythm changes and the higher frequencies 21
  • 22. Brain Controlled ‘SPM’ associated with muscular (EMG) activity; by subjects statements about not making contra lateral movements and observing none; and by failing to find any relationship between mu- rhythm changes and posterior scalp recordings of the visual alpha-rhythm. Four out of five subjects acquired impressive control over their mu-rhythm amplitude during 12 45-minute sessions over a period of two months. Accuracies of 80-95% target hits across experimental subjects were achieved and rates of 10-29 hits per minute. Off-line analysis of two subjects' raw EEG data provided good support for Wolpaw's experimental results. 4.3 Alpha rhythm modulation Alpha waves are neural oscillations in the frequency range of 8–12 Hz arising from synchronous and coherent (in phase or constructive) electrical activity of thalamic pacemaker cells in humans. They are also called Berger's wave in memory of the founder of EEG. Alpha rhythm is often considered to correspond to an ‘idling’ state of mental activity, and equipment is sold for self-treatment by some health stores, supposed to enable the user to develop a conscious self-induction of alpha rhythm. Results show that short-lasting changes in brain's excitability state are reflected the relative alpha power of the EEG, which may explain significant variability in perceptual processes and ERP generation especially at boundary conditions such as sensory threshold. 22
  • 23. Brain Controlled ‘SPM’ CHAPTER 5 : BLOCK DIAGRAM 23
  • 24. Brain Controlled ‘SPM’ 5.1. FUNCTIONAL BLOCK DIAGRAM FIGURE 5.1 : FUNCTIONAL BLOCK DIAGRAM 24
  • 25. Brain Controlled ‘SPM’ 5.1.1 BLOCK DIAGRAM DESCRIPTION  BRAIN & EEG ELECTRODES Brain imaging experiments using functional magnetic resonance imaging (fMRI) have shown that the human inferior frontal cortex and superior parietal lobe are active when the person performs an action and also when the person sees another individual performing an action. It has been suggested that these brain regions contain mirror neurons, and they have been defined as the human mirror neuron system. The single sensor on FP1 (10-20 Electrode System) provides a high degree of freedom. The necomimi headband is used for providing the required brainwaves. Figure 5.5.1 : SOURCE IS NEURON FIRING  INSTRUMENTATION AMPLIFIERS & FILTERS The amplitude of signal obtained from our brain is very small. Hence a series of amplifiers in multiple stages is applied in order to amplify the signal. 25
  • 26. Brain Controlled ‘SPM’ Bandpass Filter (BPF) allows our desired frequency signals to pass through it. Thus only frequency of 10-15Hz is passed and rest are eliminated. All electrical devices, including computers, light bulbs, wall sockets, etc., leak some level of ambient “noise”. This noise is often loud enough to obfuscate brainwaves. As a result, EEG devices may pick up random readings when both the reference electrode and the primary electrode are connected to an object that is not emitting brainwaves. Signal amplification makes the raw brainwave signal stronger. Filtering protocols eliminate known noise frequencies such as muscle, pulse and electrical devices. Notch filters eliminate electrical noise of 50Hz. Extrapolating EEG brainwave signals from noise requires both a reference point and electrical circuit grounding. The grounding makes the body voltage the same as the headset. The reference is used to subtract the common ambient noise through a process known as common mode rejection. The earlobe is a location that experiences the same ambient noise as the forehead sensor but with minimal neural activity. Hence, it is crucial that the ear connection be securely fit. Figure 5.1.2 : BANDPASS FILTER  MICROCONTROLLER – Atmega32 Atmega32 is a High-performance, Low-power Atmel AVR 8-bit Microcontroller with 32-Kbtyes in system programmable flash memory. It has advanced RISC architecture and employs two 8-bit timers and one 16-bit timer. It has a 8 channel 10 bit ADC and a UART support. It also supports SPI serial interface. It has 32 I/O programmable lines and an operating range of 4.5V to 5.5V. It has many special microcontroller features too. 26
  • 27. Brain Controlled ‘SPM’ Figure5.1.3 : ATMEGA32  WIRELESS MODULE The transmitter and receiver used is TWS 434 and RWS 434 respectively. These are locally purchased and hence are very cost effective. The operating frequency range of this module is 300 to 433 Mhz. It has a capacity of transmitting up to a 4 bit word. It has an added advantage that it provides both linear and digital output.In addition it uses a encoder and a decoder which is HT12E and HT12D. Figure 5.1.4 : TWS 434 & RWS 434 27
  • 28. Brain Controlled ‘SPM’  DISPLAY The brainwaves can be displayed by the help of MATlab software on a PC. Also the state of the user can be displayed on a LCD indicating whether a subject is in the concentrated and the relaxed state along with their voltage levels. Figure 5.1.5 : 16*2 LCD  SPM / LOAD A 12V DC Motor is used which is driven by motor driver : L298. It is a high voltage, high current dual full-bridge driver which can drive two motors simultaneously. Operating Supply. Voltage up to 46 V. Total DC Current up to 4 A Figure 5.1.6 : DC MOTOR 28
  • 29. Brain Controlled ‘SPM’ CHAPTER 6 : SYSTEM DESIGN 29
  • 30. Brain Controlled ‘SPM’ System design of the project consists of mainly five parts viz. signal acquisition, signal processing, signal transmission & reception, display and SPM. 6.1 SIGNAL ACQUISITION EEG signal acquisition is a very costly and complicated venture. Thus, to simplify the process a ‘Necomimi’ headband is used for the EEG acquisition. This headband is a product which is exclusively developed by Neurosky. The bases for the signal acquisition that takes place in the headband is the ThinkGear AM board. This board is responsible for the obtaining, amplification and the filtering of the EEG signal. The headband cannot be directly used for signal acquisition and must be first dismantled. Dismantling the ears revealed a Emax ES08E analog servo motor which is used to wiggle the ears. The signal is extracted through the connections provided to the circuit board for the left and right ears. This provides us with a voltage signal which is clearly measurable. When tested on various subjects the voltage appears to be 150mv for relaxed state of mind whereas it is 350mv for a concentrated state of mind. The headband can indicate four different stages of the mind but the project concentrates on just two. These readings are almost consistent irrespective of age or gender. Furthermore a module is required for converting the PWM waves obtained from the headband to convert to analog signal. This module basically consists of a optocoupler for isolating the signal ground and the module ground. It also consists of an peak detector, an RF LPF, and an audio amplifier. 30
  • 31. Brain Controlled ‘SPM’ 6.1.1 MODULE SCHEMATIC AND LAYOUT Figure 6.1.1 : SIGNAL ACQUISTION SCHEMATIC 6.2 SIGNAL PROCESSING The signal so extracted from the headband is then processed with the help of a microcontroller .For this project the microcontroller used is AtMega32. This is a microcontroller which is developed by Atmel and has a 10 bit built in ADC. The resolution of the ADC is calculated for the EEG signal. This resolution is then used to find the minimum values of the two voltages obtained for concentrated and relaxed state. This then is further given to an lcd display to display the current state of the subjects mind. Secondly, two thresholds are set for the two states of mind obtained, that is, for a relaxed state the threshold is 140mv whereas for the concentrated state the threshold is 300mv. Once the signal crosses the predefined threshold then it is encoded with binary bits with the help of HT-12E encoder which is used for encoding purposes. This word is then sent to the transmission section. 31
  • 32. Brain Controlled ‘SPM’ 6.2.1 MODULE SCEMATIC Figure 6.2.1 : ATMEGA32 SCHEMATIC 6.3 SIGNAL TRANSMISSION & RECEPTION The binary word which is forwarded by the HT-12E is then given to the transmitter. For the transmitter TWS 434 is used. It has a operating frequency range of 300 to 433 Mhz, can transmit a 4 - bit data and is cost effective. The binary word is transmitted with the help of the transmitter and is received by the receiver RWS 434. It has an added advantage that it provides both linear and digital output. The output obtained from the receiver is then passed on to the HT-12D decoder. A microcontroller attached to the decoder switches on the test machine when the received binary word is identical to the one stored in its memory. Thus, a machine can be switched on or off depending on the subject’s state of mind. 32
  • 33. Brain Controlled ‘SPM’ 6.3.1 MODULE SCHEMATIC AND LAYOUT Figure 6.3.1 : TRANSMITTER SCHEMATIC 33
  • 34. Brain Controlled ‘SPM’ Figure 6.3.2 : TRANSMITTER LAYOUT Figure 6.3.3 : RECIEVER SCHEMATIC Figure 6.3.4 : RECIEVER LAYOUT 34
  • 35. Brain Controlled ‘SPM’ 6.4 DISPLAY The signals which are obtained from the necomimi headband can also be displayed with the help of an lcd and on a PC with the help of MatLAB software. Firstly, for the displaying the signals on the lcd display the resolution of the ADC of the microcontroller is calculated. The resolution is used to calculate the minimum voltages for the two states of mind that is the relaxed and the concentrated state. This is used to display the state of mind and the voltage of the signal obtained for the given subject on an lcd. Secondly, the signal can also be displayed on a PC. Interfacing the signal is to a PC is a cumbersome task but the process was expedited with the use of a simple audio jack which is found in earphones. An audio jack has three wire leads out of which only two are required. One of the wire leads is used to connect to the EEG signal which is acquired through the necomimi headband and the other wire lead is used as ground. The headphone port of the PC is connected to the audio jack. The signal is displayed with the help of MatLAB software. It has a function ‘display audio’ which can be used to display the EEG signal. Display audio command works for the frequency range of 3 Hz to 3 Khz range, which is the audio frequency range for human beings. Now, the EEG signals, all lie in the above mentioned range and thus it is valid to use the command. The signal so obtained is not real time but serves the primary purpose of displaying the signal. 35
  • 36. Brain Controlled ‘SPM’ 6.4.1 MODULE SCHEMATIC AND LAYOUT Figure 6.4.1 : DISPLAY SCHEMATIC 36
  • 37. Brain Controlled ‘SPM’ Figure 6.4.1 : DISPLAY LAYOUT 6.5 SPM/LOAD The SPM is the special purpose machine or the load in the project. The SPM is the load that is being run by the brain waves which are generated by the brain. The SPM that is used for the project is the motor. 37
  • 38. Brain Controlled ‘SPM’ 6.5.1 MODULE SCHEMATIC AND LAYOUT Figure 6.5.1 : SPM SCHEMATIC Figure 6.5.2 : SPM LAYOUT 38
  • 40. Brain Controlled ‘SPM’ The Program code is basically divided into three basic stages – the Transmitter, the Receiver and the Matlab Display. 7.1 TRANSMITTER Chip type : ATmega32A Program type : Application AVR Core Clock frequency: 2.000000 MHz Memory model : Small External RAM size : 0 Data Stack size : 512 *****************************************************/ #include <mega32a.h> #include <delay.h> #define ADC_VREF_TYPE 0x00 // Read the AD conversion result unsigned int read_adc(unsigned char adc_input) { ADMUX=adc_input | (ADC_VREF_TYPE & 0xff); // Delay needed for the stabilization of the ADC input voltage delay_us(10); // Start the AD conversion ADCSRA|=0x40; // Wait for the AD conversion to complete while ((ADCSRA & 0x10)==0); ADCSRA|=0x10; return ADCW; } int adc=0; // Declare your global variables here void main(void) { // Declare your local variables here // Input/Output Ports initialization // Port A initialization 40
  • 41. Brain Controlled ‘SPM’ // Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In // State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T PORTA=0x00; DDRA=0x00; // Port B initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTB=0x00; DDRB=0xFF; // Port C initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTC=0x00; DDRC=0xFF; // Port D initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTD=0x00; DDRD=0xFF; // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: Timer 0 Stopped // Mode: Normal top=0xFF // OC0 output: Disconnected TCCR0=0x00; TCNT0=0x00; OCR0=0x00; // Timer/Counter 1 initialization // Clock source: System Clock // Clock value: Timer1 Stopped // Mode: Normal top=0xFFFF // OC1A output: Discon. // OC1B output: Discon. // Noise Canceler: Off // Input Capture on Falling Edge 41
  • 42. Brain Controlled ‘SPM’ // Timer1 Overflow Interrupt: Off // Input Capture Interrupt: Off // Compare A Match Interrupt: Off // Compare B Match Interrupt: Off TCCR1A=0x00; TCCR1B=0x00; TCNT1H=0x00; TCNT1L=0x00; ICR1H=0x00; ICR1L=0x00; OCR1AH=0x00; OCR1AL=0x00; OCR1BH=0x00; OCR1BL=0x00; // Timer/Counter 2 initialization // Clock source: System Clock // Clock value: Timer2 Stopped // Mode: Normal top=0xFF // OC2 output: Disconnected ASSR=0x00; TCCR2=0x00; TCNT2=0x00; OCR2=0x00; // External Interrupt(s) initialization // INT0: Off // INT1: Off // INT2: Off MCUCR=0x00; MCUCSR=0x00; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x00; // USART initialization // USART disabled UCSRB=0x00; // Analog Comparator initialization // Analog Comparator: Off // Analog Comparator Input Capture by Timer/Counter 1: Off ACSR=0x80; 42
  • 43. Brain Controlled ‘SPM’ SFIOR=0x00; // ADC initialization // ADC Clock frequency: 125.000 kHz // ADC Voltage Reference: AREF pin ADMUX=ADC_VREF_TYPE & 0xff; ADCSRA=0x84; // SPI initialization // SPI disabled SPCR=0x00; // TWI initialization // TWI disabled TWCR=0x00; while (1) { adc=read_adc(1); if(adc<40) // Below 200 mV { PORTC=0x06; } else if(adc>60) // Above 300 mV { PORTC=0x0F; } else { PORTC=0x03; // Between 200 - 300 mV } } } 43
  • 44. Brain Controlled ‘SPM’ 7.2 Receiver Chip type : ATmega32A Program type : Application AVR Core Clock frequency: 2.000000 MHz Memory model : Small External RAM size : 0 Data Stack size : 512 *****************************************************/ #include <mega32a.h> // Alphanumeric LCD functions #include <alcd.h> #include <iobits.h> #include <delay.h> // Declare your global variables here void main(void) { // Declare your local variables here // Input/Output Ports initialization // Port A initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTA=0x00; DDRA=0xFF; 44
  • 45. Brain Controlled ‘SPM’ // Port B initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTB=0x00; DDRB=0xFF; // Port C initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTC=0x00; DDRC=0xFF; // Port D initialization // Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out // State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0 PORTD=0x00; DDRD=0xFF; // Timer/Counter 0 initialization // Clock source: System Clock // Clock value: Timer 0 Stopped // Mode: Normal top=0xFF // OC0 output: Disconnected TCCR0=0x00; TCNT0=0x00; OCR0=0x00; // Timer/Counter 1 initialization // Clock source: System Clock // Clock value: Timer1 Stopped 45
  • 46. Brain Controlled ‘SPM’ // Mode: Normal top=0xFFFF // OC1A output: Discon. // OC1B output: Discon. // Noise Canceler: Off // Input Capture on Falling Edge // Timer1 Overflow Interrupt: Off // Input Capture Interrupt: Off // Compare A Match Interrupt: Off // Compare B Match Interrupt: Off TCCR1A=0x00; TCCR1B=0x00; TCNT1H=0x00; TCNT1L=0x00; ICR1H=0x00; ICR1L=0x00; OCR1AH=0x00; OCR1AL=0x00; OCR1BH=0x00; OCR1BL=0x00; // Timer/Counter 2 initialization // Clock source: System Clock // Clock value: Timer2 Stopped // Mode: Normal top=0xFF // OC2 output: Disconnected ASSR=0x00; TCCR2=0x00; TCNT2=0x00; OCR2=0x00; // External Interrupt(s) initialization // INT0: Off // INT1: Off 46
  • 47. Brain Controlled ‘SPM’ // INT2: Off MCUCR=0x00; MCUCSR=0x00; // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x00; // USART initialization // USART disabled UCSRB=0x00; // Analog Comparator initialization // Analog Comparator: Off // Analog Comparator Input Capture by Timer/Counter 1: Off ACSR=0x80; SFIOR=0x00; // ADC initialization // ADC disabled ADCSRA=0x00; // SPI initialization // SPI disabled SPCR=0x00; // TWI initialization // TWI disabled TWCR=0x00; // Alphanumeric LCD initialization // Connections are specified in the // Project|Configure|C Compiler|Libraries|Alphanumeric LCD menu: // RS - PORTA Bit 0 47
  • 48. Brain Controlled ‘SPM’ // RD - PORTA Bit 1 // EN - PORTA Bit 2 // D4 - PORTA Bit 4 // D5 - PORTA Bit 5 // D6 - PORTA Bit 6 // D7 - PORTA Bit 7 // Characters/line: 16 lcd_init(16); while (1) { if(PIND==0x06) // Below 200 mV { PORTC=0x00; lcd_clear(); lcd_gotoxy(0,0); lcd_putsf(" RELAXED..."); delay_ms(1000); } else if(PIND==0x0F) // Above 300 mV { PORTC=0xFF; lcd_clear(); lcd_gotoxy(0,0); lcd_putsf(" CONCENTRATION"); delay_ms(1000); } else if(PIND==0x03) { 48
  • 49. Brain Controlled ‘SPM’ lcd_clear(); lcd_gotoxy(0,0); lcd_putsf(" INTERMEDIATE"); // In between 200-300 mV delay_ms(1000); } } } 7.3 Matlab Fs = 44100; %# maximum sampling frequency in Hz T = 1; %# length of one interval signal in sec t = 0:1/Fs:T-1/Fs; %# time vector nfft = 2^nextpow2(Fs); %# n-point DFT numUniq = ceil((nfft+1)/2); %# half point f = (0:numUniq-1)'*Fs/nfft; %'# frequency vector (one sided) %# prepare plots figure hAx(1) = subplot(211); hLine(1) = line('XData',t, 'YData',nan(size(t)), 'Color','black', 'Parent',hAx(1)); xlabel('Time (s)'), ylabel('Amplitude') hAx(2) = subplot(212); hLine(2) = line('XData',f, 'YData',nan(size(f)), 'Color','blue', 'Parent',hAx(2)); xlabel('Frequency (Hz)'), ylabel('Magnitude (dB)') set(hAx, 'Box','on', 'XGrid','on', 'YGrid','on') %#specgram(sig, nfft, Fs); %# prepare audio recording recObj = audiorecorder(Fs,24,1); %# Record for 100 intervals of 1sec each disp('EEG Recording...') for i=1:100 49
  • 50. Brain Controlled ‘SPM’ recordblocking(recObj, T); %# get data and compute FFT sig = getaudiodata(recObj); fftMag = 20*log10( abs(fft(sig,nfft)) ); %# update plots set(hLine(1), 'YData',sig) set(hLine(2), 'YData',fftMag(1:numUniq)) title(hAx(1), num2str(i,'EEG Signal for %d seconds')) % title(hAx(2), num2str(f,'EEG Signal for %d seconds')) disp(f); drawnow %# force MATLAB to flush any queued displays end disp('Done.') 50
  • 51. Brain Controlled ‘SPM’ CHAPTER 8: PERFORMANCE EVALUATION OF THE SYSTEM 51
  • 52. Brain Controlled ‘SPM’ Amplified EEG Signal (ideal): Relaxed State – 160 mv (Alpha waves) Concentrated State – 300 mv (Beta waves) Practical EEG Values: Subject Gender Age(years) Concentration State(mv) Relaxed State(mv) Dr.Prof.V.M.Wadhai Male 50 315 165 VInayak Patil Male 22 320 159 Avinash Pawar Male 21 322 158 Pracheetee Joag Female 21 332 155 Ashwati Menon Female 20 305 161 Mrs. Walawalkar Female 46 323 172 Results 52
  • 53. Brain Controlled ‘SPM’ Figure 8.1 : RELAXED STATE Figure 8.2 : CONCENTRATED STATE 53
  • 54. Brain Controlled ‘SPM’ Figure 8.3 : PWM WAVE CHAPTER 9: FEATURES 54
  • 55. Brain Controlled ‘SPM’ The project is very helpful in the study of EEG signals as it has a display section and also it serves another purpose of controlling a device or machine. It has various features, viz.,  The system is portable - It is realized with the help of a PCB.  Installation is easier than other device - Only one electrodes are connected to the test subject, which is connected to the headband.  The system is cost effective – The main circuit board and its peripherals are made up of low cost components.  An EEG signal analysis is done with the help of the necomimi headband, simplifying the process of signal acquisition.  The project serves a dual purpose of display and control. 55
  • 56. Brain Controlled ‘SPM’ CHAPTER 10: COMPLEXITIES INVOLVED 56
  • 57. Brain Controlled ‘SPM’ Various problems were encountered while the development of the project was underway as follows:  Dismantling the necomimi headband.  Signal extraction from the headband.  Transmission of the signal.  Developing effective real time signal for collecting and analyzing the signals.  Repeated testing on various subjects to verify the results which are obtained for another test subject. 57
  • 58. Brain Controlled ‘SPM’ CHAPTER 11: APPLICATIONS & FUTURE SCOPE 58
  • 59. Brain Controlled ‘SPM’ 11.1. APPLICATIONS BCI related research is a relatively new field but is finding its way in all areas of sciences. There are various applications that can be realized with the help of BCI, such as,  The Mental Typewriter A paralyzed patient could communicate by using a mental typewriter alone – without touching the keyboard. In the case of serious accident or illness, a patient’s limbs can be paralyzed, severely restricting communication with the outside world. The interface is already showing how it can help these patients to write texts and thus communicate with their environment  BCI offers paralyzed patients improved quality of life Fundamental theories regarding consciousness, emotion and quality of life in sufferers of paralysis from Amyotrophic Lateral Sclerosis (ALS, also known as 'Lou Gehrig’s disease') 59
  • 60. Brain Controlled ‘SPM’ are being challenged based on new research on brain-computer interaction. ALS is a progressive disease that destroys neurons affecting movement. The study appears in the latest issue of Psychophysiology. The article reviews the usefulness of currently available brain-computer –interfaces (BCI), which use brain activity to communicate through external devices, such as computers.  Neuro-feedback and Cursor Control The alpha modulation and mu supression control schemes have diverse applications beyond simply playing the game Pong in brain-computer interfaces. Wheelchair and cursor control (both 1D and 2D) have been accomplished by mu rhythm suppression. In one instance, users controlled a cursor in 2D by imagining clenching either their left hand, their right hand, or moving their feet. This control scheme requires three channels measure three locations of the sensorimotor cortex near the top of the scalp: user's left side (C_3), center (C_z), and user's right side (C_4). Even though we had one channel, we could easily extend this to support 2D cursor control, along with detecting eye blinking artifacts for "clicking" the mouse. One could imagine applying this technology to allow users with special needs to control computer mouse movement. The other application is in the field of neurofeedback. Neurofeedback creates a feedback loop for users attempting to meditate or treat ADHD disorder. The user visually sees or audibly hears the power of their alpha waves and is able to manipulate their alpha intensity. This neurofeedback has applications in the military and aircraft control as well, as users can be trained to focus and are alerted if they lose concentration. The Pong game can be viewed as a neurofeedback device since the user's concentration level is visually depicted on the screen as the position of the left paddle. Thus, the Brain-Computer Interface component of this project has diverse applications that go far beyond playing a simple computer game with one's brain waves. 11.2. FUTURE SCOPE Brain Computer Interface provides a direct communication between activities taking place inside the brain and the computer. This system can be developed further to support wide range of applications besides its use in medical field. For example it can be used in the 60
  • 61. Brain Controlled ‘SPM’ military and aircraft control as the users can be trained to focus and alerted if they lose concentration. Also this technology can be developed to allow users with special needs to control computer mouse movement. The project deals with an elementary premise of switching a machine on or off. It can be further expanded to include a complete home automation. The various appliances that are used in in our everyday life can be controlled with the help of the user’s thoughts. The appliances can be given a preference number and can be controlled accordingly. The project can also be expanded to include industries where a worker can control the machines, without being in their proximity. Thus, the project can be developed in various ways according to the application that is needed. CHAPTER 12 : CONCLUSION 61
  • 62. Brain Controlled ‘SPM’ Over the past decade, productive BCI research programs have arisen. Facilitated and encouraged by new understanding of brain function, by the advent of powerful low-cost computer equipment, and by growing recognition of the needs and potentials of people with disabilities, these programs concentrate on developing new communication & control technology for those with severe neuro - muscular disorders. The immediate goal is to provide these users, who may be completely paralyzed or "locked in," with basic communication capabilities so that they can express their wishes to caregivers, operate simple word processing programs etc. With adequate recognition and effective engagement of these issues, BCI systems could provide an important new communication and control option for those with motor disabilities. They might also give to those without disabilities, a supplementary control channel useful in special circumstances. 62
  • 63. Brain Controlled ‘SPM’ The project deals with two aspects display of the EEG signals and control of a machine. The signal is firstly acquired from the necomimi headband. The display of the EEG signal is carried out with the help of the microcontroller Atmega32 and a LCD. Also the signals are also displayed on a PC with the help of MatLAB software and an audio jack. Now, for the control of machines the signal is first processed and is encoded with HT-12E and is transmitted with the aid of TWS434. The encoded word is received by RWS 434 and is decoded with HT-12D. This is then used to switch a machine on or off. REFERENCES PAPERS [1] Wolpaw, J. R., Birbaumer, N., McFarland, D. J., Pfurtscheller, G., and Vaughan, T. M. "Brain-Computer Interfaces for Communication and Control." Clin Neurophysiol 113, no. 6 (2002): 767-91. [2] S. Saeid and C. Jonathon. “EEG Signal Processing.” s.l.: John Wiley and Sons, 2007. [3] “User Adaptive BCIs: SSVEP and P300 Based Interfaces.” Beverina, Fabrizio, et al., PsychNology Journal, pp. 331–354, 2003. [4] “Cost-Effective EEG Signal Acquisition and Recording System.” Sabbir Ibn Arman, Arif Ahmed, and Anas Syed, 2012 [5] “Brain-Computer Interfaces used for Virtual Reality Control.” Pfurtscheller, Gert and Scherer, Reinhold, 2010. 63
  • 64. Brain Controlled ‘SPM’ [6] Wolpaw JR, McFarland DJ. “Control of a two-dimensional movement signal by a noninvasive brain–computer interface in humans.” Proc Nat Acad Sci 101:17849–17854, 2004. [7] “The Spatial Location of EEG Electrodes: Locating the Best-Fitting Sphere Relative to Cortical Anatomy.” VL, Towle, et al. 1993, Electroencephalogr Clin Neurophysiol. [8] AtMega32 Datasheet – Atmel AVR 8 - bit Microcontroller. Atmel IC Database. [Online]. Available:http://www.atmel.in/images/doc2503.pdf WEBSITES 1. http://en.wikipedia.org/wiki/Braincomputer_interface. 2. www.videotutorials.org 3. www.ieee.com 4. www.atmel.com 64