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

Fix Cyton impedance check board configuration #1211

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

philippitts
Copy link
Member

The Cyton impedance check configuration appears to be incorrectly disconnecting SRB2 and using Bias instead. This has led to incorrect impedance measurements as shown in #1204. This fix results in correct measurements with a 51 kOhm resistor - more tests to follow.

@philippitts philippitts linked an issue Feb 29, 2024 that may be closed by this pull request
@philippitts
Copy link
Member Author

Resistor Value Pin GUI Impedance Reading
51 kOhm SRB2 50 kOhm
51 kOhm 1P 50 kOhm
Resistor Value Pin GUI Impedance Reading
470 kOhm SRB2 550 kOhm
470 kOhm 1P 553 kOhm
Resistor Value Pin GUI Impedance Reading
680 kOhm SRB2 649 kOhm
680 kOhm 1P 647 kOhm
Resistor Value Pin GUI Impedance Reading
1000 kOhm SRB2 906 kOhm
1000 kOhm 1P 902 kOhm

@retiutut
Copy link
Member

retiutut commented Feb 29, 2024

It looks like the macOS build pipeline is broken, which is not related to the code that was pushed.

I'd like to replicate these results using resistors as part of the review. The code is fine.

Great work @philippitts !

@retiutut retiutut changed the base branch from master to development February 29, 2024 17:02
@wjcroft
Copy link

wjcroft commented Mar 24, 2024

Forum users have been reporting broken impedance function well before March 2024. I would estimate many months. Totally appreciate Philip tracking this down.

On the Forum thread below I have suggested that users who need a workaround can try building the GUI from source using Phil's 2 line fix.

https://openbci.com/forum/index.php?p=/discussion/3790/high-impedance#latest
https://openbci.com/forum/index.php?p=/discussion/comment/20284/#Comment_20284

Until the new GUI app download binaries are regenerated, you can apply the fix yourself using the GUI source code.

#1211
b3918c8
#1204 (comment)

Currently most staff are busy on the Galea project, several important demos at conferences are happening this week. Once things settle back to normal, new download binaries should be available.

https://docs.openbci.com/Software/OpenBCISoftware/GUIDocs/#running-the-openbci-gui-from-the-processing-ide

On the other hand, MANY groups using Cyton for university research projects, depend on accurate impedance checks to comply with their academic research protocols. So a wider distribution of this repaired GUI would be welcome.

@jartuso also commented recently on Slack: "this is the cyton impedance problem that we've talked about before. @philippitts didn't we fix this? This one scares me." What you may want to be concerned about is that universities getting wind of this in larger numbers, could dampen sales.

currentADS1299Settings.values.bias[channel] = Bias.INCLUDE;
currentADS1299Settings.values.srb2[channel] = Srb2.DISCONNECT;
currentADS1299Settings.values.bias[channel] = Bias.NO_INCLUDE;
currentADS1299Settings.values.srb2[channel] = Srb2.CONNECT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.openbci.com/GettingStarted/Biosensing-Setups/EMGSetup/#obtain-emg-data-with-openbci-cyton-board

Streaming EMG Data with the OpenBCI GUI

Once you have the GUI open, turn off any channels that you have not connected to muscle sensors.

Then for Cyton, go to hardware settings and turn off SRB2 for all of the channels that you are streaming data from.

Note: This is because ordinarily SRB2 is the reference point from which potentials are measured. However we are now having muscles reference themselves, so we do not want it to look at this pin.

While this may work, it also seems like this may break checking impedances when doing EMG.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relates to #1058

Copy link
Member Author

@philippitts philippitts Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not matter if you are reading EMG or EEG. The impedance check remains the same and measures the impedance of one Cyton electrode against SRB2, regardless of where that electrode is placed. Per the tests above, BIAS should never be used for impedance checks. This makes sense because BIAS is used as input to the ADS1299 to create destructive interference patterns that reduce noise vs SRB2 which is the reference point against which a channel can be measured (usually for EEG).

If you look at my readings from the linked issue you can see that on almost all the BIAS tests the signal was steadily dropping. This is because the ADS1299 is canceling out the "common noise" it's reading from the BIAS pin.

EMG doesn't use SRB2 while acquiring signals because EMG references against a second EMG channel (in most cases), but to measure impedance, SRB2 must still be used. The easiest method is to switch the BIAS electrode to SRB2 for impedance measurements and switch it back to BIAS for signal acquisition.

@isaacplotkin
Copy link

I just validated Phil's results. Looks good to merge @retiutut

@isaacplotkin
Copy link

isaacplotkin commented May 20, 2024

Resistor Value Pin GUI Impedance Reading
1000 kOhm SRB2 966 kOhm
1000 kOhm 1P 955 kOhm
Resistor Value Pin GUI Impedance Reading
100 kOhm SRB2 100 kOhm
100 kOhm 1P 100 kOhm

IMG_8056

IMG_8055

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

Successfully merging this pull request may close these issues.

Cyton impedance checks incorrect at low resistances
4 participants