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.

why ads1148's two RTD channel get different temperature when testing the same pt100 at the same time?

Other Parts Discussed in Thread: ADS1148

when i test RTD1 channel,i switch ADC to AIN6 and AIN7 ,activate IDAC1 and IDAC2, and then get the temprature which is about 30 degree.after that  I connect the same pt100 to RTD2 channel, and then reset ads1148, switch ADC to AIN2 and AIN3,reactivate IDAC1 and IDAC2,but the temprature is about 32 degree.this is why?5707.SCHEMATIC1 _ 07-AIO.pdf

  • Hi Henry,

    It appears the device is being used to measure the RTD in the 3-Wire configuration with Hardware compensation (with R100 used as a compensation resistor).  A potential issue with the RC filter configuration shown in the schematic,  there is a mismatch in the corner filter frequencies seen the positive channel (AIN+) and the negative channel (AIN-) due to the compensation resistor.  In other words, the time constant seen by AIN6 (RTD1-) is provided by two resistors: R100+R99 with C117; and the time constant seen by AIN7 (RTD1+) is provided  by only one resistor:  R101 with C117 .  This will cause a mismatch at the noise seen by the positive and negative inputs of the device, and this differential noise signal will be amplified by the internal programmable gain amplifier of the device.  A suggestion to better match the filter would be to place the differential filter capacitor (C117) on the other side of RCOMP, and keep the RCOMP resistor close to the device. Make this change on both the RTD1 and RTD2 channels.    Please see figure below.

     When using the 3-wire RTD configuration, since the IDAC currents flow through the positive and negative RTD sense connections, the resistances through the RTD+ and RTD- wire lines and through the PCB traces must be closely matched.  The resistance of the components in the path must be also closely matched.  What is the tolerance of the RCOMP (R100) resistor and the filter resistors R99 and R101? 

    Can you please provide detail of the PGA gain settings, data rate and IDAC settings being used? Also, please provide a code snippet or the code algorithm; including the commands and delays used between the commands.

    Thank you and Best Regards,

    Luis

     

  • Hi Luis,

    Thank you for your suggestion.
    I moved the differential capacitor to the other side of Rcomp,the situation does not get better.
    the following are  the tolerance and values:
    49.9R 1%, 47PF 20%, 110R 0.1%, IDAC1=IDAC2=1.5mA, PGA=128
    The pcb traces of RTD1+/RTD1- pair and RTD2+/RTD2- pair do  mismatch, the maximum tolerance of the two pair is about 300mil.
    the following are the steps to test the two channels:
    1、initializing ads1148
    2、read rtd1 channel value
    3、change the value to temprature and print
    4、the board is power off
    5、initializing ads1148
    6、read rtd2 channel value
    7、change the value to temprature and print

    the attachment is the code snippet.


    Thank you and Best Regards

    #define	REG_MUX0	0x00
    #define REG_VBIAS	0x01
    #define REG_MUX1	0x02
    #define REG_SYS0	0x03
    #define REG_IDAC0	0x0A
    #define REG_IDAC1	0x0B
    
    #define CMD_RESET	0x06
    #define CMD_RDATA	0x12
    #define CMD_RREG1(r)	(0x20|((r)&0x0F))
    #define CMD_RREG2(n)	((n)&0x0F)
    #define CMD_WREG1(r)	(0x40|((r)&0x0F))
    #define CMD_WREG2(n)	((n)&0x0F)
    #define CMD_SELFOCAL	0x62
    
    #define START_H()	MCF_GPIO_PPDSDR_D = 0x02		//pin START high
    #define START_L()	MCF_GPIO_PCLRR_D = ~0x02		//pin START low
    
    //pin START output a pulse
    #define START()	do{	\
    					START_H();\
    					udelay(1);				\
    					START_L();\
    }while(0)
    
    #define DRDY()		(!(MCF_GPIO_PPDSDR_D & 0x8))	//check pin DRDY 
    
    void ads114x_init(void)
    {
    	spi_init();
    
    	MCF_GPIO_PAR_DSPI0WL &= ~(3 << 4);	//PD3 as GPIO, connect DRDY
    	MCF_GPIO_PAR_TIMER  &= ~(3 << 4);	//PD1 as GPIO, connect START
    
    	MCF_GPIO_PDDR_D |= (0x01<<1);		//PD3 as input
    	MCF_GPIO_PDDR_D &= ~(0x01<<3);		//PD1 as output
    	
    	START_H();							
    	//reset the ads device
    	tx_buf[0] = CMD_RESET;
    	spi_write(tx_buf, 1);
    	udelay(1*1000);
    	START_L();
    
    }
    
    int ads114x_read_rtd(int channal, float &result)
    {	
    	unsigned char tx_buf[1];
    	short rx_data;
    	unsigned char *rx_buf = rx_data;
    
    	
    	if(result == NULL)
    		return -2;
    	if(channal == 1)
    	{
    		START_H();
    		ads_write_reg(REG_MUX0, 0x07<<3|6);
    		ads_write_reg(REG_MUX1, 0x20);		//use REF0
    		ads_write_reg(REG_SYS0, 0x7F);	
    		//Off the current out before slect the current dir.
    		ads_write_reg(REG_IDAC0, 0);	
    		ads_write_reg(REG_IDAC1, 0x67);	
    		ads_write_reg(REG_IDAC0, 0x07);	
    		START_L();
    	}
    	else if(channal == 2)
    	{	
    		START_H();
    		ads_write_reg(REG_MUX0, 0x03<<3|2);
    		ads_write_reg(REG_MUX1, 0x20);	//use REF0
    		ads_write_reg(REG_SYS0, 0x7F);	
    		//Off the current out before slect the current dir.
    		ads_write_reg(REG_IDAC0, 0);	
    		ads_write_reg(REG_IDAC1, 0x23);	
    		ads_write_reg(REG_IDAC0, 0x07);	
    		START_L();
    	}
    	else
    		return -1;
    
    	udelay(2);
    
    	START();
    	while(!DRDY())
    		udelay(10);
    	
    	tx_buf[0] = CMD_RDATA;
    	status = spi_write_then_read(tx_buf, 1, rx_buf, 2);
    
    	if(status < 0)
    	{
    		printf("ADS114x""spi_write_then_read failed with status %d\n",
    				status);
    		return status;
    	}
    
    	rx_data = NTOHS(rx_data);
    	
    	*result = RTD_V2T(rx_data);	//change the adc outdata to temprature
    	return 0;
    }
    
    
    
    

  • Hi Henry,

    Is the 2 degrees C error constant or does the conversion result have noise?  It appears that the data rate used is 2000SPS.  If the internal reference is turned off between the measurements (or at least on the first measurement); one thing to consider is the settling time of the internal reference and the IDAC currents and the settling of the voltage across VREFP and VREFN.  Depending on the REFOUT bypass capacitor value; the expected settling time of the internal reference is given on table 6.  What is the value of the VREFOUT bypass capacitor?  After initializing the internal reference and the IDACs; what is the delay allowed before reading the conversion result?   If a slower data rate of 20SPS is used; do you obtain better correlation between the measurements?

    Since are using a PT100 RTD; the error between 30 C and 32 C in the measurement is in the order of ~0.78 Ohms.  Many times, on the 3-wire configuration, the errors could be due  to mismatch of the PCB traces; and components in the current path.  The 49.9 Ohm 1% resistor could account for some of this error; however, I wouldn't expect them to be the only contributor. A suggestion/experiment would be to also use 0.1% resistors for the 49.9 Ohm filter resistors and/or replace them with 0 Ohms to see if the measurement improves. In some cases, assembly/soldering irregularities could also contribute for errors.    Is it possible to post a plot of the PCB board layout showing the RTD1 and RTD2 traces?

    Thank you and Best Regards,

    Luis

  • hi Luis,

    I change the tolerance of 49.9 and 110 Ohm resistor to 0.1%, and the data rate to 20SPS, I get  the  same result from the two channel. I will match the RTD+/RTD- pair in my new board layout  to improve the accuracy.

    Thank you very much.

    Henry