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.

ADS1148 Thermistor

Other Parts Discussed in Thread: ADS1148

Hello

I'm interesting in connect an thermistor for temperature sensing in the ADS1148 in two-wire fashion, but i dont found information about how to interface thermistors to the AFE. I need connect 3 thermistors of 10K to the AFE, someone who can help me?

  • Oscar,

    You could connect the thermistors to the device like this:

    Shown in this diagram is the measurement of four RTDs (thermistors would be measured in the same way). The measurements are ratiometric, so that the ADC value becomes a ratio between the RTD value and the reference resistor RREF.

    To make the measurement, let's use RTD1 as an example. First, set the IDAC to AIN0. This will drive both the RTD1 and RREF. As long as there is no leakage current, then the current through each will be the same. The ADC result will be:

    ADC result = (RTD1/RREF)*2^15

    Again, this measurement is ratiometric. The result is a ratio between the resistors, and you do not need to calculate the voltages to get a result. There are two important things to note. First, the accuracy of the measurement is directly related to the accuracy of RREF. To make this measurement you would want to use a precision resistor for RREF. Second, won't be able to measure a voltage larger than the voltage on REFP0/REFN0. Therefore, RREF needs to be larger than the largest expected value on the RTD. If you are measuring a 10k RTD (or thermistor) that has a max value of 15k, then RREF needs to be 15k or larger. You would probably need to use the 100uA setting for the IDAC to keep the input within the range of operation.

    Since you are using a two-wire element, the resistance in the lead wire is always an error term. The way that it is drawn, you won't be able to use any input filtering. Because input filtering usually requires series resistance, the resistance reacting with the excitation current would give an additional error. There are alternate connections that would allow for filtering, but you would only be able to make three measurements and need to use the IEXC1 and IEXC2 pins, and alternate input to drive the RTD. This would bypass the series resistance so that it doesn't contribute to the error.

    Going back to the original diagram, once you make the first measurement, you move to the next RTD. The IDAC is connected to AIN2 and you make a similar measurement.

    Joseph Wu

  • Thanks for your answer Joseph, helped me alot.

    I Have a question about the analog power supply, I understand that the power supply would have to be unipolar in this case, is this correct? also I would know how is the connection that you mention for filtering three sensors using IEXC1 and IEXC2 pins?

    Best regards

    Oscar

  • Oscar,

    In general, yes, you would use the device with a unipolar supply. With a bipolar supply, you run out of compliance voltage for the IDAC and both the reference voltage and the RTD voltages would be much smaller.


    To make connections with separate current outputs. You would convert one of the analog inputs to a source for the IDAC current. Shown in the figure below, you could convert AIN4 to an IDAC output.

    After that, you could use the standard input filtering, making measurements with AIN0/AIN1, AIN2/AIN3, and then AIN5/AIN6.

    Joseph Wu

  • Hi Joseph Wu,

    I am testing SPI communication in ADS1148evm and implementing the diagram showed above with a microcontroller(Renesas R7F124). I am using the pins: CS, SCLK, DIN, DRDY, DOUT, START and RESET.

    I want get the ADC result = (RTD1/RREF)*2^15
    But always I am getting value = 0xFFFF in my RxSPI variable.

    Could you help me?

    This is my code:

        tx_thread_sleep (1);    //Delay 10ms
        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_04,HIGH);           //START pin high;

        
        g_spi0.p_api->open(g_spi0.p_ctrl, g_spi0.p_cfg);  //Opening and configuring SPI
        tx_thread_sleep (1);


        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_07,LOW);           // CS LOW
        tx_thread_sleep (1);


       
        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_06,LOW);           //Reset the ADS1148;
        tx_thread_sleep (1);
        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_06,HIGH);           // RESET pin goes high
        tx_thread_sleep (1);


        
        spi_Buffer_Write[0]=0x17;                   
        g_spi0.p_api->write(g_spi0.p_ctrl,&spi_Buffer_Write[0],1,SPI_BIT_WIDTH_8_BITS);      //Send SDATAC
        tx_thread_sleep (1);

    //WREG command;

    spi_Buffer_Write[0]=0x40;             
        spi_Buffer_Write[1]=0x03;               //Second Command Byte (Number of bytes to be written – 1.)

        spi_Buffer_Write[2]=0x01;               //MUX0   Burn-out current source off,  AIN0 +,  AIN1 -.
        spi_Buffer_Write[3]=0x00;               //VBIAS  00000000: Bias voltage is not enabled (default)
        spi_Buffer_Write[4]=0x20;               //MUX1   Internal oscillator,   Internal reference on, REFP0 and REFN0, Normal Op
        spi_Buffer_Write[5]=0x05;               //SYS0   PGA = 1, DR = 20 SPS

        g_spi0.p_api->write(g_spi0.p_ctrl,&spi_Buffer_Write,3,SPI_BIT_WIDTH_8_BITS);
        tx_thread_sleep (1);//10 ms

        //IDAC0—IDAC Control Register 0 (offset = 0Ah)
        spi_Buffer_Write[0]=0x4A;               //0Ah IDAC0   //First Command Byte: 0100 rrrr, where rrrr is the address of the first register to be written.
        spi_Buffer_Write[1]=0x04;               //Second Command Byte (Number of bytes to be written – 1.)

        spi_Buffer_Write[2]=0x02;               //0000, 0: DOUT/DRDY only as Data Out, 010: 100 μA
        spi_Buffer_Write[3]=0x2F;               //IDAC1   10x0: IEXC1 (ADS1148 only), 10x1: IEXC2 (ADS1148 only)
        spi_Buffer_Write[4]=0x00;               // GPIO Configuration Register Field Descriptions (ADS1148)
        spi_Buffer_Write[4]=0x00;               // GPIO Configuration Register Field Descriptions (ADS1148)
        spi_Buffer_Write[4]=0x00;               // GPIO Configuration Register Field Descriptions (ADS1148)


        g_spi0.p_api->write(g_spi0.p_ctrl,&spi_Buffer_Write,3,SPI_BIT_WIDTH_8_BITS);
        tx_thread_sleep (1);

        g_ioport.p_api->pinWrite(IOPORT_PORT_01_PIN_07,HIGH);           // CS high.
        tx_thread_sleep (1);

    while (1)
        {

    if(DRDY==0)

                spi_Buffer_Write[0]=0xFF;               //Nop
                spi_Buffer_Write[1]=0xFF;               //Nop

                g_spi0.p_api->writeRead(g_spi0.p_ctrl,&spi_Buffer_Write,RxSPI,2,SPI_BIT_WIDTH_8_BITS);
                tx_thread_sleep (1);

    DRDY=1;

    }

  • I am using Rref = 30k
  • Hi,


    I generally don't do a lot of programming, so I'm not the best at looking through code.

    My first recommendation would be to start by reading back registers to make sure they were properly programmed. I would highly recommend getting an oscilloscope or a logic analyzer to make sure the signals are well behaved and match the timing diagram in the datasheet. You'll need to capture /CS, DIN, DOUT, and SCLK. If you can, you'll want to capture /DRDY to make sure the device is converting.


    Joseph Wu
  • Hello Joseph

    I have a question, why the ADC resolution in your equation (ADC result = (RTD1/RREF)*2^15) is 2^15 if the ADS1148 has a 16 bits ADC?

    Best regards

    Oscar

  • Oscar,


    The ADS1148 has a bipolar input which means that AINN and be higher than AINP. This will give a negative value output (represented in two's complement notation). The measurement value will be 2^16 steps spread from +VREF to -VREF assuming the gain is 1.

    For an RTD measurement, you'll only be able measure positive values from 0 to +VREF, so that the output will be 2^15 steps.


    Joseph Wu
  • Hi Joseph Wu,

    I'm implementing this same circuit with the ads1148, and getting the values with a microcontroller. When I have three thermistors connected the operation is adequate, but when I disconnect some of them, the reading of the other two thermistors that are still disconnected is affected.


    Could you give me some suggestion of what the cause is?
  • Hi,


    It would really help to have a schematic with the thermistors to see what is going on and it might also help to have the output data that you're reading from the ADC.

    However, if you have multiple thermistors, and if they are connected in series with each other, then disconnecting one thermistor will break the flow of the IDAC current going to the reference resistor.

    I'd definitely get a multimeter to measure back the voltages of the input and the reference to see if you're getting the right voltages.


    Joseph Wu