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.

ADS1220 setup questions

Other Parts Discussed in Thread: ADS1220, ADS1220EVM

Hi, 

I am testing the ADS1220 for type B thermocouple measurement for a commercial product. 
I purchased the EV1220 unit, but I found it easier to use the Arduino Mega for the testing. Eventually, in production, it will be a yet undefined processor.

The Type B has very low voltage (2 micro-volts to 13 mV).

I got it to work, but to be sure my settings are optimal, here it is:

I use gain=128, 
The request is to sample every 100 mSec. 
I set the sampling rate at 20 sps, filters On, and single shoot sampling. 
I then start a measurement cycle each 100 mSec (by time interrupt) and read the data by next cycle.

(In addition, at each second (10 samples) I add the internal reference reading).

Question:

Is the above described setting and the following pseudo code correct / optimal?

Here is a pseudo code to my program:

//Defines:

#define VFSR VREF/ADS1220_PGA
#define FSR (((long int)1<<23)-1)
#define ADS1220_CS_PIN 53           //Using Arduino Mega SPI connector SS/CS pin
#define ADS1220_DRDY_PIN 50      //Using Arduino Mega SPI connector MISO pin

//settings:

volatile byte MSB;
volatile byte data;
volatile byte LSB;
volatile byte *SPI_RX_Buff_Ptr;

long bit32;
long bit24;
byte *config_reg;
float Vout;

//setup:

begin();
PGA_ON();
Single_shot_mode_ON();
set_data_rate(DR_20SPS);
set_pga_gain(PGA_GAIN_128);
FILTERS_ON();

//interrupt rutine:

ISR(TIMER1_COMPA_vect)           //100mSec. interrupt service routine for data reading
{
TC_mV = read_ADS1220_mV();     //Read the Thermocouple voltage by SPI. First one will be ignored.
SPI_Start();                                     //Start a new ADS1220 convertion in single-shot.
}

//the program:

float read_ADS1220_mV()
{
SPI_RX_Buff_Ptr = Read_Data();

if (NewDataAvailable == true)
{
NewDataAvailable = false;

MSB = SPI_RX_Buff_Ptr[0];
data = SPI_RX_Buff_Ptr[1];
LSB = SPI_RX_Buff_Ptr[2];

bit24 = MSB;
bit24 = (bit24 << 8) | data;
bit24 = (bit24 << 8) | LSB;

bit24 = ( bit24 << 8 );
bit32 = ( bit24 >> 8 );
}

Vout = (float)((bit32 * VFSR * 1000) / FSR) + get_tc_ref_mv(); //In mV

return Vout ;
}

 

  • Hi Samuel,

    It appears that the code flow is correct.  One other thing you may wish to add is some calibration.  You should at least take offset into account.  Offset for the TC measurement should be subtracted from the initial code returned.  Offset can be determined by using the internal short for the mux and subtracting that code from the TC code.

    One other thing to note is the cold junction area.  You may wish to verify the cold junction temperature and that the internal temperature sensor is measuring the cold junction correctly.  The ADS1220EVM, due to the number of possible measurement and sensor combinations, does not have the ADS1220 in the most optimal position for measuring the cold junction.  There is a provision for a chip RTD sensor that can be positioned in a more optimal area and can be excited by a current source from the ADS1220.

    Best regards,

    Bob B

  • Thanks Bob.

    Although my program seems to run fine, I still needed a professional approval, which I got. Thanks again.

    Regarding your comments:

    1. The offset: I do run one offset measurement at each startup, assuming it will last for days.
    My understanding was that the offset calibration which I run (MUX[3:1] = 1110) is automatically saved and added (Manual, P 47). Am I wrong?
    Do I have to add the offset to each reading in my program?
    2. The TC cold junction: Unlike most TC, the type B that we use for up to 1750 deg C has very low voltage at low temperature, which,
    as long as the cold junction is kept around normal room temperature, can be ignored.
    I use type B compensation wire (which appears to be pure copper-copper for type B), thus my reference point is moved very close to the ADS.

    Nevertheless, as you can see in my program, I do measure the reference using the internal temp converted to TC B mV, and add it, but it has insignificant influence on the measurement (a few hundredth deg C at 1500 deg. @ -40 to +50 Deg reference) and actually should be ignored.
    Thanks again
    Sam
  • Hi Sam,

    Please see my comments below.

    Best regards,

    Bob B

    Samuel Tal said:
    Thanks Bob.

    Although my program seems to run fine, I still needed a professional approval, which I got. Thanks again.

    Regarding your comments:

    1. The offset: I do run one offset measurement at each startup, assuming it will last for days.
    My understanding was that the offset calibration which I run (MUX[3:1] = 1110) is automatically saved and added (Manual, P 47). Am I wrong?
    Do I have to add the offset to each reading in my program? BB> Perhaps we were not entirely clear.  What you would do in the 'microcontroller' code is to take several measurements for the shorted case and average those readings to determine the ADS1220 offset.  There is no value that is automatically stored.  This would be done within the code.  The offset would then need to be subtracted from each measurement result.  This is not done automatically for the ADS1220 which differs from some of our other devices.  There is the possibility for offset drift with temperature.  If the ADS1220 is in a stable temperature environment you will not need to recalibrate.  However, if the temperature varies considerably then I suggest doing a periodic offset calibration.
    2. The TC cold junction: Unlike most TC, the type B that we use for up to 1750 deg C has very low voltage at low temperature, which,
    as long as the cold junction is kept around normal room temperature, can be ignored.
    I use type B compensation wire (which appears to be pure copper-copper for type B), thus my reference point is moved very close to the ADS. BB> In general terms an additional thermocouple is created at the junction of two dissimilar metals.  I have not used a Type-B, so I was not fully aware of the characteristics.  I agree with your assessment that if the reference temperature is below 50 deg C it will have insignificant impact on the measurement for Type-B TCs.
     
    Nevertheless, as you can see in my program, I do measure the reference using the internal temp converted to TC B mV, and add it, but it has insignificant influence on the measurement (a few hundredth deg C at 1500 deg. @ -40 to +50 Deg reference) and actually should be ignored.
    Thanks again
    Sam