Sleep monitoring with EEG?

Hey guys, has anyone investigated/made progress on using EEG for sleep? There are some promising looking journal articles describing the use of one two or even one electrode, to determine the different phases of sleep.
These wrist mounted sleep trackers really aren't very good. EEG is the best.
I think some kind of adhesive electrodes with a light, small data logger would be the best idea. I mean when you are tossing around with your head on a pillow, any kind of low cost headware is probably going to get messed up.
Any hot tips on suitable amplifiers, data loggers, electrodes, analysis software? I'm willing to hack stuff together etc. and indeed really wish these scientists publishing these articles would share their source code. The world is a bit nuts, the road to getting promising technology/techniques out there is ridiculous. There are various products that claim they can do this stuff but they are never ready to roll, and probably never will be. We do it like this or it doesn't get done, basically.
Comments
I can take a little gold electrode and some electrode paste and medical tape I guess. I had an amplifier for EEG once, the myoware one. 2 channels, but analog. Best thing would be something that wrote the data straight to SD card. Also I have no clue how to analyze the data, really.
Hi Anthony,
There are many related Forum posts when you search on this term, PSG,
https://www.google.com/search?as_q=psg&as_sitesearch=openbci.com
https://en.wikipedia.org/wiki/Polysomnography
https://www.spisop.org/openbci/
William
psg eh ok awesome thanks man
Hm, I don't need a full diagnostic test that can detect all kinds of pathologies. The sleep stages are generally distinguished by the EEG I think. And not all 8 electrodes are needed to do that. The main missing bit is the analysis software. I can handle some amplifiers and digitization and data logging although it's work I can do it.
Kinda crazy how often i find myself doing this. Trying to roll my own on an issue that frankly a lot of other people have too.
https://www.spisop.org/openbci/
Sigh. Certainly a leg up. Will investigate the analysis stuff he uses esp some time later.
I have some success in building at home "PSG sleep lab", you can read all details at my blog
https://blog.kto.to/hypnodyne-zmax-vs-openbci-eeg-psg
@max_eastwood, thanks for your great blog link with your Cyton sleep lab tutorial.
What headband or other means are you using to avoid the Ten20 paste drying out over night? There are other posts here on the forum with tips on minimizing evaporation losses overnight.
Sounds like your gold cups are working fine. There are also a range of plastic base 'disposable' cups using silver / silver chloride coating. I suspect these can be reused multiple times before coating starts to wear.
https://www.google.com/search?q=disposable+eeg+cup+electrodes
Regards, William
I'm not doing anything specific, just scoop enough paste, attach electrode with a bit of pressure and cover with two https://shop.greenteg.com/calera-core-body-temperature/arm-strap-for-calera-core/ (because one is too short, but 2 can be combined to be long enough) Also it is not hard to make diy velcro headband from something like this and just make holes for specific positions - https://www.amazon.com/dp/B0888NSZY3
Maybe high humidity in my room also help paste to dry slower.
I'm using goldcups, seems to be a bit more durable than silver ones with still good signal quality
One issue with gold cups is they can erode or chip over time, which then causes a 'galvantic' battery effect because the gold is plated onto tin.
The velcro you mention has separate hook and loop tapes. This is the one used by the OpenBCI headband kits and headbands sold by FRI. It is 'one' strap that adheres to itself. BUT... it is NOT flexible or elastic, it is rigid.
https://www.amazon.com/VELCRO-Brand-ONE-WRAP-Double-Sided-Multi-Purpose/dp/B000078CUB/
https://fri-fl-shop.com/collections/headbands-amp-fasteners-headbands
Ive tried openbci headband and its uncomfortable, its too firm. The ones that i've mentioned is comfortable for me for a full night of sleep, they can be precisely tuned to match head circumference and add just a bit pressure to keep electrodes in place. Inner side is soft, breathable, can be washed and sturdy enough for long term use. For sure it can be improved, but i dont see a reason to do anything because already satisfied with.
I also have Hypnodyne ZMax with elastic headband and dont see a big difference to non elastic one in terms of comfort and electrodes contact.
Thanks for info about gold electrodes, i will try silver ones in a future. There is old but i think still up to date topic about that - https://sleepreviewmag.com/sleep-diagnostics/in-lab-tests/polysomnography/electrodes/
Can you please point me to how data looks when galvantic' battery occurs?
Re: velcro one-wrap material does not stretch
This is exactly what is needed for the dry comb electrodes, because they need substantial skin pressure. Glad the flexible material is working out for you. Velcro also makes a stretchable loop tape. I use it with a small piece of One-Wrap hook tape:
https://www.google.com/search?q=velstretch+tape
re: galvanic
If the electrode turns into a little battery, you would see large DC offset and distortion in the non-DC portion.
Thanks, will try stretchable one in a future!
Still not understand what i will see in EEG signal as galvanic effect, it seems i dont have enought tech skills to understand what you have wrote
Maybe you have example plot of real data with it?
If the electrode has a chip in it, and becomes a battery, then the time series trace of that electrode will look substantially distorted compared to your 'normal' electrodes.
I'm thinking of buying a Muse 2, what do you guys think of it? It says you can get the data out of it, in some format. I don't know what the tools are to analyze the data. The main thing I think I need is to know the sleep stages. I will then correlate this with how refreshed I feel and try to identify what it is that makes me sleep better or worse, because it's not the standard things. Wearing different clothes has a huge impact, for instance.
Muse spectrograms from this blog doesnt look good for me. I have spectrograms from ZMax and OpenBCI and they a lot better, with cleaner signal and less noise. Also i have Muse S, i know it differs from Muse 2, but for me it is not comfortable, because electrodes require some pressure of the skin for good contact and this require headband to be tight which makes me feel uncomfortable after some time, but this maybe specific to me. Another issue for me is that i dont want bluetooth transfer data wirelessly near my brain whole night (i dont mind these wireless things until they transfer big amounts of data near my brain for long period of time) because muse do not have storage inside and sends data to the phone / laptop (which will also introduces a bit of samples lost, more than writing to sd).
Also if you want to "correlate" something you need to get some math statistics / data analysis skills before you do that, because there a lot of Quantified Self enthusiasts who dont understand what they are doing when they use correlation analysis which lead to misleading conclusions
If you know that wearing different clothes during sleep have huge impact you may not need an EEG device, because you already know that effect.
If you want to optimize your sleep, first thing i would do is to find your circadian night, because this seems to have a big impact on sleep deepness and quality / quantity, which is maximized when you sleep during your internal circadian night.
Small update on topic with sleep.
1) Here is firmware I've made for OpenBCI Cyton (recently i got Daisy and it also works fine) to write to SD with sample frequency more than 250Hz (500 - 1000Hz is working fine) and with flashing LED during SD write - https://github.com/roflecopter/OpenBCI_Cyton_Library_SD
2) I've updated scripts to start, save and process offline sd card recording sessions, they now work with both Cyton and Daisy and can build hypnograms / topomaps of relative band power, psd-frequency, slow waves (SW with count and amplitude for channel with most SW) and sleep spindles - https://github.com/roflecopter/openbci-session
Max, thanks again for your excellent contributions for using Cyton in PSG research. I just connected another sleep researcher to you on a separate Forum thread.
Best Regards, William