Cyton 8-bit, TouchDesigner app, OSC streaming issues
I'm working with an old Cyton 8-bit board. When setting the OpenBCI GUI to OSC stream mode, I am seeing duplicate channel data for channels 7 and 8. I tried each channel pin to make sure only one pin was connected at a time, and only channel 7 and 8 do this.
Has anyone else ever seen this?


Comments
Shiva, hi.
As you know, the ATmega-based 8-bit processor 'Cyton' board is no longer sold, and the firmware was frozen. It dates from around 2015. It has none of the bug fixes or vast number of improvements / upgrades that occurred for the 32-bit PIC32 based Cyton's, in versions 2 and 3 of the firmware.
https://docs.openbci.com/Cyton/CytonSDK/#firmware-v200-new-commands
Among the other bugs that the 8-bit firmware had, were random 'freeze-ups' that required power cycling the board to reset. These typically occurred within a half-hour or hour of starting a session. Sometimes sooner. All this was fixed on the PIC32 with AJ Keller's later firmware releases.
I would not be surprised that various other bugs are present in the ATmega firmware. And because of ATmega firmware size constraints and architecture limitations , the PIC32 firmware cannot be back-ported to ATmega. My suggestion would just be to see what workarounds you can devise to side-step the issue. Such as utilizing fewer channels.
It appears you are using 'neuromore'? Does it operate any differently when accessing the Cyton element block directly from inside neuromore, via the new Brainflow integration? Why are you routing through the GUI?
Best regards, William
Hi William,
I'm actually not using Neuromore, but I can see why you might think that. I'm using Touchdesigner, which I am pretty sure pre-dates Neuromore by about a decade. It looks very similar! :-)
I read up on Neuromore briefly last weekend, but haven't tried it because for my specific experiments, I needed the BCI data to be in Touchdesigner. I have other tools and ideas already built there over the last year. I have been able to access BCI data from TXT files read back into Touchdesigner. But today I tried OSC because Touchdesigner has built-in OSC I/O operators. It can also do LSL, but I have not achieved that here yet.
As for why I am using the Open BCI GUI... right now I'd say I am running it reluctantly because I haven't gotten far enough with my Python skills to get either raw data or LSL directly from Python. Touchdesigner runs Python, so it's a perfect match. But the mechanics take time. More so with my buggy 8-bit board!
I have started a playlist of videos here:
Jeremy / Shiva, thanks.
Yeah looks interesting. There are many VPL (visual programming languages) that can work with Cyton DIRECTLY (these understand the Cyton serial port protocol):
The first five on that list are specifically geared to working with EEG / neurofeedback / BCI data streams. And the first three are free open source. If you have a university email, NeuroPype is also free. LabView is widely used in research labs and has powerful signal processing operators.
Regards,
GUI Networking Widget sends out FFT data over OSC sequentially by channel, since there are something like 125 "bins" per channel.
https://docs.google.com/document/u/1/d/e/2PACX-1vR_4DXPTh1nuiOwWKwIZN3NkGP3kRwpP4Hu6fQmy3jRAOaydOuEI1jket6V4V6PG4yIG15H1N7oFfdV/pub
So it would send out the following as separate OSC messages:
Something on your receiving end is thinking about receiving 10 channels, which is why 7 and 8 appear at the top duplicated.
In reality, all channel FFT data is sent one at a time in sequence. Though, I would recommend using BandPower datatype over OSC for your project. The reason is that these bins in FFT don't equate directly to a Hz (aka bin 10 is not === 10.0Hz". The BandPower widget and datatype already do the hard work to sort the FFT by band power. So instead, you would get 5 numbers (one value for each band power) for every channel, again sent out sequentially. This info is also in the Data Output spreadsheet I have just shared the link for. I understand though if you would like to stick with FFT to recreate another visual aesthetic for the data.
@retiutut Thank you for pointing this out. I confirmed that I had one element in my setup that was looking for 10 channels, and once that was fixed, I got the channels to line up. So it was not an OpenBCI bug as previously stated by William. I also tried the Bandpower option and have a working example.
And in case anyone is wondering, I am aware of Neuromore, and though I have not tried it, my current design approach is to not use any other GUI apps. I wanted to get away from any of those and just run with the raw data from the board. I realize that this approach may be more difficult, but also helps me understand more about what is happening instead of the constant black box of one of the GUI programs hiding what it is doing.
I am working on a project that requires pulling OSC data from OpenBCI GUI into TouchDesigner.
Using OSC
I tried streaming both Band Power and Focus via OSC. TouchDesigner either crashes or hangs immediately whenever I try to read Band Power as "OSC In" stream from OpenBCI. The OSC Focus stream does not crash that easily but TouchDesigner becomes very laggy after a couple of minutes.
Using UDP
When I switch to "UDP In" instead, TouchDesigner runs smoother for a couple of minutes before it starts lagging and eventually hangs.
About Channel 7 & 8 (Time Series, OpenBCI GUI)
No matter how I re-calibrate the Gain under "Hardware Settings", by reducing gain from x 24 to x 1, Channel 7 & 8 go into Railed mode after running for about 5-10 minutes. Further to this OpenBCI GUI Time Series readings becomes stagnanted (does not change) after half hour of usage.
Seeking any advice or suggestion on working with OSC, UDP or any other network protocol with TouchDesigner.
Would be grateful for any advice on how to debug Channel 7 & 8.
Thanks in advance!
Points 1 and 2 seem out of our hands as this is a third party application. The networking widget output guide is the source of truth as to what the GUI sends out over every protocol.
Point 3 has to do with the quality of the connections to the subject via electrodes and reference electrodes (earflaps), and there does not seem to be any problem with the GUI or hardware.
Overall, I have tested OSC extensively for many years using the GUI using Max/MSP, and it is a stable means of streaming data indefinitely without any lagging or crashing of the GUI application. You may be experiencing a limitation of TouchDesigner in how the messages are formatted from the GUI. This is something that could be changed by you since the GUI is open-source, but at this time the message formats make sense for most applications.
https://docs.google.com/document/u/1/d/e/2PACX-1vR_4DXPTh1nuiOwWKwIZN3NkGP3kRwpP4Hu6fQmy3jRAOaydOuEI1jket6V4V6PG4yIG15H1N7oFfdV/pub
Take Care,
RW
Hi @retiutut
thank you for your reply.
I managed to solve Point 1 & 2 by using an OSC CHOP rather than OSC DAT in TouchDesigner.
Point 3 - I tried damping my earflaps with some water and it did improve the connections and readings.
I've a question regarding reading the band power OSC Data from OpenBCI GUI
I managed to export the band power data into CSV giving values as show below:
1,11.5352,19.0529,10.3015,29.9796,1875.77
from the networking output guide it states:
Channel Number followed by floats for each power band: Delta, Theta, Alpha, Beta, Gamma, sent sequentially
Can I confirm that the decimal numbers for each band power represents the microVolts value?
If so, how do I convert the microVolts to Frequency?
For example from the above CSV
Alpha (7.5 - 13 Hz) is giving me a reading of 10.3015. How does this value translate to Hz?
I saw some of your other threads explaining the conversion using python to stream in live data. Unfortunately, my knowledge of python is very limited and I did not quite understand the comments.
I do use processing, can I do a map() function for conversion to re-map a number from one range to another.
thanks so much again.
@lei The BandPower values represent uV*2 / Hz as "Power". So for the Alpha Band, 10.3015 represents the average amplitude of the group of frequencies between 8-13 Hz.
I understand how this could be difficult to translate into touchDesigner as the values sent are not "normalized" between 0 and 1 as a float, or decimal value. You are correct that you could use an "in-between" app/process to accept the values from the GUI and map() from 0-100 to 0-1. This is precisely what I did before using OpenBCI GUI -> MaxMSP (do the mapping here to normalize values as needed) -> Resolume Arena (for live visuals). Sometimes other programs/hardware may expect 0-255, 0-1024, and even others 0-1.
An app called PureData is the free and open-source equivalent of MaxMSP.
Another potential fix is to add normalized band power data as an output from the Networking widget, which could help many users in just such a scenario as this.
Thank you for asking about this so that we can consider what can work for you and also the global OpenBCI Community.
Let me know your thoughts on what I have shared.
Hope this helps,
RW
@retiutut
this is my OSC data collected of bandPower

I have only turn on Channel 1, 2, 7, 8 on OpenBCI GUI
Question #1

Is that why the other Channels such as 6, 3, 4 are returing weird values like 7.68001e-05
Whereas Channel 7 is returning values like 5.02879
Question #2
However, why is the Gamma at such a high value of 5585.2 even thought Gamma range should be between 32 - 100 Hz according to the type of waves documentation
Question #3
does it mean all the values of each band power is representing Hz and NOT uV?
which means
Channel = 7
Delta = 5.02879 Hz
Theta = 10.1274 Hz
Alpha = 4.987095 Hz
Beta = 7.02155 Hz
Gamma = 5585.2 Hz
I am really a newbie to OpenBCI hence understanding the OSC bandPower is really something I am still confused about.
Thanks so much again!
Found this while researching https://raphaelvallat.com/bandpower.html

Question #1
Does each bandPower value which I recorded from OpenBCI OSC output represents Absolute power?
meaning my Absolute Delta Power = 5.02879 uV^2
Question #2
Should I convert my Absolute Delta Power to Relative Delta Power to retrieve it as a percentage of the total power of the signal so that I can get a general sensing of which bandPower is dominating currently?