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.

HDC1080: Suggest corrective actions

Part Number: HDC1080
Other Parts Discussed in Thread: HDC2021, HDC3021, HDC3022, HDC2022

Dear Sir,

We observed that the HDC1080 sensor occasionally reports a value of 124.99. Could you please explain the scenarios in which condition this value occurs and suggest corrective actions?

Nowadays, we are receiving sensors without removable protective covers. Why are sensors not coming with the removable protective cover anymore, and why?

Thanks.

Best Regards,

Nandini M N 

  • Nandini, 

    Were you ordering HDC1080? HDC1080 does not come with a protective tape or filter cover. HDC2021 and HDC3021 come with a removeable protective tape cover for assembly, the HDC2022 and HDC3022 come with a non-removeable PTFE filter. Were you purchasing one of these devices?

    Once I know what sensor you are actually using, I can help debug the 125C issue. It is likely from not waiting long enough for a temp+RH conversion to complete.

    Thanks

    -Alex Thompson

  • We are using "HDC1080DMBR" Sensor 

  • Nandini,

    Thank you for the clarification. The HDC1080 does not come with a tape cover option, so please check to see what material you were receiving in the past.

    For using the HDC1080, you will need to wait 6.5ms for a conversion to complete (if you are using 14-bit resolution, the highest resolution) before you try to read again. Please confirm that the proper wait time is being followed.

    Thanks

    -Alex

  • Sir,

    We have given a max wait time of 80ms.

    Thanks.

    Nandini

  • Nandini,

    Thank you for sharing this. 80ms should be plenty of time to wait between a conversion and reading the result in the Temp & RH registers. Are you also reading RH, and if so, what does that read when you are getting +125C on the temperature conversion. Is it +100%RH? 

    It would be helpful if you could provide some more information to me. Could you please share the programming steps you are taking with this device, and an oscilloscope shot of the +125C temp reading? I want to see exactly what you are doing to see what is going wrong.

    Thanks

    -Alex Thompson

  • Thank you for your quick response Sir. 

    Yes, Sir we are reading RH.

    When we read the temperature as 125°C, RH is observed to be 100%.

    Please find the programming steps below:


    #define MEASUREMENT_DELAY 15
    /*
    * Triggers the measurement
    */

    bool trigger_measurement(uint16_t delay, uint8_t TorH)
    {
    volatile uint8_t checkACK = 0;
    bool result = false;
    // checkACK = writeRegBytes(RHT_reg[TorH],0,1,1);
    uint8_t data[2] = {0};
    checkACK = writeRegBytes(RHT_reg[TorH],data,0,1);

    if(checkACK == 0) // writes the address of the register(T or H) into the pointer register of the sensor
    {

    result = true;
    delay_us(delay * 1000);

    }
    else
    {
    printf("failed in trigger measurement\n");

    }


    return result;
    }


    /*
    * Updates the configuration register
    * @param res_of_t is the required temperature resolution
    * @param res_of_h is the required humidity resolution
    * @param heater. Turns ON or OFF the heater
    * @param mode decides the mode of operation of the sensor
    */
    bool updateConfigRegister(uint8_t res_of_t, uint8_t res_of_h, uint8_t heater, uint16_t mode)
    {
    bool result = true;
    uint16_t configReg = (set_TandH_resolution(res_of_t, res_of_h)) | (heater_ONorOFF(heater)) | mode;
    uint8_t configReg_MSB = (uint8_t)((0xff00 & configReg)>>8); // get Most Significant Byte of configReg
    uint8_t configReg_LSB = (uint8_t)(0x00ff & configReg); // get Least Significant Byte of configReg
    uint8_t configUpdate[4] = {CONFIG_REG_ADDR, configReg_MSB, configReg_LSB};
    if( writeRegBytes(configUpdate[0],(uint8_t*)&configUpdate[1],2, 0)) // Writes data into configuration register
    {
    result = false;
    }


    return result;
    }

    /**
    * Reads temperature data
    */


    bool T_read(uint16_t *temperature)
    {
    bool result = true;
    bool triggerFail = false;
    uint8_t loopCt = 0;
    uint16_t T_reading[6] = {0};
    uint8_t heaterOFF = 0; // Heater bit is set to 0(to turn OFF the heater)
    uint16_t delay = MEASUREMENT_DELAY;
    uint16_t temp;
    // res_of_t in "updateConfigRegister" can be set to 14 (for 14-bit resolution) or 11(for 11-bit resolution)
    // res_of_h in "updateConfigRegister" can be set to 14 (for 14-bit resolution) or 11(for 11-bit resolution)

    if(updateConfigRegister(RES_14BIT, RES_14BIT, heaterOFF, EITHER_T_OR_H))
    {
    //for(loopCt=0; (loopCt<1 && result && !triggerFail); loopCt++) // Read temperature reading 5 times and calculate the average
    //{
    delay = MEASUREMENT_DELAY; // Delay required for temperature measurement by the sensor
    do
    {
    if(trigger_measurement(delay, TRIGGER_TEMP))
    {
    _delay_ms(50);
    if(!(readTorHReg(temperature, &temp, TEMPERATURE_REG_ADDR)))
    {
    result = false;
    delay = 2* delay; // Increase the delay required for temperature measurement, if T read is not successful
    }
    else
    {
    T_reading[loopCt] = *temperature;
    result = true;
    }
    }
    else
    {

    triggerFail = true; // If the measurement trigger itself fails, flag error
    result = false;
    }

    if(!g_is_rht_query_rxd)
    _delay_ms(1); // To provide delay between io_write and io_read or 2 successive io_writes
    }while((delay <= 10 * MEASUREMENT_DELAY) && !result && !triggerFail && (!g_is_rht_query_rxd));


    }
    else // If "updateConfigRegister" fails make result = false, so that it will not calculate the average of the read temperature values
    {
    result = false;

    }

    return result;
    }

    /*
    * Reads the temperature register and stores the data in an array
    * @return Returns false if NACK is received while reading the data from the T and H registers; true, otherwise
    */
    bool readTorHReg(uint16_t *TsensorValue, uint16_t *Hsensor_value, uint8_t reg_add)
    {
    bool result = false;
    uint8_t NACK_check = 0;
    uint8_t readData[4] = {0};

    // The sensor sends the 16bit temperature register contents (MSB first).
    NACK_check = readRegBytes1(reg_add,(uint8_t*)readData, 2);// changed to 4 - 2

    delay_us(1000);

    if (NACK_check == 2)
    {

    *TsensorValue = ((readData[0]<<8) | (readData[1]));
    // *Hsensor_value = ((readData[2]<<8) | (readData[3]));

    result = true;
    }
    else
    {
    // if(g_hwDebugMode)
    // printf("Conversion is in progress, failed to read T or H\n");
    *TsensorValue = 0xFFFF;
    // *Hsensor_value = 0XFFFF;
    result = false;
    }


    return result;
    }


    Thanks in advance.

    Nandini

  • Hi Nandini,

    It's not clear to me where the configuration register is being set, are you setting bit 12 to 1 each time you want a RH & Temp measurement?

    A scope shot would be helpful, if you can get it to capture the full transaction of the write to config, wait, and read.

    Thanks

    -Alex Thompson

  • Hello Sir,

    We update configuration settings on every attempt. Yes, we are setting bit 12 to 1 each time when we want a RH & Temp measurement.


    Regarding the scope capture, we are not consistently hitting 125; Sometimes we see the 125 reading, but it's not happening consistently. It's challenging to capture the data during those time.

    Thanks in advance.

    Nandini

  • Nandini,

    How often do you read from the sensor? Also, what are you I2C pull-up resistor values? Are you able to monitor the current draw by the device during these conversions? Is it possible that your HDC1080 could be seeing drop outs on the VDD line, causing it to fall below the minimum VDD? 

    Since you seem to waiting long enough between conversions, and are setting the config register each time you want a measurement, the issue may be with I2C pullups that are too large or the sensor is damaged in some way. Could you please send a picture, zoomed into the sensor area and one of the whole part, to me please? I want to see if there is any damage or debris.

    Thanks

    -Alex Thompson