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.

ADS1248: ADS1248 data value error

Part Number: ADS1248
Other Parts Discussed in Thread: ADCPRO, ADS124S08

Dear TI Team,

I am designing the ADS1248 and have questions during the test.

There is a problem with the connection of the input.
I use AIN0 ~ AIN7 to connect, and I switch ON / OFF of AIN to confirm the value.
However, if the connection to AIN0 is lost, the value of the Output will be erroneous.
From AIN1 to AIN7, we confirmed that there is no problem even if the connection is broken.
If only AIN0 is disconnected, an error will occur.
It is necessary to check whether AIN0 is always connected.

Thanks.

  • Chun,


    I'm not sure I understand what you are asking. Are you asking about what happens when you float the one or more inputs and what you get for the output data read? Are you asking about burn-out detection when the input of the ADC may appear to be disconnected after a sensor has burned out?

    I need more information about how you have the device connected and it would be good to have a schematic as well. I'll also need to know how you have the device configured (perhaps with a readback of the configuration registers) and how you have the input channels switched on and off. For each of the configurations with error and without error, I need to know what data you are getting and what you expect to get.

    If you are asking about burnout detection and when you can expect to get a full scale reading of 7FFFFh, it depends on the schematic, what you have connected, and (sometimes) if you have the burnout detection current sources enabled. Normally, you would enable the burnout current sources and these would pull apart the inputs to get them set to an over-ranged input. However, I need to know what it is that you are measuring and how you have it set up.


    Joseph Wu
  • Dear Joseph Wu,

    Attach the circuit diagram.

    We use PT100, connect PT100 according to Ch if necessary and disconnect. However,

    if PT100 connected to AIN0 is disconnected, error of output data occurs.

    If you disconnect another input port, there is no problem.

    I wonder if AIN0 has to be connected unconditionally for the input port.

    * Circuit Control Concept

    Two internal current sources IEXC1 and IEXC2 are used to change channels from 1CH to 4CH using MUX + MUX- to supply a current source

     A resistance of 820 ohm is inserted between REFP0 and REPN0 to convert 1.64V = 2mA * 820ohm to the reference voltage between channels

     I want to feed the RTD 4 channel without input filter.

  • Chun,


    Based on your circuit diagram, it looks like you've set up an ADC reading with some 110Ω resistors used for hardware compensation. When the RTD is 110Ω near room temperature, the ADC reads 0, and as the temperature gets higher or lower, the ADC reading will go higher and lower. Measurements are made with paired IDACs set up to drive AIN0 and AIN1, then AIN2 and AIN3, then AIN4 and AIN5, and finally AIN6 and AIN7.

    I'm not sure why it does not work for you when the AIN0 RTD is disconnected. If the AIN0 is disconnected, and the AIN0/AIN1 inputs are measured, the output reading should show full scale (7FFFFFh). The unconnected AIN0 should pull up to positive supply, while the AIN1 should still source current to the reference resistance. Again, this would give a full scale reading.

    However the other readings (AIN2/AIN3, AIN4/AIN5, and AIN6/AIN7) should all be correct. An unconnected AIN0 should not affect the other channels. When you say that if "AIN0 is disconnected, error of output data occurs". What output data error are you getting? What input channel are you reading at the that you get the error. I need you to show the output data coming from the device. You may want to give a large set of data with the configuration setup for each of the data.

    Regardless, I'd also like to see the data rate, PGA setting, and any other configuration register settings that you've changed from default.


    Joseph Wu
  • Dear Joseph Wu,

    ADS1248 Preferences
    > GAIN: 4 times
    > DATA RATE: 20
    > IDAC1: 1mA (output to the same channel as analog input AIN0-> AIN2-> AIN4-> AIN6)
    > IDAC2: 1mA ((Outputs to the same channel as analog input AIN1-> AIN3-> AIN5-> AIN7)

    The test results obtained are as follows.

    test resistance
    At normal ADC values
    ADC value at abnormal (when CH0 resistor is deleted) Expected value
    CH0 : 100ohm 1f223e ff1893 Unexpected
    CH1 : 150ohm 2ec2a1 eb8e2 2ec2a1
    CH2 : 200ohm 3e5dee 1e544c 3e5dee 
    CH3 : 250ohm 4e0d8e 2e03f9 4e0d8e  
    Schematic

  • Chun,

    First, when the CH0 RTD is removed, CH0 reading may be unexpected. The problem is that the reference voltage drops to 0 and the ADC may have difficulty reading that condition (the reference voltage should be greater than 0.5V for operation). To make a proper measurement, you would need to use the system monitor to check the reference voltage or use the internal reference to check the input.

    As for the other results, I'm still not sure what the problem is. I would first check the actual voltages across the test resistors and the reference resistor (measure them with a multimeter). Make sure that when the CH0 test resistor is removed, the voltages are correct.

    Looking at the data I did compile some numbers with the measurement:

    Channel Test Res Expected ADC ADC read Equiv Voltage Abnormal Equiv Voltage Offset
    CH0 100 1F3831 1F223E 0.099725 FF1893 -0.0029 2009AB
    CH1 150 2ED44A 2EC2A1 0.149779 EB8E2 0.047157 2009BF
    CH2 200 3E7063 3E5DEE 0.199769 1E544C 0.097148 2009A2
    CH3 250 4E0C7C 4E0D8E 0.250013 2E03F9 0.147393 200995

    The first two columns indicate the channel and the test resistance. The third column shows the expected output based on ideal numbers, while the fourth column are the data. The fifth column is the equivalent voltage across the test resistance based on a reference of 1.64V. All these numbers are correct.

    The last three columns involve the abnormal measurements. The 6th column is data with the CH0 test resistor removed and 7th is the equivalent voltage assuming the reference voltage of 1.64V. Check these values against the multimeter measurements. If these numbers are wrong, then you may need to debug the circuit to find where the current is going.

    Note that the last column labeled as "Offset" is a subtraction of the abnormal read from the ADC read when the circuit is working. It looks like all data are off by about 2009Axh. It looks as if there is a constant offset error. This probably means that either the offset calibration register is set to a wrong value, or there is current offset that in the measurement.

    Joseph Wu

  • Chun,

    Instead of an offset, another possible cause of this issue would be hardware compensation.

    I'd forgotten that that I had mentioned a set of 110Ω resistors used for hardware compensation. While you don't have them shown on the most recent schematic, they were shown in your first posting. This hardware compensation might be the cause of this offset and create the offset 2009Axh for the measurement. They might in the circuit as shown:

    These four 110Ω resistors are the equivalent of this shown in your first post:

    Let's take CH0 as an example. Without this 110Ω resistor, the ADC measurement is:

    Output code = PT100 * 1mA * 4 * 2^23 / (2mA * 820)

    However, when the resistors are there, the equivalent measurement is this:

    Output code = [(PT100*1mA) - (110Ω*1mA)] * 4 * 2^23 / (2mA * 820)

    Assuming the PT100 is really 100Ω, the final result would be:

    Output code = (10Ω*1mA) * 4 * 2^23 / (2mA * 820) = 204600d = 31F38h

    This number is a bit off from what I would have guessed. If the circuit does have these resistors, they may be the equivalent of something like 102.6Ω. Regardless, this is another thing to check. It's possible the circuit is different than described. Ask the customers about the 110Ω resistors and how they have the measurement set up.There may be some differences in gain setting, so have them be detailed in their description.

    Joseph Wu

  • Dear Joseph Wu,

    The following is a program control concept.

    Initialization syntax
     
     1. Reference 0 setting
     2. Current output setting
     3. Channel Settings
     4. Calibration
     5. Start RDATAC

    ================================================== ====================
         ADS1248SetStart (1);
        ADS1248SetReset (1);
       
        ADS1248SetVoltageReference (0x00); // set_vref ('0'); // ref w0
        ADS1248SetDataRate (0x02); // data rate 20
        ADS1248SetGPIOConfig (0x00);
          ADS1248SetGPIODir (0xff); // set_gio ('f', 'f'); // gpio // uff
        // set_burnout ('0'); // N0
        ADS1248SetBias (0b00000000); // set_bias ('A', 'A'); // OAA // VCC BISE 2B 10101010
        ADS1248SetSystemMonitor (0x00); // nermal mode // M0
        // ADS1248SetBias (0x00); // set_bias ('A', 'A'); // OAA // VCC BISE 2B 10101010
        ADS1248SetIntRef (0x01); // set_iref ('0'); // E1 // sleclect ref off
        ADS1248SetCurrentDACOutput (0x06); // set_current ('6'); // I0 // current source on 1mA
        
        ADS1248SetIDACRouting (0,0); // set_idac ('f', 0); // x0 // current select 0 off
        ADS1248SetIDACRouting (1,1); // set_idac ('f', 1); // y0 // current select 1 off
        
        ADS1248SetChannel (0,0); // set_ch ('0', 0);
        ADS1248SetChannel (1,1); // set_ch ('1', 1);
        
         ADS1248SetGain (0x02); // gain 4 // p4
       
        ADS1248SendSELFOCAL ();
        ADS1248SendRDATAC ();
    }
     
    ================================================== ======================
      Control iteration (RDATAC syntax)
    1. Current output channel change (2CH, 3CH, 4CH, 1CH circulation)
    2.MUX channel change (2CH, 3CH, 4CH, 1CH cycle)
    ================================================== ======================
    unsigned char channel [4] = {0x13,0x25,0x37,0x01}; // Change MUX channel 2CH, 3CH, 4CH, 1CH
    unsigned char cmd [4] = {0x23,0x45,0x67,0x01}; // Change current output channel 2CH, 3CH, 4CH, 1CH
     
     Repeating syntax
        {
         ADS1248AssertCS (0);
        
        adc.adcdata [CH] .word = SPI_Exchange8bit (0x4B);
        adc.adcdata [CH] .word = (adc.adcdata [CH] .word << 8) | SPI_Exchange8bit (0x00);
        adc.adcdata [CH] .word = (adc.adcdata [CH] .word << 8) | SPI_Exchange8bit (cmd [CH]);
            
        SPI_Exchange8bit (0x40);
        SPI_Exchange8bit (0x00);
        SPI_Exchange8bit (channel [CH]);
     
        ADS1248AssertCS (1); // CS goes high
        }

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    Is the part of the offset mentioned in the answer one of the phenomena that can occur when the calibration is applied?

    Thanks.
  • Chun,


    I don't see anything that would be a problem in the procedure in the code. The only thing that might be an issue is if the SYSOCAL was issued instead of a SELFOCAL. The value store would be close to measurement of the first setting, which is close to what you have. However, I can't see the exact command that you are sending with this small section of code.

    However, in my last two posts, I've mentioned several things about the measurement itself. Do you have the 110Ω resistors on your board? If you have these resistors, are they in the location where I drew them on my board? Have you measured the voltages across each of the elements when making measurements? It's important to measure the voltages that the ADC sees to compare them with what ADC conversion data should be coming out.


    Joseph Wu
  • Dear Joseph Wu,

    There is no 100 ohms in the final circuit.

    The data measured is also the result of the final circuit.

    Voltage value measured by Ch

    test resistance
    At normal Voltage values
    Voltage value at abnormal (when CH0 resistor is deleted)
    CH0 : 100ohm 100mV (ADS1248  /11_12Pin) 0V (ADS1248 / 11_12Pin)
    CH1 : 150ohm 150mV (ADS1248 / 17_18Pin) 150mV (ADS1248 / 17_18Pin)
    CH2 : 200ohm 200mV (ADS1248 / 13_14Pin) 200mV (ADS1248 / 13_14Pin)
    CH3 : 250ohm 250mV (ADS1248 / 15_16Pin) 250mV (ADS1248 / 15_16Pin)

    Ref Voltage : 1.64V (R57_820Ohm Measured value at both ends)

    SW Configuration


    1--> 1. Reference 0 setting  2. Current output setting  3. Channel Settings  4. Calibration  5. Start RDATAC

    This problem is caused by the above settings.

    2--> 1. Current output setting  2. Channel Settings  3. Start RDATAC

    If you configure the above settings, it will work normally. However, we can not use it like 2 for each channel.

    It takes a long time.

    Can AIN0 / 1 be set as the reference channel and cause trouble?

    Thanks.

  • Chun,


    I'm sorry I didn't respond to your post at the end of last week.

    Looking at the data I have more questions about the test. In the abnormal readings is the RTD at CH0 removed? or is the RTD set to 0Ω? I thought that this was for the RTD removed, but it looks more like 0Ω.

    In your last post, the data shows 0mV when the CH0 resistor is deleted. If the resistor is removed, the REF voltage should be 0.82V instead of 1.64V. Additionally, they should check the voltage from leads 1 and 3 of the RTD at CH0. Lead 1 should be pulled up by the disconnected IDAC, so it should be near the positive supply (maybe near 4.9V). Lead 3 should still be connected to the top of the reference resistor (0.82V) and lead 2 should be floating. If the CH0 resistor is a 0Ω resistor, then the voltage across it would be 0V and the reference would be 1.64V. With a CH0 abnormal measurement, is the reference resistor 0.82V or 1.64V?

    However, even in the abnormal data from the previous posts, it looks like the output voltage is giving a value of FF1893h. This would still be something reasonable if the 100Ω is still there and the offset that I mentioned is there.

    Because the offset value always appears to be ~2009Ax, I think when the customer gets an abnormal reading, they should immediately read the offset calibration register (OFC). This looks like the error they have gotten. I mentioned this in the last post, but it almost looks like they ran a SYSOCAL (60h) but should have run a SELFOCAL (62h) for the calibration. The exact calibration isn't shown in the code that you posted, and it may be important. If they used the wrong calibration, this might be the error. If this is the case, then the value in the offset calibration register is very large and wrong. If they get the abnormal reading, it is important to know what value they have in the OFC.

    I didn't understand your last question: "Can AIN0/1 be set as the reference channel and cause trouble?" The ADS1248 only has REFP0/REFN0 and REFP1/REFN1 as the reference inputs. I'm sure how else AIN0/1 can be a reference channel. Can you explain what you mean about this question?


    Joseph Wu

  • Dear Joseph Wu,

    1. The question "Can I set the AIN0 / 1 as a reference channel to cause a problem?" Is the wrong question.

    2. SELFCAL is running.

        If you see the code above, run SELFOCAL before reading the data.

    ==================================================================================

        ADS1248SetStart (1);

       ADS1248SetReset (1);

       ADS1248SetVoltageReference (0x00); // set_vref ('0'); // ref w0

       ADS1248SetDataRate (0x02); // data rate 20

       ADS1248SetGPIOConfig (0x00);

         ADS1248SetGPIODir (0xff); // set_gio ('f', 'f'); // gpio // uff

       // set_burnout ('0'); // N0

       ADS1248SetBias (0b00000000); // set_bias ('A', 'A'); // OAA // VCC BISE 2B 10101010

       ADS1248SetSystemMonitor (0x00); // nermal mode // M0

       // ADS1248SetBias (0x00); // set_bias ('A', 'A'); // OAA // VCC BISE 2B 10101010

       ADS1248SetIntRef (0x01); // set_iref ('0'); // E1 // sleclect ref off

       ADS1248SetCurrentDACOutput (0x06); // set_current ('6'); // I0 // current source on 1mA

       ADS1248SetIDACRouting (0,0); // set_idac ('f', 0); // x0 // current select 0 off

       ADS1248SetIDACRouting (1,1); // set_idac ('f', 1); // y0 // current select 1 off

       ADS1248SetChannel (0,0); // set_ch ('0', 0);

       ADS1248SetChannel (1,1); // set_ch ('1', 1);

        ADS1248SetGain (0x02); // gain 4 // p4

       ADS1248SendSELFOCAL ();

       ADS1248SendRDATAC ();

    }

    =============================================================================

    3. No offset is set.

    4. The RTD of Ch0 is the opened data.

        We did a test by attaching resistors on a channel-by-channel basis instead of RTDs for testing. Please see the photograph below.

      

    4Ch connection

    3Ch connection

    Thanks.

  • Chun,


    I'll probably have more to comment on tomorrow, but I'll just respond to some of the questions/comments that you put in the last post.

    1. Ok, if it's wrong, I'll just skip that question.

    2. I can see that the code says "ADS1248SendSELFOCAL ();" but I can't see the the actual code written to the device. As I mentioned in my last post, it might be possible that that they wrote 60h instead of 62h which would be a SYSOCAL instead of SELFOCAL.

    3. Before each read of the CH0, CH1, CH2, CH3 cycle I would also read the OFC. Right now, I want to make sure what the device is seeing at AINP-AINN and what the reference is at REFP0-REFN0. At this point, it looks like the value are correct except for an offset value and I need to know if this is offset is set in the OFC or a loss of current in the RTD resistances.

    4. Ok, I think I understand the method of measurement. I think I have enough detail in the measurement sequence to try to duplicate what the customer is doing. However, I will need to make the changes very slowly. I'll use the ADS1248EVM to try to duplicate your measurements. It should give me an accurate setup, and I should be able to give values for each step.


    Joseph Wu
  • Chun,

    I think I know what is going on. I ran the customer's configuration sequence using ADCPro and the ADS1248EVM. The problem is during the offset calibration when there is no CH0 resistor.

    Calibration works by shorting the inputs together to get a measure of the offset voltage. This measurement is stored and subtracted from future measurements to remove any offset. However, the device needs to be operating normally when the calibration is run. Here is how I have the test set up:

    Using the EVM, I set the device up with the test resistors.

    The test resistors are set up similar to what your customer has.  I use 100Ω, 150Ω, 200Ω, 249Ω, and a reference resistor of 825Ω. Here's a close up of the test resistors:

    I run through the whole setup, set the inputs, and IDAC configuration, and then run the self offset calibration:

    The resulting SELFOCAL looks correct, the value is near 0 (but negative in this case).

    Then I start over. First, I remove the CH0 resistor. Then, I shut down the software, unplug the EVM, and then restart the entire setup. Here's a picture of the EVM with the CH0 resistor removed.

    I run through the same setup, but the problem is found in the calibration. Here is the result

    The problem is that the device is no longer working properly when the offset calibration is run. The inputs are still shorted and the offset voltage is compared to the reference as a measurement. However, with the CH0 resistor missing, none of the IDAC currents make it to the reference resistor. Therefore the reference voltage is 0. This gives an offset result that is completely wrong. Here the result is 6E38ED, but it could be anything. If lead 1 of the reference resistor were broken, then the only one of the IDAC currents reach the reference resistor. The resulting reference would be 0.82V. This would still be wrong. During calibration, the offset would be measured with a 0.82V reference, when normally it would be 1.64V. The offset would appear twice as large if the reference was only have as big. The board should be working normally when running the calibration.

    To make sure that the device is operating properly and that the IDAC currents reach the reference resistor, the customer can use the system monitor. Have the ADC use the internal reference and measure the reference voltage. If the reference is near the expected value, then the offset calibration can be run, if the reference is not near the expected value, change the channel until if finds that the reference is an expected value. Then run the self offset calibration.

    Joseph Wu

  • Dear Joseph Wu,

    Thanks quick confirmation.

    There is a part that does not understand well and I will ask one more question.

    Are you asking SELFOCAL every time you change channels?

    For us, SELFOCAL seems to be similar to calibrating.

    You can not perform calibration every time you change channels.

    The reason is that if we calibrate each channel change, we can not get the data value at the desired time.

    Another way is to use an external reference, but there is a problem with the cost going up.

    As a result, is the problem that occurs because the connection of Ch0 is short-circuited and the Ref is shaken?

    Can you tell if the ADS124S08 has the same symptoms?

    Thanks.
  • Chun,


    I only ran the SELFOCAL at the beginning of each set of measurements. I did not run it before each channel change. Generally you only need to run SELFOCAL once when the device is in the proper configuration and you do not need to do it for channel to channel changes. However, if you change the PGA gain or the reference, I would redo the SELFOCAL.

    I do not think you need to use an external reference. You only need to make sure the device is operating normally before running the SELFOCAL. Again, you can use the internal reference to verify that REF0 input is correct.

    The ADS124S08 would have the same type of problem. In the event that the CH0 three-wire RTD is not plugged in, the current from IDAC1 and IDAC2 will not reach the reference resistor. In that case, the reference voltage will be 0V, and the self offset calibration (SYOCAL in this device) will have a similar error.


    Joseph Wu
  • Dear Joseph Wu,

    Thank you very much.