Today I worked with Karen Crow to help plan out how a sleep apnea prediction application would work. We worked out how to build from where we are now to a unified mobile application which would integrate the live data from the electroencephalogram along with the CO2 sensor through one connection, and accurately graph it, providing a user interface that can detect patterns in the data.
Here is our collaboration:
Dear Karen, -Intercepting the EEG data works by pairing the headset with the computer through bluetooth and the sending it to the developer application, which provides a live visualizer and saves it as a .muse log, which we will then find a way to convert to CSV.
-The data is .muse, and there should be a way to use the developer tools to convert that to .CSV.
-On the mobile application, we only get "concentration, and "attention" levels.
-The data is stored locally on the hard drive as an individual file per session.
-There is no notification that pops up with the EOG, but it can clearly be seen by looking at the change in the shape of the waves.
-Once the EEG data is converted to CSV, the timestamp should automatically be included, so graphing it alongside the CO2 data should not be difficult. However, getting the CO2 data itself is currently only possible on a computer, as it uses a USB connection, and we cannot forward that to a bluetooth connection, because devices can only pair with one other device as a time.
-Also, the CO2 data and the EEG data would be stored as two separate files, but with the same timestamp, unless we were able to physically engineer the CO2 sensor into the circuitry of the EEG, so that the data stream is embedded into the EEG data, but that would be unnecessarily complex.
-In terms of data encryption, CSV has no data encryption, but is useful because any graphing program can take it in as input. If we wanted to encrypt it, we could create our own proprietary file type, similar to the .muse, but would run into trouble analyzing the data unless we were to write our own graphing and analyzing programs from the ground up.
Ideally, we want a mobile application that connects through bluetooth to the device, captures the data, and provides an interface for viewing the data.
Currently, the CO2 only works on PC, needs USB, but the data is great, and exports as CSV. The Muse can connect to mobile devices, but the mobile applications are geared towards consumers and only show “concentration” and “attention” data. The Mac SDK however, can stream the live data from the paired device to a developer application that saves to a .muse file, which we will figure out how to convert to CSV, it will probably need another developer application made by Muse. Muse also provides a PC SDK, but I have not tested it out yet.
What we will need to do is choose one platform, and find a way to stream the data through one connection, as the bluetooth protocol can only pair with one device at at time. Thus, we would either have to build the CO2 data stream into the muse headset, so that the data is all through one paired connection. An alternative would be utilizing the micro usb connection on Android phones for the CO2, but we would need a proprietary cable for the Iphone. Streaming the raw data itself should be possible on any platform, once the connections are made, as an internal server would simply stream the live data to a specific port, and the EXG application could build up the analyzing interface from the ground up. However, this would loose all the benefits of having applications and developer tools premade for the hardware.
Right now, using a PC to run both the CO2 SDK and the Muse SDK can get data from the USB connection and the Bluetooth stream, which will be saved into individual CSV files on the local hard drive for each sensor.
However, This would require a PC, setting up the stream with developer tools, and manually analyzing the CSV data, which is not be ideal for the user.