Can I use the GUI to change the analog chip's sample rate?

Hi all,

***************
Can the GUI be used to change the rate at which the Ganglion's A/D delivers data on its SPI channel? ("Serial1"?)

If so, "Extra Credit":  can the GUI be used to increase that rate to above 200 sa/s?
***************


My understanding is that:
-- The initial default per-channel sample rate is 200 sa/s.
-- I shouldn't expect the Bluetooth data path to support greater than 200 sa/s.

OK fine.  But what I'm wondering is something like:  
From within the GUI, using the Ganglion firmware as shipped, can I click-click, so that the A/D digital (SPI) output per-channel will be anything faster than 200 sa/s?
And if so, am I correct that there's nothing about the Bluetooth path that will, for example, flag some buffer over-run error and shut down the SPI communication?

(My plan is to ignore data thru the Bluetooth channel, but rather to get data by monitoring the SPI lines -- with all necessary care for patient safety/regulatory concerns).


Thanks! as soon as you're able to reply with what you know or speculate.  
Internally I'm getting some quite reasonable pressure to abandon Ganglion.
I still prefer remaining with Ganglion, but I'm running out of time, travelling after this week.
I have 2-3 other solutions up my sleeve, using Ganglion, but each has downsides and takes time to develop.
I haven't been exploring the GUI myself because a colleague has the Ganglion, but I may retrieve it today/tomorrow.
I'm a software novice, I wouldn't trust my ability to answer by looking at GUI source code.

      -- Bruce P.

Comments

  • bphomebphome home
    edited August 2017
    [original thread: "using SPI Interface for sample rate greater than 200 sps"]

    I hope I'm asking in the correct part of the Forum.  If not, feel free to move it and I imagine I'll be alerted or will otherwise find out where to pick up on it.

    Summary:  Can I use the GUI to cause the AFE to run at >200 sa/s, even if the bluetooth interface can't support that data rate being sent back to a PC/etc.?

    Details:

    I think I have a simple need.  From Ganglion, 
    -- I want only one channel.
    -- But I want sampling at more than 200sa/s ... probably at least twice that rate, but maybe ideally about 1Ksa/s .... well within the capability of the MCP3912 Analog Front End IC that's in Ganglion.
    -- I want guaranteed-minimum (tbd, couple ms??) latency from the time of a patient-delivered-signal, and the time that the 'smarts-system' detects the signal.

    I'm coming to understand this.  I can only receive (into a PC/etc) <=200sa/s when using the standard Bluetooth interface.  The limitation is substantially or solely due to the data rate thru the Bluetooth interface.  I don't know whether latency is or can be known as tightly as I want. 

    Meanwhile I'm starting to understand this.  I may be able to accomplish well over 200sa/s using a WiFi shield.  But to date it's not a released product, not yet a stable solution and in any case with (to me) unknown latency.  I haven't touched it, at least not yet.

    Instead, my plan is to do whichever of these is possible/feasible:

    #1)  Preferred.

    Snoop on the "Serial1" SPI lines (SCK, MOSI, MISO, maybe more), which I'll optically couple to ensure proper patient isolation.  Upon reset/powerup, a PC could, thru bluetooth, configure Ganglion (specifically the AFE for sample rate etc) to something like 1Ksa/s.

    #2)  Alternative.

    Not just snoop on the "Serial1" SPI lines, but in some way drive some of the AFE MOSI/etc lines to make the AFE run at 1Ksa/s or whatever; (I would cut or switch as needed, the SCK and MOSI lines in order to accomplish this).  Plus, monitor the SCK/MISO & any other necessary lines in order to read the EEG data.

    #3) Least desired alternative:

    Abandon the beloved Ganglion.  Modify an in-house-designed ECG device to work as desired for simple 1-channel EEG needs.

    Just a note about patient isolation:

    I definitely appreciate what may not be obvious to those unfamiliar with human patient-connected equipment.  There's a need to provide robust patient isolation -- high-voltage, low-current-leakage, long-term, cabling/etc arrangement-independent, creepage, clearance -- between patient-connected and earth/etc-connected circuitry.  In another forum section, for the BCI GUI, on 5/19/17, pushtheworld wrote that 'no one recommends this': 

    "Next concept: using Serial1 with an optoisolator hardwired to your laptop will support a higher sample rate. This can lead to shock if you hooked up wires incorrectly so no one recommends this. That's why the wifi shield is a big deal.... it uses SPI instead of UART which is much faster and allows for a much greater then 1kHz ..."

    When I say that I'll optoisolate Serial1, I'm saying I'll do that with the benefit of decades of design experience and, in approx the 1990s anyway, having been involved in generation of U.S. and European regulatory standards.  So in raising the idea of optoisolating the Serial1 (SPI) lines, I sure don't mean to do so irresponsibly or to recommend it to anyone else.

    Thanks so much for a response to the question that's in the "Summary" above!  An answer will change what I do next week.

              -- Bruce P.
  • wjcroftwjcroft Mount Shasta, CA
    Bruce, have you considered switching to Cyton and using the upcoming Wifi Shield to get your faster sample rates? No, this is not a simple matter of changing the GUI with Ganglion. Another tack with Cyton is to use a wired usb approach, see,


    William

    PS did I see from your email address that you work at NIH?? You guys should definitely be working with Cyton. It is much more capable with the ADS1299.

Sign In or Register to comment.