This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1299 EVM Board single-ended measurement set up

Other Parts Discussed in Thread: ADS1299
This question is regarding the ADS1299 Evaluation Modules. I am successfully getting 2 channel differential measurements with  bias drive electrode. The register set up for this measurement is as follows:
 
  ads_wreg(CONFIG1, 0x95);
  ads_wreg(CONFIG2, 0xC0);
  ads_wreg(CONFIG3, 0xEC); // Sets BIASREF signal sorce to (AVDD - AVSS)/2 
  ads_wreg(LOFF, 0x00);
  ads_wreg(CH1SET, 0x60);
  ads_wreg(CH2SET, 0x60);
  ads_wreg(CH3SET, 0x60);
  ads_wreg(CH4SET, 0x60);
  ads_wreg(CH5SET, 0x60);
  ads_wreg(CH6SET, 0x60);
  ads_wreg(CH7SET, 0x60);
  ads_wreg(CH8SET, 0x66); // sets this channel the bias driver. Right leg driver
  ads_wreg(BIAS_SENSP, 0x0C);
  ads_wreg(BIAS_SENSN, 0x0C);
  ads_wreg(LOFF_SENSP, 0xFF); // Sense bias from channel 3 & 4
  ads_wreg(LOFF_SENSN, 0xFF);
  ads_wreg(LOFF_FLIP, 0xFF);
  ads_wreg(LOFF_STATP, 0x00); 
  ads_wreg(LOFF_STATN, 0x00);
  ads_wreg(GPIO, 0x00);
  ads_wreg(MISC1, 0x00);
  ads_wreg(MISC2, 0x00);
  ads_wreg(CONFIG4, 0x00);
 
A soon as I try to make single ended measurements, I am having trouble acquiring the ECG. I would like to get data from 3 channels, all single-ended measurments, with respect to a reference electrode and also a Bias Drive electrode connected to the right leg. 
 
 ads_wreg(CONFIG1, 0x95);
  ads_wreg(CONFIG2, 0xC0);
  ads_wreg(CONFIG3, 0xEC);
  ads_wreg(LOFF, 0x00);
  ads_wreg(CH1SET, 0x60);
  ads_wreg(CH2SET, 0x60);
  ads_wreg(CH3SET, 0x60);
  ads_wreg(CH4SET, 0x60);
  ads_wreg(CH5SET, 0x60);
  ads_wreg(CH6SET, 0x60);
  ads_wreg(CH7SET, 0x68);
  ads_wreg(CH8SET, 0x66);
  ads_wreg(BIAS_SENSP, 0x0E);
  ads_wreg(BIAS_SENSN, 0x0E);
  ads_wreg(LOFF_SENSP, 0xFF);
  ads_wreg(LOFF_SENSN, 0xFF);
  ads_wreg(LOFF_FLIP, 0xFF);
  ads_wreg(LOFF_STATP, 0x00);
  ads_wreg(LOFF_STATN, 0x00);
  ads_wreg(GPIO, 0x00);
  ads_wreg(MISC1, 0x20);
  ads_wreg(MISC2, 0x00);
  ads_wreg(CONFIG4, 0x00);
 
For my single-ended measurement the register changes are as follows:
 
CH7SET is set to 0x68, as I set this channel to be my reference electrode, changes the the SRB2 bit to 1
 
MISC2 register that sets the SRB1 bit to 1 which connects all the inverting inputs to SRB1 (needed for single ended measurements)
 
I have played a little with the jumpers to no avail. Page 17 of the manual says to short pin 5 and 6 of JP25.  In addition in page 34, it states the the EVM needs to have pins 2 and 3 of JP7 and JP8 connected . Is there any other jumper that I am not taking into account? Could it be a problem with the registers? If anybody successfully managed to perform this kind of measurement please share your set up with me.
Kind regards,
Joaquin 

 

  • I have doubled checked my registers multiple times and I think they are not the problem. I am not entirely sure about the jumpers. Could anybody tell me the right position of the all the jumpers for a single ended measurement?

  • Hi Joaquin,

    Your jumper settings sound correct; however, I should point out that since you are taking Channel 7 positive (IN7P) to be your reference electrode, you do not need JP25 [5-6] connected. The intention of JP25 [5-6] is to connect BIAS_ELEC (the output of the BIAS amplifier) to REF_ELEC, which could then be buffered by U4 or routed directly to SRB1. Instead, you are replacing REF_ELEC with IN7P and that's ok.

    Is the Channel 7 electrode separate from BIAS_ELEC? I do not believe the same bias signal that drives the patient is commonly used as the reference for single-ended measurements.

    What do your input and output waveforms look like? Try testing your setup with a small 1kHz sine wave input (maybe +/- 50 mV) and probe the SRB1 and SRB2 pins.

    Regards,

  • Hi Joaquin sanchez, 

    I'm trying to do the same work measurement, however unsuccessfully. I wish I could see your code and how to use this microcontroller to obtain the data.

     

    Best Regards...

  • I'm trying to get data from the ADS1299 starting the teensy 3.1 device, I can write in the registers successfully, however when I RDATAC to get the values ​​I am not getting correct data, after that I see the values ​​of the registers again and are not as configured by I previously.

    the code to WREG and rreg is as follows (teensy):

    if ((val >= 0x20) && (val <= 0x3F)) { //RREG (Read register) command
    for (int i = 0; i < 10; ++i) if (Serialavailable(serialNum) < 1) delay(1);
    if(Serialavailable(serialNum) < 1) return;
    unsigned char numSerialBytes = Serialread(serialNum)+1;
    digitalWrite(IPIN_CS, LOW);
    SPI.transfer(val);
    SPI.transfer(numSerialBytes-1); // number of registers to be read – 1
    unsigned char serialBytes[numSerialBytes];
    for (int i = 0; i < numSerialBytes; ++i)
    serialBytes[i] =SPI.transfer(0);
    delayMicroseconds(1);
    digitalWrite(IPIN_CS, HIGH);
    switch (serialNum) {
    case 1:
    Serial1.write(serialBytes, numSerialBytes);
    Serial1.flush();
    break;
    default:
    WiredSerial.write(serialBytes, numSerialBytes);
    WiredSerial.flush();
    }
    return;
    }
    if ((val >= 0x40) && (val <= 0x5F)) { //WREG (Write Register) command
    for (int i = 0; i < 5; ++i) if (Serialavailable(serialNum) < 1) delay(1);
    if(Serialavailable(serialNum) < 1) return;
    unsigned char numSerialBytes = Serialread(serialNum)+1;
    for (int i = 0; i < 5; ++i) if (Serialavailable(serialNum) < numSerialBytes) delay(1);
    if(Serialavailable(serialNum) < numSerialBytes) return;
    unsigned char serialBytes[numSerialBytes];
    for (int i = 0; i < numSerialBytes; ++i) serialBytes[i] = Serialread(serialNum);
    digitalWrite(IPIN_CS, LOW);
    SPI.transfer(val);
    SPI.transfer(numSerialBytes-1); // number of registers to be written – 1
    for (int i = 0; i < numSerialBytes; ++i) {
    SPI.transfer(serialBytes[i]);
    delayMicroseconds(1);
    }
    digitalWrite(IPIN_CS, HIGH);
    }//if WREG
    }

    To view the data I am using the following code developed in python:

    import serial
    import numpy
    import time
    import sys, time, datetime, base64
    canais=8
    shift=0
    tempo=0.1
    total=numpy.zeros((canais, 1),dtype=long)
    resultados=numpy.zeros((canais, 1),dtype=long)
    #############################################
    f = open('C:\pythonDados/workfile.txt', 'w')
    ser = serial.Serial(port='COM106',baudrate=115200, timeout=2)
    print("using device: %s" % ser.portstr)
    print "configurando"
    ser.write("\x11")
    ## WREG
    ##ser.write("\x41\x03\x1E\x90\xD0\xE8")
    ##ser.write("\x45\x07\x00\x00\x00\x00\x01\x01\x01\x01")
    ##ser.write("\x55\x00\x20")
    ## end WREG
    ##  RREG
    ##ser.write("\x20\x19")# 
    ##
    ##
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ##print "{0:b}".format(int((bin(ord(ser.read()))),2))
    ## end RREG
    print "config"
     
    ser.write("\x10")
    print "feito"
    while True:
        dadosN=ser.read()
        if ( int((bin(ord(dadosN))),2)&0b11110000)==0b11000000:
            for i in range(0, canais):
                resul=0
                resul=int((bin(ord(ser.read()))),2)  
                resul=resul<<8|int((bin(ord(ser.read()))),2)
                resul=resul<<8|int((bin(ord(ser.read()))),2)  
                
                            
                resultados[i,0]=resul
    ##            f.seek(f.tell())
    ##            f.write(str(bin(resul)))
    ##            f.write('\n')
    ##            print bin(resul)
            total = numpy.concatenate([total,resultados], axis=1)
      
            print total[0:1,len(total[0])-1]
            
        #else:
            #print "Falhou"
              
        f.seek(f.tell())
        f.write(str(total[0:canais,len(total[0])-1]))
        f.write('\n')