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.

ADS124S08: Unusual behavior in ADC conversion

Part Number: ADS124S08
Other Parts Discussed in Thread: ADS114S06, ADS124S06, INA240

Hello,

We are developing an application with your ADS124S08 ADC.

We have already developed our prototype and now we are running our firmware and testing the ADC.

We are using TI library that eases our development because it has all the functions to read, write, initialize and configure the ADC.

After initializing our MCU and internal interfaces, we start initializing the ADC and our sequence in our firmware is as follows:

ADS124S08_sendCommand(RESET_OPCODE_MASK);
ADS124S08_writeRegs(0, 18, &registers[0]);
ADS124S08_readRegs(0, 18, &registers[0]);
ADS124S08_reStart();

In while infinite loop, we have:

HAL_Delay(500);
liAcqDigPress = ADS124S08_dataRead(&ucAdStatus, &ucAdCRC);

We didn't do any specific configuration on configuration registers. We left it all as default.

After running the code, the function "ADS124S08_dataRead(&ucAdStatus, &ucAdCRC)" returns the raw ADC result to the variable "liAcqDigPress".

The input differential voltage comes from a Keller 10L sensor.

When we apply a fixed pressure from a high precision pressure generator and monitor the variable "liAcqDigPress", we observe that the result remains static, with a certain value for a long time and for another long piece of time, the result remains static with another value.

For example: In our latest test, for a certain pressure applied, we got 27039(dec) from variable "liAcqDigPress", that remained static for a long time (several samples, let's say 80) and 26783(dec) for a long time either.

That kind of behavior sounds strange to me. Normally, this result should be oscilating some bits between the samples, shoudn't it?

What can you tell us about that? Can you help us please?

Attached you have the TI library used in our firmware.


Thanks and best regards,

Marco Aurelio P. Coelho
Firmware Developer
Sensycal Intruments and Systems

  • Hi Marco,

    Welcome to the E2E forum!  Do you have any logic analyzer data showing the timing and reading of the conversion data? The configuration settings have the internal reference off, and REF0 used as the reference input.  Do you have a schematic that you can share showing how you have the sensor connected as well as the reference you are using?

    One method of connection would be to use the IDAC current source(s) as the excitation source and by using the voltage created across the bridge by the IDACs to use as the reference input.  This would result in the lowest noise and improved drift performance.  This would also require that the internal reference be enabled for the IDACs.  You would also be required to use a 5V analog supply for the IDAC compliance voltage to be met.

    For your configuration (which is the default settings), you are not using the IDACs or the internal reference and the default data rate is 20sps.  This means that a new conversion result will only be ready at approximately every 50ms.  I'm not sure how long the delay is for HAL_Delay(500), but it is quite possible that you are reading the same conversion result over and over again within this 50ms period.  You should monitor DRDY to determine when new conversion results are available.  If a timer is used, then you must make sure that you are waiting the appropriate amount of time based on the data rate selected.  An oscilloscope or logic analyzer will help determine the timing relative to DRDY and you can monitor to see if you are reading the data multiple times between DRDY pulses.

    The configuration is also set to PGA bypass and a gain of 1.  You should be able to enable the PGA and use some gain, but the amount of gain available to use will depend on the reference voltage applied.

    Best regards,

    Bob B

  • Hi Bob,

    Sorry for the late response. I was out of office and came back today.

    Thank you very much for your attention and support.

    Just to confirm: You suggest that we power AVdd and AVss with 5V and GND so the IDAC compliance volatge be met . And that we enable the IDACs by firmware so that we connect IDAC1 currrent source to REFP1 and externally connect REFN1 to GND. Is that right?

    We didn´t performed the changes you suggested yet and did the following test:

    We applied several (differential) voltages from a precision power supply in 2mV steps and we noticed a strange behaviour: 

     If we don't enable PGA (gain=1), the ADC works perfectly, but if we enbale PGA, we notice that from a certain point (Vin) on, the ADC reads always the same value as if it is saturating. And I don't know why.

    Please have attached our schematics (ADC connections and power). As you can see, we already power analog with 5V and J1 is a soldered jumper that we can remove to perform the tests with the IDAC current source generating power to REFP1.

    Also have attached a worksheet with the results of the test described above

    We will perform new tests with IDAC current source and as soon as we have finished it, we send the results to you (including the measures with the osciiloscope).

    Thanks and best regards,

    Marco Aurelio P. Coelho

    Firmware Engineerschematics_p_sensor_ads124s08.zip

    Sensycal Instruments

     teste_ads124S08.xlsx

  • Hi Marco,

    In your schematic you have IN+ also tied to REFP1, which would be correct.  However you should not be routing the IDAC current through REFP1 as there will be a significant voltage drop across the 4.12k resistor.  I would suggest using one of the currently unused inputs and routing the current from that input to IN+ net.  You can leave everything else the same.  For register settings, you would need to turn the internal reference to ON, and select REF1 as the reference input.  You would also need to turn on the IDAC current source (1mA I believe is what the sensor requires) and route this current through the desired input to the IN+ net.  You should now be able to make the measurement.

    The results as you have shared them are apparently outside of the input restriction for the PGA when it is enabled.  If you are attempting to drive the inputs too close to the supply rails, then you will start to see issues with linearity.  If you are driving current out through REFP1, then this most likely is the problem due to the voltage drop across R3.  I also think you might be seeing some linearity issue from voltage compliance for the IDAC for similar reasons.

    Once you have configured the register settings as I have stated above, measure the voltage from IN+ to IN-, and also from OUT+ to OUT- with an external volt meter.  Also retrieve conversion results and share as you have done in the last post.  Also share all the register settings you are currently using.  If you are not using the actual sensor, but instead applying a voltage from an external voltage source you must make sure that this voltage is within the input range.  Depending on you the source voltage is connected you may actually be measuring single-ended and will be outside of the input range when PGA is enabled.

    Also, just so that I'm clear, the thread is labeled ADS124S08 (24-bit), but the schematic is showing ADS114S06 (16-bit).  So what is the specific ADC you are using so I can calculate correctly.

    Best regards,

    Bob B

  • Hi Bob,

    You are right about the resistor. We can remove it for new tests. No problem.

    But now we have serious concern aboout the absolute input voltage (VAINx) and Vin(VAINp-VAINn) limits.

    In our application, we need to measure a Keller's pressure sensor. At the beginning, our intention was connecting it directly to the ADC inputs. Taking a look at the sensor's datasheet, it looks like a Whitstone bridge, but we can't garantee that the voltages generated on AIN0 and AIN1 by the sensor will be within the VAINx range specified by the datasheet, when PGA is enabled.

    We have sensors ranging from 0-14mV to 0-160mV.  So the ideal PGA gain to get the best resolution would be 16, for 0-160mV, and 128, for 0-14mV, considering our power supply conditions: AVss=Vref1n=0V and AVdd=Vref1p=5V.

    Applying the max and min VAINx equations from the datasheet, we get the following values:

    PGA gain min VAINx max VAINx max Vin (VAINp - VAINn)
    2 1,4 3,6 2,5
    4 2,025 2,975 1,25
    8 2,3375 2,6625 0,625
    16 2,49375 2,50625 0,3125
    32 2,571875 2,428125 0,15625
    64 1,3609375 3,6390625 0,078125
    128 0,7554688 4,24453125 0,0390625

    For PGA gain=16, notice that VAINx range is too narrow: 13mV!!! For PGA gain=128, we have a larger and more comfortable range to work with, but the resolution for 14mV sensors is reduced, if we keep this gain.

    We know the differential voltage generated by the sensors, because it is specified by the datasheet, but we have no idea of what differential voltage is generated on each AINx pin. We would have to measure it on every one. 

    How can we meet those conditions with our sensor? Is it necessary to insert some kind of signal conditioning circuit with operational amplifiers to satisfy those operating conditions?

    Thanks and best regards,

    Marco Aurelio P. Coelho

    Firmware Engineer

    Sensycal InstrumentsVref&VAIN_max_min.xlsxKeller - Series 3 L to 10 L.pdf

  • Hi Marco,

    You calculations are not correct.  The calculation for absolute input voltage is shown in the table in section 7.3 on page 8 of the datasheet.  You may be misinterpreting what this equation is about.  The ADC full-scale input range is +/-VREF/Gain. If the reference is 5V and the gain is 16, the full-scale range is +/- 312.5mV.  If the gain is increased to 128, then the input range is +/- 39.06mV.  Where you need to be careful is with the input with respect to AGND and the PGA gain so that you are not saturating the PGA output.  I would suggest downloading the ADS124S08 Design Calculator tool for calculating the input range:

    http://www.ti.com/tool/ADS124S08-EXCEL-CALC-TOOL

    A Wheatstone bridge device will have an output centered at EXC/2.  If you voltage excite a Wheastone bridge with 5V, then the DC output will be 2.5V at a balanced no-load state (OUT+ = 2.5V and OUT- = 2.5V with a difference of 0V).  If we have a bridge output that is +25mV, for example, the output voltage will be 2.5 +12.5mV at the OUT+ and 2.5 - 12.5mV at OUT-.  The difference will be 25mV centered at 2.5V. Placing 2.5125V and 2.4875V as input voltages in the calculator tool, you will see that this input combination will work for the ADS124S08.  Note that the calculator will show the allowable input range with respect to AGND, which is much different than your calculations.

    The question still remains whether you can voltage excite the sensor as the datasheet is showing 1 mA as excitation.  As the calibration for the sensor is based on 1 mA current excitation, then I would suspect that it would be best to use current excitation.  The bridge resistance is nominally 3.5k Ohms, and 1 mA excitation would be 3.5 V dropped across the bridge.  3.5 V would also be used as the reference instead of AVDD. The output of the bridge would be centered about 3.5/2 or 1.75 V, which is still in the input range as shown in the calculator.

    Best regards,

    Bob B

  • Hi Bob,

    Regarding your first response, you suggested that we should connect one of the analog inputs to the internal IDAC current source and route this pin to the IN+ network, which in turn is connected to REFP1 through the R3 resistor. Is that correct?

    Based on our understanding of you suggestion, we added a new connection to our highlighted in red in the attached file. Could you please check if this is what you meant?

    On another note, we have done some tests with the previous REFP1 setup, and have found some issues we would like you to give some input on.

    The test setup was the following:

    1) We connected a 0 - 2bar pressure sensor to the ADC, and put it in our temperature-controlled lab for 5 hours to allow  its temperature to stabilize.

    2) Using a Druck PACE 5000 pressure controller, we applied 6 different pressures to the sensor along its range (0.0, 0.4, 0.8, 1.2, 1.6 and 2.0 bar).

    3) For each pressure point, we measured the average ADC digital signal.

    4) Keeping the circuit powered on, we repeated steps 2 and 3 two more times after waiting 5 minutes.


    The results showed that the ADC has a very low noise, which is great.

    However, we also noted an upwards drift in the ADC readings as we repeated the tests, as you can see in the attached spreadsheet. We are not sure what might be the cause of that. Do you have any idea what might be causing the drift in the readings, and how we can correct that?


    Thanks and best regards,

    Marco Aurelio P. Coelho
    Firmware Engineer
    Sensycal InstrumentsADS124S TI - Pressure Tests - 0-2bar.xlsxAlteração corrente no +IN.pdf
  • Hi Marco,

    The new version of the schematic is showing what I intended.  This will allow for a 1mA excitation current to excite the sensor.  When using current excitation you will need to remove the strap jumper at J1 to remove the voltage excitation source.

    Regarding the tests using the previous implementation I need to know precisely what device you are using (ADS114S06 or ADS124S06) and all configuration register settings.  I also need to know what values of resistors you are using for the compensation resistors for R29-R32.  It is probably best if you give me the part number so I can verify the drift characteristics of the resistors. 

    Is the lab temperature during the measurements approximately 25 deg C?  Also, based on the sensor datasheet information all calibration is done using 1mA excitation.  The datasheet also states that the compensation resistors values are also given for each delivered sensor.  Quoting from the datasheet, "By using excitation unlike the calibrated excitation the output signal can deviate from the calibrated values".  Using the voltage excitation does differ from a 1mA constant current source. 

    Also, after comparing your schematic to the one shown on page 2 of the sensor datasheet, the configuration appears to be different.  Just so I'm clear, does the sensor have built in compensation resistors, or does it require external resistors?  Does the sensor actually have 6 wires?  The datasheet is only showing 5.  

    Best regards,

    Bob B

  • Hello, Bob

    We apologize for the delay in replying. We were making tests with the new configuration suggested by you. Regarding the previous questions:

    1. Which AD are we using?

    We are using the ADS124S06. The schematic we sent you was incorrectly showing the ADS114S06 from an old version of the project.

    2. What are our register configurations?

    registers[INPMUX_ADDR_MASK] = 0x01;

    registers[PGA_ADDR_MASK] = 0x0C; // PGA gain = 16 for 0-2bar sensor / PGA gain = 64 for 0-0.2bar sensor

    registers[DATARATE_ADDR_MASK] = ADS_DR_5; // filter sync3/ data rate = 5 SPS

    registers[REF_ADDR_MASK] = 0x06; // ADC reference voltage coming from REFP1 and REFN1/ internal reference buffers enabled

    registers[IDACMAG_ADDR_MASK] = 0x07; // excitation current = 1mA

    registers[IDACMUX_ADDR_MASK] = 0xF5; // IDAC2 off / IDAC1 output = AIN5

    registers[VBIAS_ADDR_MASK] = 0x00;

    registers[SYS_ADDR_MASK] = 0x10; // for calibration, use average with 8 samples

    registers[OFCAL0_ADDR_MASK] = 0x00;

    registers[OFCAL1_ADDR_MASK] = 0x00;

    registers[OFCAL2_ADDR_MASK] = 0x00;

    registers[FSCAL0_ADDR_MASK] = 0x00;

    registers[FSCAL1_ADDR_MASK] = 0x00;

    registers[FSCAL2_ADDR_MASK] = 0x40;

    registers[GPIODAT_ADDR_MASK] = 0x00;

    registers[GPIOCON_ADDR_MASK] = 0x00;

     

    3. What are the value of the resistors we are using for R29-R32?

    We are using the compensation resistors specified by the sensor manufacturer for the 2bar pressure sensor.

    R29 (R2 in sensor datasheet): not mounted

    R30 (R4 in sensor datasheet): 0 Ohm

    R31 (R3 in sensor datasheet): 0 Ohm

    R32 (R1 in sensor datasheet): 1 MOhm

     

    4. What resistors are we using?

    1 MOhm: CR0805-FX-1004ELF 0 Ohm: RMCF0805ZT0R00

     

    5. Is the lab temperature during the measurements approximately 25 deg C?

    Yes, the lab temperature is controlled at 21 deg C.

     

    6. Does the sensor have built-in compensation resistors, or does it require external resistors?

    The sensor does not have built-in resistors, we are using external resistors.

     

    7. Does the sensor actually have 6 wires? The datasheet is only showing 5.

    No, the sensor only has 5 wires, as shown in the datasheet. The 6th wire shown in the schematic is not actually present.

     

    After making the changes suggested by Bob we got much better results with a stable testing temperature. However, we have still observed a measurement drift when the temperature was not controlled, and we plan to correct that with a temperature sensor and a compensation algorithm. Our product will also need to measure currents in the range of 0 - 50mA with an accuracy of 0.02% of the full scale. We were planning to also use the ADS124S06 with a sense resistor for this. Is it the recommended ADC for this kind of application, or is there a better suited ADC?

    Thanks for your support.

    Best regards,

    Marco Aurelio Pedreira Coelho

    Firmware Engineer

    Sensycal Instruments

  • Hi Marco,

    The ADS124S06 should work well for this application.  A couple of suggestions. I would first suggest that you disable the negative reference buffer.  This would change the reference control register to 0x16.  The reference input is ground referenced, so the negative reference buffer should be disabled.  

    The second suggestion is with respect to the 1M ohm resistor R32.  You are using a 1% resistor with +/- 100 ppm temperature coefficient.  As this resistor is in the compensation network, I would highly recommend using a resistor that has a much lower temperature coefficient (10-25 ppm).  This may help considerably with the drift issue you are seeing.

    Best regards,

    Bob B

  • Hi Bob,

    Thanks dor your response.

    We have been through a National holiday since last Saturday and came back today and we will start applying the measures proposed by you tomorrow.

    Thanks and best regards,

    Marco Aurelio Coelho

  • Hi  Bob,

    You recommend that we disable the negative reference buffer. According to the datasheet, 4th and 5th bits of the reference control register actually disable bypasses in negative and positive reference buffers. So in order to disable (bypass) the negative buffer and enable the positive buffer, the register should be set to 0x26, right?

    Please clarify this question for us.

    Thanks and best regards,

    Marco Aurelio Coelho

    FIrmware Engineer

  • Hi Marco,

    Setting the reference control register to 0x26 will enable the positive reference buffer, disable the negative reference buffer, use REF1 as the reference input source, and turn on the internal reference to always on (for IDAC current sources).

    Best regards,

    Bob B

  • Ok Bob,

    We will set reference control register to 0x26, thus bypassing negative buffer and enabling the positive buffer, right?

    We are looking for resistors with better temperature performance.

    In this meanwhile, we are performing tests for simulating our current sensor.

    Our product will also need to measure currents in the range of 0 - 50mA with an accuracy of 0.02% of the full scale. We were planning to also use the ADS124S06 with a sense resistor for this. Is it the recommended ADC for this kind of application, or is there a better suited ADC/solution?

    With PGA gain = 1, we could use ranges from AVss to AVdd for VAINx and that would ease the implementation of our Rsense and current sensing circuit as well. On the other hand, we run into another issue, which is the low level of the output voltage on Rsense that the current sensing circuit produces (hundreds of milivolts in full scale). If we add operational amplifiers to amplify this signal, we will also add errors that can affect our accuracy.

    What would you suggest?

    Thanks and best regards,

    Marco Aurelio Coelho

  • Hi Marco,

    You enable or disable the reference buffers depending on how close the reference inputs are to the supply rail, or if you are using the internal reference for the ADC conversion measurement.  In the ADS124S06 datasheet in section 9.3.3.3 on page 36 it states the following: "The reference buffers are recommended to be disabled when the internal reference is selected for measurements. When the external reference input is at the supply voltage (REFPx at AVDD or REFNx at AVSS), the reference buffer is recommended to be disabled."

    The advantage of using the reference buffer is increasing the input impedance for the ratiometric reference input.  Without the buffer the impedance is approximately 250k Ohms.  When using the IDAC source to excite the bridge and the reference, there can be a current divider created.  This should not be an issue as the measurement is ratiometric.  So you should see similar results either way.

    The ADS124S06 can be used to measure current, but as you have mentioned, the input range at a gain of 1 will determine the noise-free counts available for the measurement, and therefore the resolution of the current measurement.

    You could use an instrumentation amplifier designed for measuring current, such as the INA240 where the output is analog which can then be measured by the ADS124S06.  The following is a list of possible current shunt monitor devices:

    http://www.ti.com/amplifier-circuit/current-sense/overview.html

    Best regards,

    Bob B