integrate HEG data with typical Cyton inputs like EEG or ECG ?

edited June 2021 in Cyton

Hello, my question is just the post title. I know the answer may not necessarily be to send the HEG data directly to the board, but maybe use some trickery in BrainFlow or something else. I'm not even sure if there's a way to connect the two devices. I know both devices generate CSV files, and as kind of a noob to this kind of customization, I wondered if any of the pros had any suggestions. Past posts on the topic were either years old or unresolved. Thank you!

Comments

  • wjcroftwjcroft Mount Shasta, CA
    edited October 2022

    Hi Seventh,

    The HEG data stream changes much more slowly than either ECG or EEG. Although the analog to digital converter on HEGduino V1 or V2 runs fairly quickly, in reality meaningful changes only happen over a matter of seconds. So even a 'reduced' sample rate of 1 or 2 samples per second would capture the very slow increases / decreases that happen over time. This is assuming that some type of running average of the data is performed. This would filter out noise jitter that may happen at higher sample rates.

    For a program streaming your Cyton data in realtime, the recommended approach is to use Brainflow, in the language of your choice, for example Python. Examples are shown on the Brainflow site and docs pages.

    Best way to integrate HEG data with typical Cyton inputs like EEG or ECG? I know the answer may not necessarily be to send the HEG data directly to the board, but maybe use some trickery in BrainFlow or something else. I'm not even sure if there's a way to connect the two devices. I know both devices generate CSV files...

    No, the approach would not be to send HEG data to the Cyton board (too unwieldy), nor to use CSV files, because the latter is not optimal for real-time streams.

    It appears from the HEGduino pages, that most of their apps are geared to running as web apps. And these web apps read data streams from the device. If you want to write (for example) a Python program that takes realtime data from both Cyton and HEGduino, then I would suggest posting on the HEGduino forum site,

    https://www.hegalpha.com/forum/software-development

    And ask how you would open a connection to the HEGduino from Python. This should be straightforward. I seem to recall that one of the modes the HEGduino supports, is to output the data stream to a usb serial port. Thus using a multi-threaded Python approach, you could simultaneously read both the Cyton Brainflow stream, and the HEG stream simultaneously.

    Note that Josh is now taking orders for a V2 version. And this likely has more capability than V1. But I'm sure both would support access from Python.

    https://github.com/joshbrew

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    At some point there may be an official Brainflow interface to HEGduino / V1 / V2 directly. But I don't see it currently on the list.

    https://brainflow.readthedocs.io/en/stable/SupportedBoards.html

  • Thank you, this is very helpful. Now I at least know the general approach to making this work. I've also been in communication with Josh who gave me some things to try.

  • wjcroftwjcroft Mount Shasta, CA

    I think you will want to do your own moving average on top of what he is doing. For example to reduce the effective sample rate to only a few Hz. Some screenshots he shows depict a fairly noisy trend graph:

    https://static.wixstatic.com/media/dffc12_12e6a2d47cbe4fc6923cb952db9bc180~mv2.png

    The spikes and "white noise" shown there is not real HEG movement, but rather an artifact. Your own running average will smooth that out to see the only real changes that happen very slowly.

  • also curious about HEG and nIR sensing in OpenBCI
    HEGduino 2.0 is on back-order not currently available
    the classic Toomlin HEG band is available, but in the context of a closed product ( with third party amplifier )
    https://brain-trainer.com/product/nir-heg-headset-bundle/
    anybody using HEG/nIR in a open system?
    thx S

  • wjcroftwjcroft Mount Shasta, CA

    Josh Brewster's projects are available on CrowdSupply (they were listed in the OpenBCI Shop for a period, but not currently.)

    I believe the V1 HEG is still available:

    https://www.crowdsupply.com/alaskit/hegduino

    And the V2 shows shipping soon. I'd check with Josh to ask if V2 is expected to ship in 2022.

    https://www.crowdsupply.com/alaskit/hegduino-v2
    https://www.hegalpha.com/
    https://github.com/joshbrew

  • I was not able to add v1 to cart at crowdsupply, however the v2 claims to be shipping in just a few days so I ordered one of those, will give it a try
    thx!
    S

  • wjcroftwjcroft Mount Shasta, CA

    Still recommend emailing Josh to ask availability and ship date for v1 and v2. His email is listed on the Github link above. Also note that it is not unusual for Kickstarter or CrowdSupply creators to be over-optimistic about their projected timelines. Sometimes off by months or even a year. That was certainly the case with OpenBCI Kickstarter campaigns.

Sign In or Register to comment.