17 bit compression on Ganglion

edited May 2017 in Ganglion
Hi all,

I'm working on a P300 BCI with visual stimuli. The system is up and running on a laptop, and uses the OpenBCI Cyton. Now, I would like to switch to an Android tablet, and for this reason I'm thinking about using the OpenBCI Ganglion for BLE communication.

My problem is the following one: in order to synchronize the visual stimuli with the EEG data, I use a sensor and I send the sensor's signal together with the EEG data (as explained here). This way, each EEG sample is associated to a value of the sensor. With the OpenBCI Cyton, I had the possibility to use 6 bytes for AUX data, while, from what I understood from the documentation, with the Ganglion I can only use 1 byte when compressing data at 18 bit. But, in this way, I would only be able to have 1 sample of the sensor's signal every two samples of EEG data. Is it right? 

So, my idea was to decrease the precision to 17 bit, and use the remaining 16 bit to send two values of the sensor's signal, and have one value for each EEG sample: would it be possible? Has anyone ever tried to use 17 bit precision? 

An additional problem would be that every second, the Ganglion send uncompressed data: can I still send AUX data together with this data packet (I think that it is possible, since the data packet is of 12 bytes, and the available bytes are 20-1-12=7 bytes)?

Thank you!

Davide

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Davide, hi.

    Mentioning Joel @biomurph and AJ @pushtheworld; for their thoughts on the change in precision & AUX data.

    How are you planning to implement the BLE protocol on Android? Have you seen this thread? That may be the tougher challenge,


    William

  • Hi William,

    thanks for your reply. I saw that thread, as well as this one about the use of OpenBCI Cyton with an OTG for Android. 

    In the research lab where I'm doing my thesis they already developed an Android app that interfaces with Emotiv and EBNeuro, so our idea was to extend it to OpenBCI as well. For this reason, I thought that Ganglion would be the best solution because of BLE, but I need to be sure that I can use 17 bit compression before starting implementing the protocol. Do you think that Cyton+OTG would be easier for Android use?

  • wjcroftwjcroft Mount Shasta, CA
    Davide, hi again.

    My impression is that the OTG / D2XX route with Cyton will be easier. As the example code already exists at the link you mentioned. 

    Ganglion would be considerably harder as you'd have to do both: (1) alter the Ganglion firmware for your new resolution / compression scheme. (2) implement the complex Ganglion BLE stream decoding including your new compression scheme.

    Since you already have Cyton, just go with what's been done before. This Cyton OTG technique should also be compatible with the latest V2/V3 Cyton firmware; if you want to use that.

    William

  • William, thanks again.

    At the moment, I don't have any OpenBCI Board: I studied one year in Chicago and there I had the OpenBCI Cyton, while now that I'm back in Italy I need to choose which board to buy. That's why I'm trying to understand which board would be better for Android use. 

    I completely understand that Ganglion+Android would be harder, but it would have the advantage of BLE comunication, that Cyton doesn't offer. 

    Do you know if anyone, after @Florian, ever tried to use the Android app he developed?
  • wjcroftwjcroft Mount Shasta, CA
    The other way to go might be to get the Wifi Shield as an add-on to the Cyton. Then write the wifi code for Android. I'd still recommend getting the Cyton since it's serial protocol is MUCH simpler than the Ganglion. And is not bandwidth limited like the BLE link, requiring extensive compression.

    You can Private Message @florian by clicking on his name here. Or contact him through his Github.

    William


  • Yes, that could be another idea to exploit for Android communication. I think that I'll go with the Cyton and OTG approach, and if everything works then I'll try to use the WiFi shield (is it possible to buy it or you are still on beta testing?).

    Thanks again!

  • wjcroftwjcroft Mount Shasta, CA
    It's still in beta at the moment. Not sure when it will show up in the Store.
Sign In or Register to comment.