Http Cerescontrols Com Projects Eeg Electroencephalography With Labview and Mindwave Mobile

17
Ceres Controls Automation and control projects and algorithms with embedded systems Search Thanks for your Thanks for your support support Recent Posts Recent Posts Running the FRDM- K64F Bootloader Option Play Audio with the SOMO-14D Module mbed – The best amateur engineer tool Connected LaunchPad – Tiva C Series LabVIEW and Leap Motion ↑ Return to Projects EEG – Electroencephalography with LabVIEW and Mindwave Mobile The Origins The Origins EEG or electroencephalography are since Hans Berger in 1929 exposed that the activity of the brain could be measured from electrodes situated in the human skull. With EEG we could measure in fact, the functional state of the brain and diagnose some future or actual problems. This is the most common way to measure injuries in the brain and functional brain disturbances, but the creation of the signal is not well understood. Different regions of the cortex have different cytoarchitectures and each region has its own morphological patterns, aspects of intrinsic organization of the cortex are general. Most of the cortical cells are arranged in the form of columns, in which the neurons are distributed with the main axes of the dendritic trees parallel to each other and perpendicular to the cortical surface. This radial orientation is an important condition for the appearance of powerful dipoles. Figures below lists the parts of human brain cortex and zones of interest.. These layers are places of specialized cell structures and within places of different functions and different behaviors in electrical response. An Site Map Site Map Home Contact DAQ-Sys Me HC08 Thesis Projects Audio Sound Module Library for the SOMO- 14D (Version 1) Variable Frequency Drive Control with LabVIEW EEG – Electroencephalography with LabVIEW and Mindwave Mobile Home Computer Vision Contact HC08 Thesis Programmable Logic Projects Tutorials PDF creado por htmlapdf.com a través de la Interfaz de programación

description

projects-eeg-electroencephalography

Transcript of Http Cerescontrols Com Projects Eeg Electroencephalography With Labview and Mindwave Mobile

  • Ceres ControlsAutomation and control projects and algorithms with embedded systems

    Search

    Thanks for yourThanks for yoursupportsupport

    Recent PostsRecent PostsRunning the FRDM-K64F Bootloader Option

    Play Audio with theSOMO-14D Module

    mbed The bestamateur engineer tool

    Connected LaunchPad Tiva C Series

    LabVIEW and LeapMotion

    Return to Projects

    EEG Electroencephalography with LabVIEW andMindwave MobileThe O rig in sThe O rig in sEEG or electroencephalography are since Hans Berger in 1929 exposed that the activity of the braincould be measured from electrodes situated in the human skull. With EEG we could measure infact, the functional state of the brain and diagnose some future or actual problems. This is the mostcommon way to measure injuries in the brain and functional brain disturbances, but the creation ofthe signal is not well understood.

    Different regions of the cortex have different cytoarchitectures and each region has its ownmorphological patterns, aspects of intrinsic organization of the cortex are general. Most of the corticalcells are arranged in the form of columns, in which the neurons are distributed with the main axes ofthe dendritic trees parallel to each other and perpendicular to the cortical surface. This radialorientation is an important condition for the appearance of powerful dipoles. Figures below lists theparts of human brain cortex and zones of interest.. These layers are places of specialized cellstructures and within places of different functions and different behaviors in electrical response. An

    Site MapSite MapHome

    ContactDAQ-SysMe

    HC08 Thesis

    ProjectsAudio Sound ModuleLibrary for the SOMO-14D (Version 1)Variable FrequencyDrive Control withLabVIEWEEG Electroencephalographywith LabVIEW andMindwave Mobile

    Home Computer Vision Contact HC08 Thesis Programmable Logic ProjectsTutorials

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Motion

    RecentRecentCommentsCommentsRunning the FRDM-K64F Bootloader Option Ceres Controls onExplaining FRDM-K64FKinetis BootloaderUsage and OpenSDA

    Play Audio with theSOMO-14D Module Ceres Controls on AudioSound Module Library forthe SOMO-14D (Version1)

    Rangel Alvarado onIntroduction to IoT Posting Data to Xivelyusing LabVIEW, Part 2/2

    mesut on Introduction toIoT Posting Data toXively using LabVIEW,Part 2/2

    Rangel Alvarado onIntroduction to IoT Posting Data to Xivelyusing LabVIEW, Part 2/2

    ArchivesArchivesMarch 2015 (2)

    September 2014 (1)

    August 2014 (3)

    June 2014 (1)

    May 2014 (1)

    area of very high activity is, for example, layer IV, which neurons function to distribute informationlocally to neu- rons located in the more supercial (or deeper) layers. Neurons in the superciallayers receive information from other regions of the cortex. Neurons in layers II, III, V, and VI serve tooutput the information from the cortex to deeper structures of the brain.

    Lobes of the human brain, external cerebrum, midbrain areas such as the dience- phalon and thehindbrain areas such as the cerebellum, medulla, etc.

    Different layers (columns) of the brain cortex. Pyramidal cells in layers III and V are mainlyresponsible for the generation of the EEG.

    EEG Sig n al sEEG Sig n al sThe EEG signal consists of spontaneous potential uctua- tions that also appear without a sensory

    Resistive Load Controlwith MicrocontrollerIndustrial WeldingMachine Controller SWand BoardRobotnik Summit XLIsolated USB to RS485ConverterSELFiSSH

    TutorialsExplaining FRDM-K64F KinetisBootloader Usage andOpenSDAmbed FRDM-K64FTiva C SeriesTM4C1294 ConnectedLaunchPadLeap Motion ControllerAnd LabVIEWSniffing BluetoothPackets with Kismetand Wireshark inUbuntu 12.04Introduction to IoT Posting Data to Xivelyusing LabVIEW, Part2/2Introduction to IoT Concepts, Part 1/2Using LabVIEW to testIO Control with aRN171-XVDatabasesXBee Basics and ATTransparent Mode

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • April 2014 (1)

    March 2014 (1)

    October 2013 (2)

    September 2013 (1)

    June 2013 (5)

    May 2013 (1)

    April 2013 (6)

    input. It seems to be a stochastic signal, but it is also composed of quasi- sinusoidal rhythms. Thesynchrony of cerebral rhythms may occur from pacemaker centers in deeper cortical layers like thethalamus or in subcortical regions, acting through diffuse synaptic linkages, reverberatory circuitsincorporating axonal pathways with extensive ramications, or electrical coupling of neuronalelements. The range of amplitudes is normally from 10mV to 150mV, when recorded from electrodesattached to the scalp. The EEG signal consists of a clinical relevant frequency range of 0.550 Hz(10).

    The most common frequency bands of EEG are the most common way of analysis. This informationcan reveal physiological and statistical evidence but each band could vary on people and animalswith is behaviours and metal sanity, age, etc. The most important patterns of human EEG aredescribed below.

    Example of EEG Bands

    The phenomena of alpha de-synchronization channel could be used to get the eyes closed/opendetection.

    Programmable LogicStarting in CPLD

    Leap MotionController AndLabVIEW

    Computer VisionOpenCV

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Delta Waves

    The appearance of delta waves are common in neonatal and infant EEGs and during in sleep stagesin adult EEGs. If delta EEGs appears by itself in a adult it means cerebral injury

    Theta Waves

    In the beginning where part of the delta waves, but scientists discovered the importance activityof these waves. Its region of interaction is between thalamic region and play dominant part inchildhood and infancy. The normal adult waking of theta waves are a few or small amount of thesefrequencies observed in drowsiness and sleep. Large amount of theta waves are associatedbetween different amount of pathologies.

    Alpha Waves

    These are originated on the posterior half back of the head and are from occipital an parietal regions. These waves are observed during conditions of awakeness, physical relaxation and mentalinnactivity. Can be blocked by mental activity or an influx of light when eyes are opened.

    Beta Waves

    Are presented in a healthy addult and the area of formation are in the frontal and central region of thecortex. Typical voltage of beta waves are less than 30uV. Beta activity increase when the organism isadded with barbiturerates, some non barbiturates sedatyves and minor tranquilizers. It also appearsduring mental activity and tension.

    C l in ic al EEGC l in ic a l EEGThe most common EEG uses up to 30 landmarks on the skull using bipolar derivation (twoelectrodes on the skull and the difference is the gradient of potential). Unipolar derivation is donewith an electrode or group of electrodes with the active part (activity) and the inactive part (usuallynose or ear). The advantage of unipolar derivation are that the amplitude of each deection isproportional to the magnitude of the potential change that causes it and the demonstration of smalltime differences between the occurrence of a widespread discharge at several electrode.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Common areas of bipolar EEG sensory.

    Emotiv Epoch EEGEmotiv Epoch EEGThe below paragraph is extracted from emotiv page directly.Based on the latest developments in neuro-technology, Emotiv presents a revolutionary personalinterface for human computer interaction. Emotiv EPOC is a high resolution, multi-channel, wirelessneuroheadset. The EPOC uses a set of 14 sensors plus 2 references to tune into electric signalsproduced by the brain to detect the users thoughts, feelings and expressions in real time. The EPOCconnects wirelessly to PCs running Windows or MAC OS X.Experience the fantasy of controlling and influencing the virtual environment with your mind.Access applications and play games developed specifically for the EPOC, or use the EmoKeyto connect to current PC games and experience them in a completely new way. If you or any of your 3rd party applications require access to raw EEG data, you will need topurchase the Emotiv EEG Neuroheadset.

    Emotiv Epoch EEG Neuroheadset

    Neurosky MindwaveNeurosky MindwaveThe below paragrah was extracted from Neurosky directly

    Measuring Electroencephalogram (EEG) activity has historically required complex, intimidating andimmovable equipment costing thousands of dollars. NeuroSky is unlocking a new world of solutionsfor education and entertainment with our research-grade, mobile, embeddable EEG biosensorsolutions. Precisely accurate, portable and noise-filtering, our EEG biosensors translate brain activity

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • into action.

    Our EEG solution digitizes analog electrical brainwaves to power the user-interface of games,education and research applications. We amplify and process raw brain signals to deliver conciseinput to the device. Our brainwave algorithms, developed by NeuroSky researcher and our partneruniversities and research institutions are uncovering new ways to interact with our world.

    Mindwave Mobile EEG Neuroheadset

    Both EEGs are good. Neurosky Mindwave is cheap, easy to hack and usefull for develop simpleapplications and filters for study brainwave signals. One thing to note is that Neurosky EEG is onlyfor develop games and must not be used to study the signals as a medical device, this is not thegoal of this company. The cost of the Neurosky Mindwave Mobile is about 100 USD.

    Emotiv EEG is good at a clinical level because gives you a lot of information of regions from F1 toF15, has an gyroscope to sense orientation of the head and a SDK for developer or researcher inLinux and Windows. The cost of the EEG rounds about 300 USD. But if you need to get raw data forbetter analysis you need to buy the complete package of EEG neuroheadset, and software, itsaround 750 USD.

    Because ease of use this note is based on Neurosky Mindwave.

    Pairing the Mindwave Mobile with the Bluetooth Device.

    The first thing is to detect the Mac Address of your device. For achive this task you must download toyour andriod phone a bluetooth mac address finder like are in the play store. I recommend youBluetooth Address Finder.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Next turn on the mindwave mobile and wait the blue light to start blinking. When the light comes onhold again to the top position a few seconds the switch and will start to blink a little faster.

    Then start the bluetooth application on your phone and in a few seconds you will have the macaddress that you want like this below.

    The BD_ADDR (Bluetooth Device Address) of the my Mindwave Mobile.

    Just for information. The three lower bytes are called LAP (Lower Address Part) of your bluetoothdevice. Next we must set our bluetooth device. I am using a Roving Network RN-41 Module.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • When connected to USB follow up these commands to set the device autoconnect activity.

    6/14/2014 15:11:55.888 [TX] $$$6/14/2014 15:11:55.959 [RX] CMD

    6/14/2014 15:12:03.871 [TX] SM,3

    6/14/2014 15:12:03.957 [RX] AOK

    6/14/2014 15:12:06.655 [TX] SP,0000

    6/14/2014 15:12:06.751 [RX] AOK

    6/14/2014 15:12:35.424 [TX] SR,74e5439c6264

    6/14/2014 15:12:35.600 [RX] AOK

    6/14/2014 15:12:50.152 [TX] R,1

    6/14/2014 15:12:50.223 [RX] Reboot!

    For the next step now you will need only to turn on the bluetooth of the mindwave mobile, wait someseconds and they will automatically pair. The scenario should act and finalize exactly like that figurebelow.

    Bluetooth connection for PC and Mindwave Mobile completely paired

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Midwave Mobile Frames

    First letx explain the frame output of mindwave mobile. There are two frame that are outputed atvariable rates.

    AA 04 80 02 00 56 27 AA AA 04 80 02 00 53 2A AA AA 20 02 38 83 18 02 43 EA 00 03 90 00 00 8900 00 47 00 00 1E 00 00 28 00 00 3B 00 00 27 04 00 05 00 E7 AA AA 04 80 02 00 53 2A AA AA 0480 02 00 55 28 AA AA 04 80 02 00 54 29 AA AA 04 80 02 00 54 29 AA

    Purple frame is outputted every 512 Hz and is not exchangeable the frequency time of output.

    Green frame is outputed every 1 Hz and is not exchangeable the frequency time of output.

    The frames contains useful information about raw values and calculated values. The below tablelists the different frames that are output of every frame.

    For the 512 Hz frame the information output is:byte: value // Explanation

    [ 0]: 0xAA // [SYNC][ 1]: 0xAA // [SYNC][ 2]: 0x04 // [PLENGTH] (payload length) of 8 bytes[ 3]: 0x80 // [RAW_WAVE_VALUE] 16-bit two's-compliment signed value (high-order byte followed by low-order byte) (-32768 to 32767)[ 4]: 0x02 // [VLENGHT] (payload variable length) of 'n' bytes [ 5]: 0x00 // [RAW_HIGH] high order byte of raw data two's compliment signed value[ 6]: 0x53 // [RAW_LOW] low order byte of raw data two's compliment signed value[ 7]: 0x2A // [CHKSUM] (1's comp inverse of 8-bit Payload sum)

    For the 1 Hz frame the information output is:

    byte: value // Explanation

    [ 0]: 0xAA // [SYNC][ 1]: 0xAA // [SYNC][ 2]: 0x20 // [PLENGTH] (payload length) of 32 bytes[ 3]: 0x02 // [POOR_SIGNAL_QUALITY] (0 to 255)[ 4]: 0x38 // 56 of 255 [ 5]: 0x83 // [ASIC_EEG_POWER] eight big-endian 3-byte unsigned integer

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • values representing delta, theta, low-alpha, high-alpha, low-beta, high-beta, low-gamma, and mid-gamma EEG band power values[ 6]: 0x18 // upper byte of EEG_POWER_DELTA[ 7]: 0x02 // middle byte of EEG_POWER_DELTA[ 8]: 0x43 // lower byte of EEG_POWER_DELTA[ 9]: 0xEA // upper byte of EEG_POWER_THETA[10]: 0x00 // middle byte of EEG_POWER_THETA[11]: 0x03 // lower byte of EEG_POWER_THETA[12]: 0x90 // upper byte of EEG_POWER_LOW_ALPHA [13]: 0x00 // middle byte of EEG_POWER_LOW_ALPHA [14]: 0x00 // lower byte of EEG_POWER_LOW_ALPHA [15]: 0x89 // upper byte of EEG_POWER_HIGH_ALPHA[16]: 0x00 // middle byte of EEG_POWER_HIGH_ALPHA[17]: 0x00 // lower byte of EEG_POWER_HIGH_ALPHA[18]: 0x47 // upper byte of EEG_POWER_LOW_BETA[19]: 0x00 // middle byte of EEG_POWER_LOW_BETA[20]: 0x00 // lower byte of EEG_POWER_LOW_BETA[21]: 0x1E // upper byte of EEG_POWER_HIGH_BETA[22]: 0x00 // middle byte of EEG_POWER_HIGH_BETA[23]: 0x00 // lower byte of EEG_POWER_HIGH_BETA[24]: 0x28 // upper byte of EEG_POWER_LOW_GAMMA[25]: 0x00 // middle byte of EEG_POWER_LOW_GAMMA[26]: 0x3B // lower byte of EEG_POWER_LOW_GAMMA [27]: 0x00 // upper byte of EEG_POWER_MID_GAMMA [28]: 0x00 // middle byte of EEG_POWER_MID_GAMMA [29]: 0x27 // lower byte of EEG_POWER_MID_GAMMA[31]: 0x04 // [ATTENTION] eSense (0 to 100)[32]: 0x00 // Attention level[33]: 0x05 // [MEDITATION] eSense (0 to 100)[34]: 0x00 // Meditation level [35]: 0xE7 // [CHKSUM] (1's comp inverse of 8-bit Payload sum)

    More information about the protocol and de-packing could be encountered here.

    LABV IEW Graphic al C odeLABV IEW Graphic al C ode

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Because for my use there was no way to start the Thinkgear communication API in LabVIEW, idecided to make my own thinkgear library.

    LabVIEW Front Panel of the Application. This displays all signals captured by the NeuroskyMindwave and finally makes the FFT Power Spectrum. You can also copy and paste the data to

    make further analysis in Matlab or any favorite software.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • LabVIEW Block Diagram of the Application. Basically you must start the VI (MindwaveInit.vi) and startcapturing frames (MindwaveStream.vi); finally when you are finished then close the VI

    (MindwaveCLOSE.vi).

    There are several blocks of work that i have created, and are hidden in the structure of the project. You could download the project and navigate to the structure of the Neurosky folder. Should look likethis:

    Image of non-hidden and hidden function blocks for Mindwave Mobile.

    Mindwave Init

    This function basically starts the bluetooth SPP (Serial Port Profile) hardware with the baudrate

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • desired. It is used to start receiving packets from our headset device.

    Mindwave Stream

    Mindwave stream does the complete job of unpack the received data of the frames of 512 Hz and 1Hz filling a structure that you could access later to make calculations.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Mindwave Precise

    This block is a variation of the above MidwaveStream.vi, the difference is that you could wait tocapture the RAW EEG (512 Hz frame) or the Variable Length (1 Hz frame) via an input.

    Mindwave Auto

    This block as above blocks do the recopilation of information of the frames, but sequentially, first theraw eeg and then later the variable lenght data.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Mindwave Close

    When you are done with communications you must close the serial port channel for other programsto start using this resource.

    Here is the Github code that i developed. Remember this content is under Creative Commonslicense..

    Finally here is a video of explanation of the use of Mindwave and LabVIEW.

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • Name: * Email: * Website:

    Leave a ReplyYour email address will not be published. Required fields are marked *

    Message: *

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin

  • CopyrightExcept where otherwise noted, content on this site islicensed under a Creative Commons License.

    Return to top

    Powered by WordPress and the Graphene Theme.

    Notify me of follow-up comments by email. Notify me of new posts by email.

    Submit CommentSubmit Comment

    PDF creado por htmlapdf.com a travs de la Interfaz de programacin