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.

ADS124S08EVM: Data collection problem in ADS124S08 EVM

Part Number: ADS124S08EVM
Other Parts Discussed in Thread: ADS124S08

Hello sir,

When I am connecting my voltage source at J9 jumper(AIN10(+) and AINCOM(-)), evaluating with ADS124S08 EVM and running the predefined script that  is voltage measurement,then I opened the data analysis tool and I pressed the Collect button then no data was coming and D3 LED was still red,D2 LED also didn't flashed once.

But when I am not selecting any script and simply giving COLLECT (Number of points) from Console then D2 LED flashed once and some random data came in data analysis tool.

Please suggest the possible answer to the problem.

Thanks.

Regards

Sushmita Chaudhary

  • Hi Sushmita,

    As the red LED is lit (which is indicating that the START pin of the ADS124S08 is set high), the script appears to be executing.  Opening the Data Analysis and clicking on Collect should result in the collection of data for the number of points indicated (shown in the box under the Collect button.)  Prior to connecting the external voltage, I would try to run the script and from the Data Analysis screen Collect some data.

    I'm thinking that perhaps there is a transient that is resetting the ADS124S08 when the external voltage is being connected and running the test I just outlined will help to determine what may be causing this issue.

    What is the voltage you are applying and how do you have the input jumpers connected?

    Best regards,

    Bob B

  • Hello Bob,

    I am supplying 6 V supply to J9 jumper,positive terminal of supply is connected to AIN10 and negative terminal to AINCOM.

    After running the script,then I applied the external voltage,then opened data analysis tool and clicked collect button then also it was not coming.

    So after running the script and gave power supply then I gave START command from console,then opened data analysis tool and pressed collect button,then I am able to collect the data. I don't know why it is happening.

    Voltage across input mux will be the voltage across R77 resistance,that is for 6V  input supply it should come

    VR77= Vin*(R77/(R76+R77))=6*(24/117.1)= 1.2294V

    So 1.2294 V is coming in data analysis graph as Vout (input referred)

    How we will check what digital value belongs to this analog value ??

    Thanks

    Regards

    Sushmita Chaudhary

  • Hi Sushmita,

    Did you try what I told you to do in my previous response of connecting the external voltage first then running the script?  When you connect the external supply make sure that JP13 is in the GND position.  Before turning on the supply, connect the - lead connection first to J9-ACOM.  Then connect the + lead connection to J9-A10.  If the EVM is powered, start the GUI and turn on the external supply, then run the script.

    Data Analysis should work as expected.  The firmware analyzes the state of the START pin.  As the red LED is lit, the START pin should be high placing the ADS124S08 into continuous conversion mode.  It is entirely possible that there is a connection issue, or an issue with the level shifter driving the START pin.  If the firmware is setting the START pin high, there is no start command issued in firmware.  You can check with a voltmeter and see if the voltage of the START pin on the J3 connector is high.  You could also remove the line in the script "HOLDSTART 1" which will force the start command in firmware.  And/or you could add the START command to the bottom of the script.

    In Data Analysis you apparently are seeing the Time Domain plot.  To see the codes being returned you can select the Data Inspector tab, or from the Time Domain tab you can select from the drop down of 'Display value as:' and select 'Codes'.  This information is given in the Delta-Sigma ADC EvaluaTIon Software User Manual:

    http://www.ti.com/lit/ug/sbau260/sbau260.pdf

    Best regards,

    Bob B

  • Hi Bob,

    Yes it worked as you gave the instructions.Thank you.

    Now I interfaced my arduino UNO with EVM and input as voltage source but whatever the output codes I am getting,it was not similiar codes in arduino. Here I am posting my code ,

    #include <SPI.h>

    #include <TimerOne.h>

    #define START 6

    #define RESET 7

    #define CS 4

    //#define DRDY 8

    uint32_t stat;

    uint32_t upperByte;

    uint32_t middleByte;

    uint32_t lowerByte;

    uint8_t ADC_data[3];

    int32_t signByte;

    uint32_t stopping =0;

    //volatile int DRDY_state = LOW;

    SPISettings settings1(4000000, MSBFIRST, SPI_MODE1);

    void setup() {

    SPI.begin();

    //pinMode(DRDY, INPUT);

    pinMode(CS,OUTPUT);

    pinMode(RESET, OUTPUT);

    pinMode(START,OUTPUT);

    digitalWrite(RESET , HIGH);

    delay(5);

    Serial.begin(9600);

    SPI.beginTransaction(settings1);

    digitalWrite(CS, LOW);

    digitalWrite(START,LOW);

    }

    void loop() {

    for(int i=0;i>=0;i++)

    {

    if(i==0){

    SPI.transfer(0x42); // WREG register adress

    SPI.transfer(0x07); // WREG byte number -1

    SPI.transfer(0xAC); // WREG write AIN10-AINCOM,(1010 1100) binary,MUXP and MUXN selection

    SPI.transfer(0x08); // gain =1

    SPI.transfer(0x14); // DATA RATE 20 SPS

    SPI.transfer(0x10); //REF

    SPI.transfer(0x00); // IDAC MAG

    SPI.transfer(0xFF); // IDAC MUX

    SPI.transfer(0x00);// Vbias

    SPI.transfer(0x12);// Timeout bit second =1 ,default is 10h

    SPI.transfer(0x08); // start converting command

    delay(1);

    }

    else

    {

    while(stopping < 5000)

    {

    digitalWrite(CS, LOW);

    SPI.transfer(0x12); //RDATA command

    ADC_data[0] = SPI.transfer(0) ;

    ADC_data[1] = (ADC_data[0] <<8) | SPI.transfer(0);

    ADC_data[2] = (ADC_data[1] <<8) | SPI.transfer(0);

    digitalWrite(CS, HIGH);

    stopping = millis();

    //Sign extension code, 24 bit to 32 bit.

    if(ADC_data[0]&0x80u){  

    signByte = 0xFF000000;

    }

    else

    {

    signByte = 0x00000000;

    }

    upperByte=((int32_t) ADC_data[0] & 0xFF)<< 16;

    middleByte=((int32_t) ADC_data[1] & 0xFF)<< 8;

    lowerByte=((int32_t) ADC_data[2] & 0xFF)<< 0;

    stat = (signByte | stat1 | stat2 | stat3);

    Serial.print(stat);

    Serial.print("\t");

    Serial.print(stopping);

    Serial.print("\n");

    delay(200);// need an additional delay to allow the next conversion period to end.

    }

    }

    }

    SPI.endTransaction();

    }

    Can you suggest the changes?

    Thank you!

    Regards Bob

  • Hi Sushmita,

    You are manipulating a lot of data by saving and shifting to various variables and you are using 'stat' as the variable you are printing, but to stat you are 'or'ing stat1, stat2 and stat3 which are never declared.

    Some of the data you are saving as unsigned values and some of them are also unsigned bytes, such as the array ADC_data[].  Another issue is upperByte, middleByte and lowerByte are unsigned 32-bit, but you are casting an int32 which will not work.  As the variable 'stat' appears to be what you are most interested in, let's simplify and make this an int32_t instead of uint32_t.  When actually retrieving the data using the RDATA command there is no need to save to an array of bytes.  Instead:

    SPI.transfer(0x12); //RDATA command
    
    stat = SPI.transfer(0) ;
    
    stat = (stat <<8) | SPI.transfer(0);
    
    stat = (stat <<8) | SPI.transfer(0);
    
    digitalWrite(CS, HIGH);
    
    
    stopping = millis(); // I'm not sure what this does
    
    //Sign extension code, 24 bit to 32 bit.
    
    if(stat&0x800000){  
    
    stat = stat | 0xFF000000;
    
    }
    
    Serial.print(stat);
    
    //etc.

    Just keep the code as simple and with as few of variables as possible.

    Best regards,

    Bob B

  • Hello Bob,

    Thank you very much for resoling my issue.

    Regards

    Sushmita Chaudhary