Teensy based ADS1298 EMG acquisition board

edited June 2016 in Other Platforms
Hey all,

I recently finished a university project where I had to design a Bluetooth Low Energy connected EMG acquisition system. It is based on a nRF8001 breakout by Olimex and the Teensy 3.1.

For the analog front-end I chose the ADS1298. I adapted Conor's library for the ADS129X family and added an interrupt driven data retrieval mode. In interrupt mode I can now reach 8 kSPS while transferring the data for all 8 channels via USB to a PC. The next bottleneck I have to tackle is the Teensy's slow SPI speed when using the standard Arduino library. I'll probably add DMA support at some point in the future, that should unlock the full 32 kSPS of the ADS1298.

You can find my code at https://github.com/ferdinandkeil/ADS129X. The included sample sketches assume you're using a Teensy 3.1. I'm still working on the Python script that the receives the data on the PC side. Right now it writes the data to a multi-channel wav file, however I'll add HDF5 and CSV output options soon. I'll let you know when I've uploaded the code to Github.

-Ferdinand

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Ferdinand, that's an impressive data rate.

    Feel free to post a photo link, or you can put photos right in line here.  Folks might also want to see a link to your university project report, maybe that's all on one site.

    Regards,

    Wiliam
  • image
    The circuit board for the BTLE based EMG acquisition system.

    You can see a picture of my circuit right above. As for the report you can either read it online here or download it in PDF format from here. I don't know a lot about biopotential measurements so I focused on the hard- and software part. However the tests I've done so far with the circuit look promising.

    The whole thing runs of a single cell LiPo battery. I'm using a battery with integrated protection circuitry, however there also is some protection on the board as well as a charger. The ADS1298 gets fed a bipolar +-2.5 V supply. The negative voltage is generated by a charge-pump inverter. The board used is 4-layers.

    Best,

    Ferdinand
  • That's a nice looking piece of hardware!

    Chip
  • biomurphbiomurph Brooklyn, NY
    Very nice! 
    Can you confirm that the input referred noise is as good as the DS says it should be?
  • I gave the device away and I didn't measure it before. I'll keep you posted when I come around to building a second one.
  • Hi ferdinand! Could you please share your schematic for omg measuring? Or could you help me to understand how to connect RLD (common reference electrode)
  • wjcroftwjcroft Mount Shasta, CA
    Here is @ferdinand 's blog site and project page,



    ----

    @Klaxons, hi. RLD is the 'ground' connection for EEG / EMG / ECG. It centers the differential amplifier so it stays within range. On OpenBCI that pin is labeled 'Bias'. RLD/Bias also injects a small amount of out of phase / common mode 'noise' cancellation. On OpenBCI, the default channel setup uses IN1N through IN8N as the 8 channels and SRB2 as the reference. So the differential amp is between SRB2 and the IN*N pins.


    William

  • Thank you William. Should I connect RLD to INxN? And can I measure EMG and ECG (hear rate) at the same time? I'm watching lots of schematic for ads1298, all of them have different connections and can't realize what is correct, do you know EMG and ECG schematics are the same?
  • wjcroftwjcroft Mount Shasta, CA
    EEG, EMG, and ECG can all have similar connections. That is, a common reference (SRB2 is our default), and individual channels (IN*N on OpenBCI). The Bias / RLD is a separate pin, no you do not connect it to one of the IN*N pins. It is a separate electrode on the body.

    Yes you can do EEG, EMG and ECG all at once, see Conor's tutorial,

    http://docs.openbci.com/tutorials/01-GettingStarted#getting-started-w-openbci-v-connect-yourself-to-openbci

    When setting up simultaneous EEG, ECG, etc. -- the non EEG signals are removed from the common reference. See the tutorial. Each channel on the ADS has a plus and minus pin. So can operate as an independent differential amplifier, not connected to the common reference SRB2. You have to configure this with the Chan Set tab, see the tutorial.

  • The schematic uses 2 stage low-pass filters (looking at the picture, R is equal 2.61kOhms, what is the value of capacitor?) And can I use 1 low-pass filter (I looked at OpenBCI schematic, they use 1 low-pass filter with 2.2k of Resistor and 1nF (1000pF))

    So, and my question about RLD,

    I have to connect RLDOUT to RLD electrode (with low-pass filter and ESD protection such as channel's pins), I connect RLDIN to RLDINV via 1M resistor and 1.5nF capacitor, which are connected in parallel way, RLDREF to AGND and WCT via capacitor to AGND too. Am I right?

  • wjcroftwjcroft Mount Shasta, CA
    You only need a 1 stage low pass with the ADS1299 or 1298. I guess Ferdinand was just being conservative. Both these chips have built in Sinc filters, they are delta-sigma converters.

    I'm not sure about the 1298 RLD chip connections, they apparently differ from the 1299, whose pins have various BIAS_* labels. 1299 is more geared for EEG + ECG + EMG. 1298 is not EEG. You can try messaging @ferdinand by clicking on his name and using the Message button there. TI also has an excellent E2E forum for questions.

  • Hi...i am a new user here. As per my knowledge RLD is the 'ground' connection for EEG / EMG / ECG. It centers the
    differential amplifier so it stays within range. On OpenBCI that pin is
    labeled 'Bias'. RLD/Bias also injects a small amount of out of phase /
    common mode 'noise' cancellation. On OpenBCI, the default channel setup
    uses IN1N through IN8N as the 8 channels and SRB2 as the reference.
Sign In or Register to comment.