ChrisVeigl / BrainBay

Open Source Biofeedback Software
http://brainbay.lo-res.org
Other
163 stars 52 forks source link

Ganglion - ~10uV spikes with BrainBay 2.3 #17

Closed Otemo closed 5 years ago

Otemo commented 5 years ago

I have detected spike-like, periodric artifacts (approximately once/sec) . Can you confirm the same phenomenon?

https://drive.google.com/file/d/1PcMA2AaPY8alvtLz1Z3Hecffr0SZEjht/view?usp=sharing

I use the Ganglion boards to monitor signals, the electrodes are not connected to the board or body.

The following are the conditions. ・win10 machine ・Newest Brainbay (v2.3) - OpenBCIHub (OpenBCIHub-v2.0.7-win-64bit), ・Bandpass filtered(0.5-50Hz) ・Does Not matter BLED 112 or CSR4.0 dongle ・Disappear with the combination of Brainbay v2.1- Hub v1.4.6 - CSR 4.0 dongle ・Artifacts are Not identified in the OpenBCI GUI measurements ・They seems not to be derived from measurement environment, because I can confirm them in different lab. ・They seems not to be derived from Ganglion boards temselves, because I can confirm them on different boards

Thank you, Otemo

wjcroft commented 5 years ago

Otemo, thanks.

Oops, I'm seeing these as well. Hopefully Chris will have some ideas.

Tried both Hubs 2.0.4 and 2.07, spikes on both. Matching your description. Apologies I did not catch this earlier. In my brief tests with Chris' new v2.3, I was just verifying that the Ganglion could connect over BLED112, and was looking at the 4 Oscilloscope traces at -500 to +500 uV scale. So missed these ~ 10uV spikes.

2019-04-11,163932

The Channel 1 trace here has a jumper between + and - pins, so should be producing 0 uV. The Channel 2 is floating (no leads), so has somewhat more noise. But oddly, both of these channels show about a +10 uV offset from the 0 uV expected. Only when the spikes occur, does the Channel 1 trace drop to 0 uV. Odd.

Regards,

William


Addendum: I checked the GUI again, previously I had the 1-50 bandpass filter on. When I set the GUI time series to "No filter", then the funny ~10uV DC offset shows up. So that appearance in the BrainBay graph is accurate. But even with the filter off and the vertical scale set to 50uV, the GUI still is flat, no periodic 'spikes' down to 0uV.

Otemo's graph has bandpass filtering, so that is why it looks more misshapen compared to the raw Oscilloscope traces above. In his graph the DC offset has been removed, and thus his graph has more the look of an 'AC' signal, where there is a bit a rebound after the spike. In truth the raw values just alternate from the ~10uV baseline, periodically down to 0 uV.

ChrisVeigl commented 5 years ago

hey guys !

thanks for the feedback ! - i also noticed these strange periodic spikes - and i think they were there even in the fist version of the ganglion hub. i actually belive this is an HW issue of the ganglion - but i am not completely sure.

@william: "I checked the GUI again, previously I had the 1-50 bandpass filter on. When I set the GUI time series to "No filter", then the funny ~10uV DC offset shows up. " you mean the OpenBCI GUI, right? - this would strenghten the assumption that it is an HW-issue ...

wjcroft commented 5 years ago

Chris, no. Sorry if my comments caused any confusion. What I intended to say, main conclusion, is that I agree with Otemo's observations. The spike is there with BrainBay, but NOT THERE when observed with the GUI. Same Hub being used. So it must be some oddness in the stream communications between the Hub and BrainBay. But that same Hub works fine with GUI.

As far as the ~10uV DC offset, yes, that is present in both GUI and BrainBay, which I assume is due to what the Ganglion hardware is putting out. The spikes are only seen with BrainBay.

Regards,

wjcroft commented 5 years ago

And to underline what Otemo is saying, "Disappear with the combination of Brainbay v2.1- Hub v1.4.6 - CSR 4.0 dongle". So the spikes go away with earlier Hub + BrainBay combination. This proves it is not the Ganglion hardware.

ChrisVeigl commented 5 years ago

okay .. then this is definitely something I have to take a look at ... sorry that i suspected the hardware !

wjcroft commented 5 years ago

Chris, no apologies needed(!) Thanks again for your time and expertise in offering BrainBay to the community over these many years. You are an open source hero. :-)

ChrisVeigl commented 5 years ago

hi, i just found a bug in my openBCI hub parser - which corrupted the samples of the first channel for sample numbers < 10 ... i suppose this wouldn't have happened if I had used a JSON parser library ;-)

i pushed the fix, uploaded a new installer and updated the realease to v2.3.1 sorry for any inconveniences and thanks for the bug report !!

The openBCI hub support is still far from perfect but i hope the channel values are received correctly now

Otemo commented 5 years ago

Hi Chris and William,

I successfully recorded the signal using v2.3.1.

v2 3 1

I deeply appreciate your quick support on behalf of all users who are using the wonderful program you developed.

Thank you! Otemo

ChrisVeigl commented 5 years ago

okay - great that it works !! i apprechiate your positive feeback :-)

regarding the remaining ~10uV noise which is present in the system even when elecrodes are conneted to GND: i think this can't be avoided with the gangion... maybe a shielded enclosure will help a bit.

wjcroft commented 5 years ago

Otemo, great. Chris, thanks again.

re: "the remaining ~10uV noise which is present in the system...". Remember, this is not 10 microvolts of noise. This is a DC offset of ~10 uV. DC offsets are not uncommon to see in EEG amplifiers that are considered "DC coupled", which Cyton and Ganglion are. Here is a whole page on how that works with Cyton, and the concept of fbEEG, Full Band EEG.

http://openbci.com/forum/index.php?p=/discussion/201/large-millivolt-data-values-fbeeg-full-band-eeg

The difference is, on Ganglion, there is an inherent hardware high pass filter as part of the analog front end, and this should theoretically dampen or reduce the DC offset. On Cyton the DC offset varies, but is generally in the range of plus or minus tens to hundreds of millivolts (10,000 to 100,000 uV, 0.01 to 0.1 volts). Which is why most applications filter this off with a high pass or bandpass starting at .5 hz. It does have very practical value in certain forms of neurofeedback, called ILF (see above link.)

So my impression is that this small Ganglion DC offset is just normal. (For example it cannot be shielded or adjusted with electrodes.)

I would be curious if @Otemo also sees a ~10 uV DC offset when he connects the Ganglion directly to Oscilloscope (as in my previous image.) Shorting the plus minus pins (or channel and reference), will assure lowest ambient noise.

Cheers,

Otemo commented 5 years ago

Hi William,

Yes, I can also see a ~10 uV DC off set in my Ganglion borad.

~10uv_off_set

Thank you, Otemo

ChrisVeigl commented 5 years ago

yes - theoretically the highpass should remove any DC-offset. no idea why it's present in the ganglion recordings... but the DC-offset is not a problem at all for a good EEG-measurement / feedback as long as it does not saturate the amplifiers.

i was referring to the noise, which can be clearly seen in above picture. it's about 10uVpp - way too much for a good EEG recording ....

wjcroft commented 5 years ago

Oddly, after installing this new version, every time I start my design, I get a dialog box "ganglion connection error", with the contents, "Is the Ganglion board switched on and connected". Yes it is, I was just using it with the previous version of BrainBay (2.3). The Hub does get started.

When I access the Ganglion from the GUI, everything is working fine.

After the 2.3.1 install, I did re-enter the appropriate items into the Options panel, 200Hz and path, C:\Program Files\OpenBCI_GUI\data\OpenBCIHub\OpenBCIHub.exe

I honestly can't see what I'm doing wrong. Should I have uninstalled first? I did not, I just installed over the old version.


I just did a complete uninstall followed by reinstall of 2.3.1. Same dialog box when starting the design.

Otemo commented 5 years ago

I also have been seeing the same phenomena as the William's observation. I often try to connect several times. Usually, Brainbay successfully connects with ganglion board after two attempts.

wjcroft commented 5 years ago

Otemo, can you transfer your last comment to the new issue I opened? Thanks.

Otemo commented 5 years ago

sure!

wjcroft commented 5 years ago

re: Chris' comment, "noise, which can be clearly seen in above picture. it's about 10uVpp"

I just shorted the plus minus pins here and got:

2019-04-14,154201

I'm not sure Otemo's images were with the pins shorted. Anyway it's looking somewhat less than 5uV peak to peak. Which would be less RMS. The GUI is showing ~1uV something noise RMS. Here are Alex' comments on his self noise measurements.

http://alexandre.barachant.org/blog/2017/03/02/Hands-on-OpenBCI-Ganglion.html

ChrisVeigl commented 5 years ago

hi william,

i know the excellent article by alexandre - great how he found the problem with the high pass filter! i'm still wondering why i see more noise in my ganglion recordings. when i connect all channels to GND i still see considerable noise - nearly 10uVpp which would be >3uVrms .... seems that this is coupled into the system after the electrod inputs as it reacts to movements near the PCB ... that's why is suspected that a shielded box could help.

Otemo commented 5 years ago

Hi There, Yes, avove figure i presented was with the pins shorted. Unfortunately, I can not reduce noise around 10 uVpp.

Otemo