Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger to tag stimulus presentation on aux channel #1

Open
andrewheusser opened this issue Sep 25, 2015 · 10 comments
Open

trigger to tag stimulus presentation on aux channel #1

andrewheusser opened this issue Sep 25, 2015 · 10 comments

Comments

@andrewheusser
Copy link

It would be really useful for researchers like me to have a way to tag stimulus presentation times in the data from presentation software. I'd like to be able to send an ASCII character [i.e a backtick ` ] to the openBCI hardware and have it insert a tag on an aux channel so that we can later epoch and sort our data by some condition. Ideally, we would be able to have many unique tags, but it's also possible to work with one for now. I have no experience programming firmware, but spent some time staring at the code and came up with this solution. Do you think this solution would work?

adding an additional case to the OpenBCI_32bit_SD.pde file:

case '`': // if backtick is pressed, send a trigger to aux channel
OBCI.auxData[0] = 0xFFFF; // take note (this could be a counter, or...)
OBCI.useAux = true; // set the OBCI.auxData flag
addAuxToSD = true; // add Aux Data to the SD card if it's there
break;

I'd appreciate any help from those of you with experience doing this kind of thing! Thanks!!

Andy

@jussijaatinen
Copy link

I have the same problem. Really need this feature for ERP and ABR studies.

@andrewheusser
Copy link
Author

we managed to get this going. In order to make it work, you have to upgrade the firmware by following these instructions: https://github.com/OpenBCI/OpenBCI_32bit_Serial_Trigger

We haven't tested accuracy of the timing, although it likely not good enough to run an ERP study. We are working on another solution which should have MUCH better time resolution if we can get it to work. The basic idea is keeping synchronized clocks across the hardware and stimulus presentation software and then just tagging events with timestamps in the software and chopping up the data from the EEG rig later.

@jussijaatinen
Copy link

Andy: Do you have any news about this "another solution"?

Jussi

@andrewjaykeller
Copy link

@jussijaatinen just had a meeting about it today! Have you implemented anything?

@jussijaatinen
Copy link

@pushtheworldllc @andyh616 Any news about this?

@andrewheusser
Copy link
Author

@jussijaatinen, we are working on it :) wanna help?

@jussijaatinen
Copy link

@andyh616 Hi Andy. Unfortunately I don´t have programming experience, sorry :-( Especially in brainstem studies timing would be a crucial thing. Also we should have several (at least four) external trigger markers inserted to the raw data, so we could make epochs. Is this possible to deliver wirelessly or should we make an interface (optoisolator) between presentation computer and OpenBCI?

@andrewjaykeller
Copy link

yeah a hardware connection fed directly into the AUX channels is still the best at this point

@jussijaatinen
Copy link

@andrewheusser
Copy link
Author

@jussijaatinen Currently, a hardware trigger is your best bet. Here's a tutorial for how to do that:
http://docs.openbci.com/tutorials/05-External_Trigger_32bit_Example

We are working on a clock synchronizing solution that will most likely give us <5ms (possibly <1ms) resolution, but I wouldn't hold your breath for it. At this point, its not clear how easy it will be to implement. Nonetheless, we'll let you know when we make some progress!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants