Sei sulla pagina 1di 25

Bangladesh University of Engineering and Technology

Department of Computer Science & Engineering

CSE 408N
INTERFACING SESSIONAL

BRAIN COMPUTER INTERFACE

Prepaired By: Group No: 19


Level-4, Term-1

Md. Mahfuzur Rahman


Md. Mahmudul Hasan
Md. Mizanur Rahman
Md. Siam Hasan
Md. Mansurul Alam
1. Introduction:
A Brain-Computer Interface (BCI), sometimes called a direct neural
interface or a brain-machine interface, is a direct communication pathway
between a human or animal brain and an external device.

Simply it is a technology to enable us to control the computer or any


device using only our thought or sometimes our brain being controlled by
the computer.

When our brain process any information then neurons in different


parts of our brain interacts with each other. When neurons interact with each
other then they pass the brain information through electric signals. Between
two consecutive neurons there exists a very small gap and there the neuron
Axon transmits the electric signal to the Dendrites by means of electro
magnetic radiation. In this phase of transmission of brain signals between
neurons, some part of the electro magnetic waves propagates outside and we
can detect those electro magnetic waves from outside of our brain skull.

2
2. History:
In 1929, a German doctor named Hans Berger announced his
discovery that it was possible to record the electrical impulses of the brain
and display them graphically on paper. He also discovered that these
electrical impulses changed according to the brain's activity, whether in
sleep, under sedation, with lack of oxygen, and in certain neurological
disorders like epilepsy. His discovery laid the groundwork to the field that
today is known as clinical neurophysiology and the basis of today’s BCI
technologies.

The development has gone a long way since then, though still is in
elementary level. Extensive research in this subject is going on all over the
world. NASA has formed a research group named Extension of Human
Senses. Their current work is focusing on using brain waves to control
computer software and the algorithms to support this work.

Berlin University, Germany has taken a research project named BBCI


which is supported by the “Ministry for Education and Research” of
Germany and comprises the development of EEG-driven systems for
computer-aided working environments. These systems will, for instance,
allow for the control of a mouse pointer by means of brain waves.

It is only in recent past that scientists being able to implement this


technology in diverse fields as controlling computers with thought,
computerized lie detection systems etc.

3
3. Problem Description:
In our project we will develop a brain computer interface that will
enable us to type in the computer through deeply concentrating in a special
type of Key-Matrix displayed in the computer monitor.

Here we implement the following tasks:

• Capture EEG signals radiated from the Brain Neurons


• Amplify captured EEG signals
• Filter noise from the signals
• Modulate this signal to transmit it to the PC
• Receive modulated signal in PC
• Demodulate the signal through a computer program
• Detecting P300 spike by signal processing
• Confirming which Key is thought by user
• Redirect Keyboard to type that Key

4. Basic Block Diagram:

4
5. Signal Flow Diagram:

5
6. Description of Hardware Components:

6.1. The Electroencephalogram (EEG):


Our Electroencephalogram (EEG) is a device that measures the
brain’s electrical activity. Electrodes are attached to the scalp to capture the
Brain Waves. The captured weak electric signals is then amplified and
filtered and then digital conversion of the signal is done to make the signal
readable by the computer.

6.2. The Electrodes:

Electrodes are piece of wire or metal pins that works like an antenna to
capture the brain’s electromagnetic waves.

The captured signal is too weak (about 100μV). So it is amplified by a


preamplifier circuit embedded with the electrode and then passed to the
main amplifier.

6
6.3. Circuit Embedded in Electrode:
100

+
3V
-

Electrode plates
VGND
TLC272 10nF
R_decupling
200k 2 +5 100
1
Output
3 6 Buffered BW Point A
100pF
+
100pF 2V
-

10k

Bootstrapped HF rejection

Fig: Preamplifier Circuit inside electrode

6.4. Active Electrode Building:

Step 1: First of all, boards are etched because industrial etching is expensive
and requires a careful final design. .

Step 2: Pattern is printed using the darkest laser printer settings, onto a sheet
of polyester paper.

7
Step 3: Pattern is cut out, leaving a bit of extra paper, all the way around the
pattern.

Step 4: Copper plate are scrubbed with an abrasive pad. Pattern are laid flat,
face-down, onto it.

Step 5: Clothes iron is used. Temperature setting should be something


between "Linen" and "Polyester", i.e. very hot, and without steam. Iron is
placed onto the pattern.

Step 6: Necessary corrections are made, using a permanent marker.

Step 7: Boards are cut by a saw.

Step 8: Ferric Chloride and water is used to etch the board.

Step 9: The edges are finished with sandpaper.

8
Step 10: Then holes are drilled with a drill machine using very narrow drill
bit.

Step 11: The boards are ready now for soldering.

Step 12: Male ports are used as sensors.

Step 13: Chips are placed on the board and then soldered.

Step 14: Final electrodes top and bottom view.

Step 15: Then some double cables with shielding were used. One of them
carry the current to the OpAmp (wire +, shielding -), and the other the output
signal. Wires are connected according to the figure.

9
6.5. Electrode Placement:

 The number of electrodes can also


be increased to increase overall
system efficiency. But the
international 10/20 system for
electrode placement must be
followed in that case.
 4 Electrodes will be placed over the
4 Lobes of brain shown in the
figure.

 Frontal Lobe- associated with reasoning, planning, parts of speech,


movement, emotions, and problem solving.
 Parietal Lobe- associated with movement, orientation, recognition,
perception of stimuli.
 Occipital Lobe- associated with visual processing.
 Temporal Lobe- associated with perception and recognition of
auditory stimuli, memory, and speech.

10
6.6. The Main Amplifier :

Specifications:
 High Input Impedance
 High noise rejection
 Amplify 10-100μV
input signal
 Minimal power
consumption
 Low cost

 The Amplifier is connected with head using electrodes. Amplitude of


brain potentials measured directly on a scalp is about 100uV, and its
frequency range is not strictly defined, we can say that typically most
of spectrum energy is between 0.2Hz and 20Hz.
 Beside the scalp potential, on amplifier entrance there is a polarization
voltage (connection between scalp and electrode plate becomes a little
battery with voltage of about 100mV, that voltage is called
polarization voltage, it’s always DC voltage – it makes it easy to
remove it later in circuit).
 Next part is protection circuit that protects both, examinee from short
circuit in device, and the device from connecting it to some power
source instead of to brain. This part will also provide the ESD (Electro
Static Discharge) protection.
 After protection circuit there is an instrumentation amplifier.
Instrumentation amplifier is amplifier that amplifies signal difference
and rejects input signals common to both input leads. This is very
important cause noise is pretty same on both instrumentation amplifier
input leads and due to its ability to reject input signals common to
both input it will reject the noise

11
6.8. Active Low Pass Filter:

 The Low pass filter ensures that our


original signal m(t); passed to the
hardware modulator, contains only the
frequency band of the brain wave
signals.
 So we get the desired m(t) signal that
only contains the frequency band of the
brain wave signals and the noise inside
that frequency band is already rejected
by the Common Mode Rejection
system of the amplifier.

CMR LPF
Signal (Noise Filter) (BW Band Filter) m(t)

12
6.9. Circuit Diagram of Main Amplifier & Low pass Filter:

+V

IN4148
.1uF
Point A
+v
Electrode 1 1k 277
1k 22uF
Input 2+ 1 5 +8 7

7
6
3 8
+ - Output
6

4
INA114 1k 4 Point B
10k 100 277 2 1Mega
-V
1 100pF 10k
+ .1uF
3

1k
Input
.001uF
-V
Point A
Electrode 2 10k
IN4148

Fig: Main Amplifier & Low pass Filter

Now we have the amplified and filtered EEG signal captured from the
electrodes. Now we need to convert this analog brain wave signals to a
digital form to interface with the computer. But the conversion of EEG
signals to digital form would have introduced a more complex circuit for the
EEG. So for simplicity and lower cost we have used sound card to do the job
here.

The interfacing part of the digitized signal to the PC is also simplified


by this. But there is only one problem. Most audio systems, including sound
cards, filter out frequencies below 20 Hz. The signals we want to capture are
mostly below this frequency, so we can not just plug in the EEG amps and
go.

13
6.10. Hardware Modulator:

 We have designed a modulation scheme to solve this problem.


 We have used AM modulation with carrier frequency of about
10KHz-16KHz which is in the range of audio signals. So the
soundcard will treat this signal as normal audio signal and do it’s job
and we can read the digitally converted signal from the sound card
driver.
 The software demodulator will ultimately decode and record the brain
wave signal for further analysis.

14
6.11. AF Band Modulation circuit:

+V

200 .1uF
27k 27k
U5
2
MC1496 3
8 6
10 12 2N2222 22uF
Input 1 5
4 14
+ - T1104
Point B
20k
100 Mic
39k .1uF
39k
SoundCard Mic-In
-V

-V

15k
LM2931-5
1 8 150k
+V VIN OUT 2 NE555 7
3 6
GND 4 5 50k 40%

.1uF
+ + 22uF 12k
22nF .1uF
- 22nF .1uF
- +
-

.1uF
-V 220

- .1nF
22uF
+
1000pF

Fig: AF Band Modulation Circuit

15
+V

10k
+
9V
2N2222

12k

C22
22uF 22uF .1uF

-V

Fig: Power Supply for Whole Circuit

6.12. Sound card:

The modulated wave from the circuit is passed to the PC through


sound card Microphone input. The modulated EEG signal is recorded from
the sound card driver using a special computer program that will record the
EEG signal and draw a graph by plotting EEG data and also saves a
temporary buffer containing the EEG signal data. Then by analyzing the
signal buffer we can get the envelope of the AM modulated signal. That

16
envelope is the original brain wave and that wave is then analyzed further to
decide the mental processing going on the users mind.

Now we know that when a human being is subjected to a sudden


change in his/her eye sight then after approximately 300 milliseconds his/her
EEG signal contains a positive spike in the plotted graph. Based on this
observation we have implemented a keyboard controller system for the
Brain Computer Interface.

6.13.P300 Detection :

P300 is a positive wave that occurs about 300 milliseconds after the
onset of the target/rare (oddball) stimulus among a sequence.

Frequent
Properties of the spike
Rare
is:
 polarity (positive)
 latency (>275ms)
 morphology
(identifiable peak)

17
6.14.Features of P300 :
Central region, about 300ms latency
12
n o n-targ e t s tim uli
ta rg et s tim u li
10

6
A m p litu d e ( u V )

-2

-4
0 10 0 20 0 300 400 500 60 0

(a ). A v erage d w a ve o n C z

6.15. Experiment Design :

• Alphabet row/column will


EEG amplifier be flashing on the computer
screen
• Human subject was
gazing at the screen
• Human EEG was
recorded simultaneously
• P300 components in
EEG was extracted in real time
Human subject for letter guess
Human subject Visual feedback

18
Flashing of rows/columns containing the desired letter will elicit P300
response at vertex

19
7.Software Description:
The software part starts from the sound card signal recording. Here we
have used some audio libraries for Microsoft visual C++ 6.0 to record the
sound card microphone input signals. After recording the input modulated
signal the sampled data is saved in a temporary buffer. Then from the buffer
our program starts drawing a frame in the OpenGL graphical environment
using the GLUT library. The frame contains the plotted graph of the EEG
signal received, a waterfall model of the amplitude spectrums and also does
necessary calculations to produce the envelope. Then the program also
computes the necessary parameters to detect the P300 spike.

In the mean time there exists a Master Controller program that sends
necessary commands to another PC using UDP protocol to control the user
display feedback. In that computer running the display feedback program
listens to the Master Controller and flashes the display rows/columns
accordingly. The Master controller knows which row/column is flashing in
that PC now. Now the P300 detection subsystem sends information to the
Master Controller if a P300 spike is detected. So Master Controller knows
which row/column was flashing 300ms before the spike was detected. So
after the row and column is detected we can find out what was the
Letter/Number the user concentrated. Now the Master Controller sends
commands to the third PC by using UDP protocol to redirect the
corresponding “Key” for the letter/number detected.

Ultimately when a user concentrates on a specific letter/number then


our system can detect that and type the letter/number for the user by means
of keyboard redirection.

18
9. Brain Computer Interfacing Applications:

 Control home appliances by mind

Appliance control Make phone call

2. Help impaired hand to grasp by mind

 Play video games by mind

69
10. Future Extensions & Fictions:

 Try to implement a Lie Detection System with high accuracy.


 Try to implement mouse movement and robotic device control through
BCI.
 The idea of using BCI to make the standard interface for basic sense
organs and to get better performance from artificial hands and legs. So
that a disable person may get an artificial organ to resolve his/her
disability.
 The idea of the controller for our brain where our brain will be controlled
by a computer. We think it’s not too far away when technology will
enable us to artificially program our brain to increase its efficiency.
 Better treatment idea for mental patients
 Better medical treatment ideas for hypertension etc.
 The idea of wireless electrodes so that we can wear them as mobile
devices.
 Mind Reading is probably the oldest and probably the most challenging
idea to implement using current BCI technologies. And it is good news
for human rights department that Mind Reading is still a fiction.

11. Problems we faced & their Solutions:

 Cost of parts and equipments for our project is Very high. Again, no
financial support from authority. We have designed a BCI System where
the hardware part will be made of spare home appliances, cheaper
alternatives of the parts/equipments.
 Unavailability of some equipments and parts in local markets also create
problem to us. We were delay to start our project for this problem.
However our project supervisor helped us to buy these parts & chips
from Thailand.
 The conversion of EEG signals to digital form would have introduced a
more complex circuit for the EEG. So for simplicity and lower cost we
have used sound card to do the job here. The interfacing part of the
digitized signal to the PC is also simplified by this.
 Most audio systems, including sound cards, filter out frequencies below
20 Hz. The signals we want to capture are mostly below this frequency,

70
so we can not just plug in the EEG amps and go. To solve this problem
we at first modulated the signal and then pass it through the audio port of
sound card.
 Since we used cheaper alternatives of electrodes their performances were
not good. So, expected results were not found from them.

13.References:

[1] A Flexible Brain-Computer Interface


By
Jessica D. Bayliss
Submitted in Partial Fulfillment of the Requirements for the Degree
University of Rochester,Rochester, New York

[2] Text-input using a brain-computer interface: introducing Dasher


Marijn van Vliet
w.m.vanvliet@student.utwente.nl

[3] WTEC Panel Report on


INTERNATIONAL ASSESSMENT OF RESEARCH AND
DEVELOPMENT IN BRAIN-COMPUTER INTERFACES
Theodore W. Berger (Chair)
John K. Chapin
Greg A. Gerhardt
Dennis J. McFarland
José C. Principe
Walid V. Soussou
Dawn M. Taylor
Patrick A. Tresco

[4] The non-invasive Berlin Brain-Computer Interface:


Fast Acquisition of Effective Performance in Untrained Subjects
Benjamin Blankertz, Guido Dornhege, Matthias Krauledat, Klaus-Robert
Müller, Gabriel Curio

[5] THE BERLIN BRAIN-COMPUTER INTERFACE PRESENTS


THE NOVEL MENTAL TYPEWRITER HEX-O-SPELL
Benjamin Blankertz1, Guido Dornhege1, Matthias Krauledat1,2, Michael
Schr¨oder1,

71
John Williamson3, Roderick Murray-Smith3,4, Klaus-Robert M¨uller1,2
1Fraunhofer FIRST (IDA), Berlin, Germany
2Technical University Berlin, Berlin, Germany
3University of Glasgow, Glasgow, Scotland
4Hamilton Institute, NUI Maynooth, Ireland
E-mail: benjamin.blankertz@first.fhg.de

[6] Optimizing Spatial Filters for Robust EEG Single-Trial


Benjamin Blankertz, Ryota Tomioka, Steven Lemm, Motoaki Kawanabe,
Klaus-Robert Müller

[7] Speeding up classification of multi-channel Brain-Computer


Interfaces: Common spatial patterns for slow cortical potentials
Guido Dornhege1, Benjamin Blankertz1, Gabriel Curio2
1Fraunhofer FIRST.IDA, Berlin, Germany
2Neurophysics Group, Dept. of Neurology, Klinikum Benjamin Franklin,
Freie Universität Berlin, Germany
{guido.dornhege,benjamin.blankertz}@_rst.fraunhofer.de,
curio@zedat.fu-berlin.de

[8] Combining Features for BCI


1Fraunhofer FIRST.IDA, Kekuléstr. 7, 12489 Berlin, Germany
2Neurophysics Group, Dept. of Neurology, Klinikum Benjamin Franklin,
Freie Universität Berlin, Hindenburgdamm 30, 12203 Berlin, Germany
3University of Potsdam, August-Bebel-Str. 89, 14482 Potsdam, Germany
{dornhege,blanker,klaus}@_rst.fraunhofer.de, curio@zedat.fu-berlin.de

[9] Brain-Computer Communication and Slow Cortical Potentials


Thilo Hinterberger, Stefan Schmidt, Nicola Neumann, Jürgen Mellinger,
Benjamin Blankertz, Gabriel Curio, and Niels Birbaumer

[10] Recent Advances in Brain-Computer Interfaces


(Invited Paper)
Ulrich Hoffmann, Jean-Marc Vesin, Touradj Ebrahimi
Signal Processing Institute
Ecole Polytechnique F´ed´erale de Lausanne (EPFL), Switzerland
Email: {ulrich.hoffmann, jean-marc.vesin, touradj.ebrahimi}@epfl.ch

[11] The Berlin Brain-Computer Interface (BBCI)


towards a new communication channel for online control
of multimedia applications and computer games
Roman Krepki, Benjamin Blankertz, Gabriel Curio, Klaus-Robert Müller

[12] Towards Non-Invasive Brain-Computer Interfaces


Klaus-Robert Müller and Benjamin Blankertz

72
[13] The OpenEEG Project
http://openeeg.sourceforge.net/doc/

73

Potrebbero piacerti anche