external audio triggers / oddball paradigm / increase sampling frequency?

RafiaRafia USA
edited May 2019 in Cyton
Hi, 
How can I increase increase sampling frequency while recording eeg signal using OpenBCI and Openvibe ? 
By default it shows 250 Hz.

--------------------------------------
Time:250Hz  Epoch    Fp1    Fp2

0
0.004
0.008
0.0012


Say, I need
ime:250Hz  Epoch    Fp1    Fp2

0
0.002
0.004
0.006

Rafia





«13

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Rafia, the sampling frequency is fixed in the case of a single Cyton or Ganglion board. To 250 or 200 Hz respectively. This can be increased with the use of the Wifi Shield.

  • Thanks. 

  • How can I find the events in eeg file ? I meant to sat I have recorded an eeg signal and saved it in csv. Now I want to rad the file. Like, 
    1. When a long beep heard 
    2. When a short beep heard 

    As I want to average the different tone signal and I am unable to do that. My aim is oddball paradigm with auditory signal .Please help. 

    Rafia
  • wjcroftwjcroft Mount Shasta, CA
    https://www.neuroelectrics.com/blog/quick-tips-for-p300-detection/

    Many P300 experiments are done using an external trigger signal that is recorded alongside the EEG channels. With Cyton, you can setup the external trigger to be recorded on the Aux channels.

  • wjcroftwjcroft Mount Shasta, CA
    edited April 2019
    http://openbci.com/forum/index.php?p=/discussion/118/stimulus-integration

    Or, sacrifice some of the 8 EEG channels for triggers. There are 3 Aux channels.
  • Hi, 
    I want to record eeg with auditory effect. For tone generation, I am using PIC24EP Micro-controller. Is it possible to detect the tone signal with any open BCI channel ?
    Say, I am using head band that displays 5 channel eeg signal . Now is it possible to use one of the electrode cord to detect the tone signal from micro-controller and 4 channel display eeg and 5th channel display the tone signal. 

    Rafia
  • wjcroftwjcroft Mount Shasta, CA
    Rafia, I merged your new thread into this one. Since it concerned your previous question.

    For recording trigger signals, yes you can use either actual EEG channels, or the Aux channels, of which there are 3.

    If you wire your sound output signal to a channel, that will greatly exceed the normal EEG voltage range, which tops out at about 100 uV. So, use what is called a voltage divider, using resistors, to drop your signal level into the microvolt or at most millivolt range.


    DO NOT connect any of the input pins of the OpenBCI devices directly to another circuit that has power from the mains. This is a potential safety issue, since malfunctions in the other circuit could route mains voltages (120 or 240 volts), to your head. For audio output signals, there are audio isolation transformers.


    These are not perfect, but are better than nothing.

    William

  • wjcroftwjcroft Mount Shasta, CA
    Mentioning @Rafia, in case the email notification did not go out.
  • wjcroftwjcroft Mount Shasta, CA
    edited May 2019
    Another suggestion if you are doing P300: use two different tones, for example 1000 Hz and 500 Hz. Same length.

    These will give precise trigger locations in your EEG record to look for the P300.

    If instead you use long and short tones, there is more ambiguity in where the subject's brain detects the "oddball" event. In terms of exact time location.
  • wjcroftwjcroft Mount Shasta, CA
    edited May 2019
    Yet another way you could do the triggers: have the PIC24EP (in addition to outputting the tones), output a specific 1 or 2 level "DC" level signal when the tone is on. (And turn off when the tone stops.) The advantage of this is that it has a sharp front and back edge. If you record the actual audio tones, (as an EEG or Aux channel) -- those will be a series of square or sine waves, and you'll have to do some logic to determine the start and stop of the tone. Because during the tone sounding interval there will be many of these waveforms in the audio signal.

    Your PIC has plenty of output pins, and some of them are even DACs, digital to analog converters. So your trigger line could be at one level for the "normal" tones, and another level for the "oddball' tones. (If you are concerned about using minimum number of trigger channels.) Remember again, audio signals and PIC output pins are running at voltage much higher than microvolts. So you need to divide down to get into a reasonable range.

  • RafiaRafia USA
    edited May 2019

    [original thread title: event code number from openBCI txt file]


    Hi,

    In openBCI there is index number column but no time column. I want to use EEG lab tool to find p300  by using openBCI recorded file.

    1) How can I find the event number for frequent tone and rare tone ? As in EEGlab I need these event codes to draw plot.

    2) Is there any file which direct to draw p300 plot using openBCI file ?


    Thanks

  • How could I find event information  from the dataset file ? (Recoded in openBCI and savev in txt format ? )
  • wjcroftwjcroft Mount Shasta, CA
    @Rafia, hi.

    I merged your thread "event code number from OpenBCI txt file", into this existing thread you previously opened on P300 oddball paradigm.

    I previously mentioned how most experiments do their P300 experiments. It requires using what is called an external trigger that is simultaneously recorded with the EEG signal. You can record this trigger either as a normal EEG channel, or using one of the Aux channels on Cyton.

    In general you CANNOT do the precise timing alignment required using "event numbers" or time / realtime clock measurements. The reason being that those numbers or times are not precisely aligned with your auditory events.

    The OpenBCI GUI txt file contains the sample number index in the first column. This cannot be used to align with your auditory signal.

    I outlined how you could wire your external trigger signal to the Cyton, previously.

    Regards,

    Wiliam

  • Hi William,
    In my EPR analysis, my peak is at around 50 ms instaed of 300 ms. What would be the reason ?
    Epoch: -.2 to 1.8 seconds.

  • wjcroftwjcroft Mount Shasta, CA

    Rafia, how are you deriving your timing measurements (from stimulus moment until your peak response?) Are you using an external trigger?

    Regards, William

  • yes. I am generating tone by micromedia board and tracking tone enents by using one of the OpenBCI electrode pin.

  • wjcroftwjcroft Mount Shasta, CA

    Are you using an oddball paradigm? Describe your experimental setup. Do you have an academic advisor, have you asked them for insights as to what is going on with your measurements? What is the end goal of your work, are you working in a school to fulfill a requirement, etc.

  • wjcroftwjcroft Mount Shasta, CA

    I'm sure you've designed your experiment with good procedures. But variations are possible in the way the signals are averaged, the event times recorded and measured, the type of oddball stimulation, signal noise issues, etc. Here is a fun tutorial I came across,

    https://backyardbrains.com/experiments/p300

  • Yes, I am trying to plot P300 for oddball paradigm same you did. Two pich tone. And got P466 instead of P300.
    Yes, I have an academic advisor, I am doing m
    y PhD research.

  • Hi,
    I am using eeglab.

    how can I name "rt", "square" with appropriate time position ?

  • wjcroftwjcroft Mount Shasta, CA

    EEGLAB discussion forum is great for specific EEGLAB questions,

    https://sccn.ucsd.edu/wiki/EEGLAB_mailing_lists

    Regards, William

  • One comment from the graph you posted on 26 August: If you move the origin rightward to where the y-axis reaches about 0 from very high y value at start, you get about a P300 using the new origin. Why does the y value of the graph start at such a high value?

  • Hi,
    For external trigger use, Arduino (1.8.10)firmware is not uploading the defaultboard skectch.
    I should select "defaultboard" or "board with ble" ?
    In both case, the following error is showing .How to solve ?

    "Arduino: 1.8.10 (Windows 10), Board: "OpenBCI 32"
    Sketch uses 62988 bytes (51%) of program storage space. Maximum is 122880 bytes.
    Global variables use 8888 bytes (27%) of dynamic memory, leaving 23880 bytes for local variables. Maximum is 32768 bytes.
    An error occurred while uploading the sketch
    Copyright: (C) 2011-2015 Serge Vakulenko

                   2016-2017 Majenko Technologies
    

    No target found.
    Programmer for Microchip PIC32 microcontrollers, Version 2.1.46

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • wjcroftwjcroft Mount Shasta, CA

    You do not need to change the Cyton firmware. The default firmware allows external trigger via the digital or analog input pins on the PIC32. Please just stick with the defaultboard firmware.

  • Now on the firmware, bord info is blank. When I am trying to upload defaultboard sketch, giving following error. Now with the board, I can't even measure simple EEG. Can I reset my cyton board ?
    No target found.
    2016-2017 Majenko Technologies
    Programmer for Microchip PIC32 microcontrollers, Version 2.1.46
    An error occurred while uploading the sketch

  • wjcroftwjcroft Mount Shasta, CA

    Use the firmware install instructions,

    https://docs.openbci.com/docs/02Cyton/CytonProgram
    https://github.com/OpenBCI/OpenBCI_Cyton_Library/blob/master/UPGRADE_GUIDE.md

    What firmware did your board have previously? When did you purchase the board? If you had V1 firmware, it is best to upgrade both RFduinos and the PIC32. If you had later firmware, you can just reload the PIC32.

  • Firmware v3.
    I purchased on January 2019

  • Reload PIC 32 means chipKIT 32 ?

  • wjcroftwjcroft Mount Shasta, CA

    Yes, PIC32 is the main processor chip on the Cyton board. "chipKIT" is just another name for it, when it is running Arduino code.

  • wjcroftwjcroft Mount Shasta, CA

    When did you purchase? And what firmware were you running BEFORE you attempted new firmware?

Sign In or Register to comment.