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.

ADS1298R: Data converters forum

Part Number: ADS1298R
Other Parts Discussed in Thread: ADS1298,
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);       
                            
              }      

  • 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,

  • 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

  • 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

  • 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,

  • 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

  • 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,

  • 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

  • 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
  • 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,

  • Hi Ryan,

    Thanks Ryan for your input, I tested Test signal feature, I was able to read consistent ADC values as mentioned below

    more or less values are same for each channel

    Ch1 Ch2 ch3 ch4 ch5 ch6 ch7 ch8
    24407 17211 22771 18328 15297 23805 13871 19524
    24469 17290 22853 18389 15388 23866 13926 19612
    24413 17194 22751 18318 15328 23811 13865 19554
    24424 17194 22763 18318 15323 23813 13869 19543
    24469 17267 22819 18368 15338 23841 13929 19606
    24414 17181 22759 18318 15326 23808 13889 19554
    24409 17177 22758 18339 15289 23806 13884 19544
    24439 17224 22796 18360 15326 23841 13886 19568

    I also calculated channels offset as mentioned below, the average value was considered as offset

    ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8
    3570 16773055 1422 16774499 16771434 2813 16770022 16775372
    3576 16773063 1419 16774465 16771430 2823 16770005 16775359
    3569 16773037 1408 16774509 16771441 2827 16770009 16775422
    3570 16773020 1414 16774495 16771433 2823 16770031 16775373
    3555 16773030 1428 16774475 16771442 2811 16770022 16775370
    3547 16773031 1429 16774475 16771414 2824 16769998 16775399
    3557 16773049 1428 16774470 16771455 2816 16770007 16775387
    3563 16773053 1424 16774495 16771430 2829 16770029 16775385
    3571 16773067 1407 16774494 16771432 2818 16770018 16775394
    3556 16773045 1416 16774487 16771448 2826 16770021 16775369

    Then I tried to give input from ECG simulator to ADS1298 and captured channels ADC values, which I mentioned in earlier posts.

    Then the offset was subtracted from channel ADC data respectively and plotted the graph. To my surprise it is no where near to what is expected.

    I just want to know, whether my procedure is correct or not?  let me know if you need any more information to understand the issue.

    please provide your input to resolve this long pending issue.

    Thanks in advance,

    Veera