• Resolved

ADS1298R: Data converters forum

Prodigy 150 points

Replies: 11

Views: 137

Part Number: ADS1298R

We are planning to use ADS1298 R in one of our medical device, which is in design stage now.
Before finalizing the final design we conducted few experiments with the device.
 
In one of the experiment, we have provided output of cardio simulator as input to ADC channels of ADS1298.
we have interfaced ADS1298 AFE board with STM32L4R9I controller through SPI. SPI  working was verified by writing and reading back ADS1298 registers.
 
I captured ADC data and tried to plot it, to my surprise I got irrelevant waveform which doesn’t have any pattern/periodicity.
When I go back and check the ADC values captured through SPI reading were varying abruptly, same was not the case with ADS1298R PDK.
I am not sure why this was happening.
 
I am debugging this issue from past 15 days and yet to resolve it. Anticipating quick support on resolving this issue.
 
Below is the waveform plotted for ADC data read
 
Below is the expected waveform
 
 
Below is the register configuration used
 
ADS1298 PDK register configuration
 
conf|config1      0x01      0x86
conf|config2      0x02      0x10
conf|config3      0x03      0xDC
conf|loff             0x04      0x03
conf|ch1set       0x05      0x00
conf|ch2set       0x06      0x00
conf|ch3set       0x07      0x00
conf|ch4set       0x08      0x00
conf|ch5set       0x09      0x00
conf|ch6set       0x0A     0x00
conf|ch7set       0x0B      0x00
conf|ch8set       0x0C      0x00
conf|rldsensp   0x0D     0x00
conf|rldsensn   0x0E      0x00
conf|loffsensp  0x0F      0xFF
conf|loffsensn  0x10      0x02
conf|loffflip       0x11      0x00
conf|gpio           0x14      0x00
conf|pace          0x15      0x00
conf|resp           0x16      0xF0
conf|config4      0x17      0x22
conf|wct1          0x18      0x0A
conf|wct2          0x19      0xE3.
 
ADC data read function : it reads first 24 bits status information followed by 24 bit ADC data of 8 channels.
 
for(i = 0; i < 3; i++){                                      //  read 3 byte status register (1100+LOFF_STATP+LOFF_STATN+GPIO[7:4])
                             inByte = transferSPI( 0x00);
                             stat_1 = (stat_1<<8) | inByte;                                               
              }
              cnv_cnt = 0;
              for(i = 0; i < 8; i++)
        {
      //    HAL_GPIO_WritePin(ADS_CS_GPIO_Port,ADS_CS_Pin,GPIO_PIN_RESET);
                                           inByte1 = transferSPI( 0x00);
                   //     HAL_Delay(50);
                                           inByte2 = transferSPI( 0x00);
                      //  HAL_Delay(50);
                                           inByte3 = transferSPI( 0x00);
                      //  HAL_Delay(50);
                            
                             //adc_cnv_data[cnv_cnt++] = (inByte1 << 16) | (inByte2 << 8) | inByte3;       
                        
               adc_ch8_data[i][temPcnt] =   ((inByte1 << 16) | (inByte2<<8 ) | inByte3);       
                            
              }      

  • In reply to pvb chary:

    Hello PVB,

    Welcome to our forum and thank you for your post.

    It's possible that the SPI data is changing abruptly because the data is getting corrupted. This can happen if you are not monitoring the /DRDY pin, which indicates when new data is available. If another /DRDY falling edge occurs while you are reading the previous sample, the data will be overwritten immediately. Each SPI data read transaction (from /CS = 0 to /CS = 1) must occur between /DRDY falling edges.

    Best regards,


    Ryan Andrews

    Applications Engineer | Precision ADCs 

    Are you working on a bio-potential application? Check out these helpful resources: ADS129x BIOFAQ | ECG Online Training

  • In reply to Ryan Andrews:

    Hi Ryan,

    Thanks for your quick response.

    let me explain you the scenario, I have connected 1.5V  battery at JP32 (LA,RA) terminals, I was expecting to read constant ADC value but this didn't happen.

    the values are changing 

    procedure

    I was making start pin go high wait for 1msec, then making start pin low then I will poll for dataready pin status, if its low, STOP command is sent then ADC data is read.

    let me know if this is the right procedure or not if it is right then where could be the issue.

    below is the sample code for reference.

    while(1)

    {

    if((HAL_GPIO_ReadPin(GPIOG, 13))==0) //Dataready port pin

    {
    ADS_STOP();
    ADS_RDATA();


    HAL_GPIO_WritePin(GPIOI, ADS_START_Pin, GPIO_PIN_SET);
    HAL_Delay(1);
    HAL_GPIO_WritePin(GPIOI, ADS_START_Pin, GPIO_PIN_RESET);

    }

    }

    Thanks,

    Veera

  • In reply to pvb chary:

    Hi Ryan,

    I am not able to understand regarding DRDY pin, it is changing continuously even though I am giving battery voltage as input.

    I just want to know did I miss anything about DRDY functionality.

    I have noticed the delay between DRDY pulses is 2ms, I am seeing this pulses as soon as I make start pin high.

    my query is, why DRDY is changing when there is no change in input?

    In my previous post I mentioned the procedure of reading ADC data.

    Is it mandatory to read ADC data in DRDY interrupt? can't I poll for DRDY pin status in while loop for reading ADC data?

    Thanks in advance.

    Veera

  • In reply to pvb chary:

    Hello Veera,

    Please review the Start Mode (9.4.1.1) and the Data Ready (9.4.1.2) sections of the data sheet. The START pin is intended to be remain high in order for the ADCs to convert. The Data Ready (/DRDY) pin only transitions from high to low when new data is available. Some settling time is required when START transitions high.

    Furthermore, the timing or duty cycle of the /DRDY output has no relationship to the input voltage. The time between /DRDY falling edges will correspond to the configured output data rate. The first falling edge of SCLK in the frame clears /DRDY.

    Best regards,


    Ryan Andrews

    Applications Engineer | Precision ADCs 

    Are you working on a bio-potential application? Check out these helpful resources: ADS129x BIOFAQ | ECG Online Training

  • In reply to Ryan Andrews:

    Hi Ryan,

    Thanks for your response, As mentioned in previous post, I am connecting 1.5V battery across channel 1. 

    From your post

    "The Data Ready (/DRDY) pin only transitions from high to low when new data is available"


    My query is, since I am connecting battery of fixed voltage across ADC terminals, why DRDY pin is changing continuously.

    can you provide more information for my understanding.

    Thanks,

    Veera

  • In reply to pvb chary:

    Hi Vera,

    By "new data", I'm not implying whether the conversion result is the same or different compared to the previous result. In fact, they will almost never be the same since noise will force the least significant bits to toggle randomly. For a fixed DC input voltage, the ADCs in the ADS1298R will continuously sample the input and provide conversion results at the output at the output data rate. The collection of samples will follow a Gaussian distribution centered around the mean output value.

    The /DRDY output should be treated as an active-low interrupt for the MCU to enter a data collection routine. 

    Best regards,


    Ryan Andrews

    Applications Engineer | Precision ADCs 

    Are you working on a bio-potential application? Check out these helpful resources: ADS129x BIOFAQ | ECG Online Training

  • In reply to Ryan Andrews:

    Hi Ryan,

    I have implemented /DRDY  interrupt in controller and also implemented function to read ADC data from ADS128 at the fourth interrupt of DRDY as per information provided in 9.4.1.1.1 of datasheet.

    still I am unable to get the ECG signal which I was able to get using ADS1298R AFE.

    let me know if I need to change anything else or is it the issue with my ADS1298 R register configuration.

    Thanks,

    Veera

  • In reply to pvb chary:

    Hi Ryan,

    For 60 bpm, I have converted voltage values generated by ADS1298 PDK to corresponding ADC value and they are mentioned below in Hex.

    14648
    14623
    14616
    1461C
    14631
    14626
    14641
    14608

    when I read ADC value from ADS1298R through SPI I am getting below mentioned values

    FAFFF1
    FBFFEE
    ECFFF1
    BEFFF9
    EDFFF1
    F1FFF1
    FA0023
    ECFFF1
    F3FFF0
    BC0013


    these values are no where close to expected.

    my first query, data read through PDK is 5 digits means 20 bits, where as ADS1298 is expected to send 24 bits of ADC data for each channel as per datasheet.

    the first 3 digits in the data captured from PDK are constant and the data I captured through STM32 controller is very different ( first 3 digits are not same)

    I am not sure whether my procedure is right or wrong or there is something I am missing.

    kindly provide your input.

    Thanks in advance,

    Veera

    14648
    14623
    14616
    1461C
    14631
    14626
    14641
    14608
    14633
    1462D
    1463A
    14648
    1464F
    14670
    14644
    14641
    14626
    14644
    1464B
    1464B
    14641
    14633
    1460F
    14633
    14648
    14648
    14631
    14626
    1463A
    14648
    14662
    14655
    14619
    1460C
    14641
    1462A
    14644
  • In reply to pvb chary:

    Hello Veera,

    "60 bpm" tells me nothing about the applied input voltage to the ADC, so it's impossible to tell you what the expected output voltage or output code should be. 

    I suggest removing the external ECG simulator for now and conduct your testing with the internal test signal options within the ADS1298. There are 1-mV and 2-mV amplitude options. The test signal frequency can be either AC or DC. Try the DC option first and you should see consistent output codes corresponding to the test signal amplitude multiplied by the PGA gain.

    Please review the codes-to-volts conversion guide in the ADS129x BIOFAQ page for more information.

    Best regards,


    Ryan Andrews

    Applications Engineer | Precision ADCs 

    Are you working on a bio-potential application? Check out these helpful resources: ADS129x BIOFAQ | ECG Online Training