Steaming via Node.js [resolved]

edited December 2019 in Cyton

Hi, I'm new to OpenBCI board and I'm trying to use Node.js to live-stream data for a model to real-time categorize EMG data. When I use GUI, the graph looks very distinguishable that where the muscle is used and where it's not. But when I stream to node, all I got for each channel is a number that doesn't change much, and couldn't produce meaningful output. Did I miss some data processing steps? Should I stream the data directly from the board or via the GUI networking? Are there difference? Thank you so much!

Comments

  • wjcroftwjcroft Mount Shasta, CA

    John, hi.

    Are you interpreting the "number that doesn't change much", correctly? I thought the JS libraries are presenting values in Volts, vs Microvolts. So for example 20 microvolts would look like: .000020, a typical EEG value. Then 200 microvolts (more typical for EMG) would look like .000200. So these all look very small at first glance.

    Also with Cyton, there is a "DC offset" that is present on top of the incoming signal. This must be filtered off with a DSP digital signal processing filter. I'm sure Javascript has various DSP libraries available. A typical thing to do is either a high pass at say .5 Hz, or a bandpass from .5 Hz to say 45 Hz. (for EEG). For EMG you may want to go higher, say up to 100 Hz. Also the GUI uses both a bandpass and a notch filter at mains frequency. DC offset values are typically in the range of a few tens of millivolts. For example 10 millivolts in volts is: .010000. So since all your values are going to have a millivolt offset this slowly changing DC offset will be added to all the values you see.

    https://www.google.com/search?q=javascript+dsp+library

    Regards, William

  • @wjcroft said:
    John, hi.

    Are you interpreting the "number that doesn't change much", correctly? I thought the JS libraries are presenting values in Volts, vs Microvolts. So for example 20 microvolts would look like: .000020, a typical EEG value. Then 200 microvolts (more typical for EMG) would look like .000200. So these all look very small at first glance.

    Also with Cyton, there is a "DC offset" that is present on top of the incoming signal. This must be filtered off with a DSP digital signal processing filter. I'm sure Javascript has various DSP libraries available. A typical thing to do is either a high pass at say .5 Hz, or a bandpass from .5 Hz to say 45 Hz. (for EEG). For EMG you may want to go higher, say up to 100 Hz. Also the GUI uses both a bandpass and a notch filter at mains frequency. DC offset values are typically in the range of a few tens of millivolts. For example 10 millivolts in volts is: .010000. So since all your values are going to have a millivolt offset this slowly changing DC offset will be added to all the values you see.

    https://www.google.com/search?q=javascript+dsp+library

    Regards, William

    Hi William,

    Thank you so much for your help! This is really helpful!

    Best, John

Sign In or Register to comment.