Polysomnography Step 4: Recording!

Ok – I’m wired up, everything is connected to my Cyton board – the time has come to actually record something.

This is pretty much exactly the same process you use for any kind of Cyton activity, but I’m going to repeat the steps provided on the OpenBCI site for my own sake and to provide continuity. The only real difference here is that I want to make sure I’m recording to the SD card. Why? Well, the bluetooth connection is likely pretty good when you’re sitting still right in front of your computer. But unless your computer is right next to the bed, bluetooth is not likely going to cut it. And even if you do move your laptop to a bedside table, it only takes a momentary disconnection to ruin a night’s work. Recording to the SD card is a much safer bet, which is why the clever people at OpenBCI included the option in the first place!

The first thing to do is to prepare a micro SD card according to the suggestions on the OpenBCI tutorial. I then slip the formatted card into the Cyton board. Next, I plug in the USB bluetooth dongle, which allows the board to communicate with the computer. As always, the dongle must be set to “GPIO6”, not “Reset”. Next I turn on the Cyton board, and finally I launch the OpenBCI GUI. Launching the standalone version at this stage is fine, but later it will be necessary to run the GUI from within the Processing environment…

Initializing the GUI is straightforward: The Data Source is “Live from Cyton”, the “transfer protocol” is through the USB Bluetooth Dongle, the port is always the first one, the file name is a datestamp, and the channel count is 8. The only thing to add is the “Write to SD Card” option. This part requires a bit of thinking, because down the road it is necessary to get the data OFF the SD card, which isn’t quite as easy as it ought to be. Selecting a four hour recording is easier for the next step, and there is a higher chance that no electrodes will fail during only four hours. But obviously four hours is not a full night’s sleep, which means the only other option is to record for 12 hours. Incidentally, because of the way the Cyton records the data to the card, the file size for each time choice will always be the same – if you record for only 7 of the 12 hours, you still end up with the same “12 hour” file.

Now I can “start the system”. On occasion this simply fails, likely because of some sort of failed bluetooth communication. But it is easily remedied by repeating the process (or just turning the cyton off, then on and relaunching the GUI). Most of the time it works just great.

With the system launched, I can make a few changes to the setup. First off, I turn off all the channels I’m not using (6,7,8) – this is accomplished by just clicking the circled channel numbers such that they turn grey. I also set the filter to 50hz, because I’m in Europe where the mains operates at 50hz (the US is 60hz, the default setting). Technically I guess this doesn’t much matter, since I’m pretty sure the recorded data is unfiltered no matter the settings, meaning it needs filtering again when viewed later. But I do it anyway.

 I then go into the “hardware settings” and turn OFF the SRB2 reference for channels 1 and 2, which are my EOG and EMG channels. Since these are “bipolar” recordings (meaning, I think, that one is referenced to the other), I don’t want them having anything to do with my SRB Earlobe.

The SpiSOP guide also suggests turning off the “BIAS” for both of these bipolar channels. I either can’t remember, or never figured out why. I don’t think I ever turn off BIAS on my recordings. Perhaps someone can tell me why/if this step is necessary? I’m pretty sure I’ve read elsewhere that it is always a good idea to have a BIAS? Something to play with.

(Click to enlarge!)

Finally, I can start the data stream and start recording. The GUI should begin displaying the biodata being recorded as normal. Next I unplug the USB bluetooth dongle. This seems a bit weird at first, because obviously it kills the connection to the computer and the GUI stops doing anything. But the data is still being recorded to the SD card – meaning I can comfortably head to bed and pass out. The first few minutes of the recording are obviously a bit messy, owing to moving around and so forth. Also, I will sometimes tap an electrode with my finger 7 times, or blink seven times in quick succession (or instruct my subject to do so) right when the lights go out and sleep is about to commence. This, I hope, will give me a clear signal on the final result, and I can start scoring from there.

Hopefully no electrodes fail and some clean recording takes place!

admin