Using a custom ESP32 / Ganglion board with serial connection to OpenBCI GUI
Hi all,
I am new to this forum, but have been reading for a while and working on a custom EEG Board, basically based on the Ganglion Board but without the simblee chip and an ESP32 instead.
I also ported the Firmware of the Ganglion Board so it works on the ESP32, yet I do not want to use BLE for data transmission but a wired connection instead, since my use case requires a stable connection in noisy (wifi and cell phone packed) areas, like a trade fair.
For simplicity I prefer serial over USB (a USB Isolator will be used for security reasons of course).
Now my question is basically how, if at all, can a custom board be used with the OpenBCI GUI via serial connection?
The GUI only Shows a selection of two boards for Live Data: Ganglion and Cyton. How can I add a custom board?
Even though I basically use the same firmware from the Ganglion with the same commands (e.g. b to start the data stream, 1-4 to deactivate channels, z for impedance test etc.) obviously the Open BCI GUI would expect a Ganglion board to be connected via BLE or with the Wifi Shield.
Is there any easy way to extend OpenBCI GUI to accept also other, custom boards?
Or am I looking in the wrong place and actually I need to create my own version of the Open BCI Hub?
But then again, how would I add a custom board to show up in the OpenBCI GUI?
Any help or link to further information on how to integrate/connect a custom board into the OpenBCI GUI would be highly appreciated.
Thanks a lot
Paul
Comments
Thanks for the link William,
I am still trying different approaches.
Modifying the Ganglion firmware to return a "$$$" terminated String when the v command is called via serial, allowed me to select the device in the Open BCI GUI and start connecting to the board via serial.
Starting the data stream works (b command) but unfortunately the ADC values from Cyton and Ganglion represent completely different values (the equations for both boards to convert the counts to milli volts are different due to the different hardware components). Thus even though I stream data in the cyton package format, it is not really creating a correct data stream to be visualized by the OpenBCI GUI.
Btw. the equation for the Ganglion board on the page https://docs.openbci.com/Hardware/08-Ganglion_Data_Format is not explained in a very helpful way. It simply refers to a part in the MCP3912 datasheet, which I could not find anywhere in the datasheet. There is a "table 7" mentioned which does not exist in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/20005348A.pdf), but no such table exists (only "TABLE 7-1" which refers to sampling speed). Maybe this can be corrected and the equation be explained a bit further for the sake of completeness. It seems the sentence with the reference to the datasheet has simply been copied from the cyton board (https://docs.openbci.com/Hardware/03-Cyton_Data_Format)
Also the equation just seems wrong somehow, since it consists solely of multiplications: 1.2 Volts * 8388607.0 * 1.5 * 51.0;
According to this formula the volts per count would be 770,074,122.6 (770 million volts per count!) for the ganglion board, while it is 0,000000022351744 for the cyton board (with a gain of 24), which seems like a more reasonable factor.
While trying to follow the manual to create your own firmware for the Ganglion Board I noticed, that the Simblee Chip used on the Ganglion board is not manufactured anymore, which unfortunately also includes, that the manufacturer took down the site that is linked in the Simblee Quick Start Gudie that is linked in the Ganglion Board programming tutorial (https://docs.openbci.com/Hardware/09-Ganglion_Programming_Tutorial)
In the "What You Need" section. So it was not possible for me to download the actual Simblee Library that is needed to compile you own Ganglion firmware. If there is an alternative download link it would help users to list it in the manual and maybe also update the link to the Simblee Quick Start Guide.
Just my two cents on my experience with working with the two boards (or their firmware) so far, maybe it helps other used too