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.

HDC2080: Temperature Reading 3-5 C higher than actual room temp (BP-BASSENSORSMKII)

Part Number: HDC2080
Other Parts Discussed in Thread: BP-BASSENSORSMKII, TM4C1294NCPDT, TMP117, HDC2021, HDC2022, HDC2010

Hi,

I've been messing around with the HDC2080 on the BP-BASSENSORSMKII sensor board interfaced with a TM4C1294NCPDT on the EK-TM4C1294NCPDT evaluation board for a few days now. I am using TI-RTOS and basically just reading temperatures and humidity readings and sending them over an ethernet link to another device for further processing. I've scoured the forums for an answer and followed the recommendations in various user guides and documents but nothing seems to solve my issue. I have tried several different on the BP-BASSENSORSMKII boards and all of the HDC2080s read temperatures 3-5 C higher than room temperature. The TMP117s on the same board read much more accurately with no issues. 

I am using an interrupt based model - the HDC2080 triggers conversions at 1 Hz in automeasurement mode, and I verify the data ready bit is set in the 0x04 register, so it shouldn't be an issue of reading the result registers before a conversion has completed. Below is a photo from a Saleae Logic Analyzer of the I2C transaction. If any other information is required, please let me know. Why have several different sensors on different BP-BASSENSORSMKII read inaccurate temperatures? The humidity result seems to be more accurate and falls in line with the +/- 2% RH accuracy. If the humidity depends on the temperature reading, how can the RH be accurate within the accuracy range, but the temperature be so far off?

Here are the conversion formulas I'm using as well - 

temperature_raw = (rxBuffer[1] << 8) + rxBuffer[0];
temp_C = (temperature_raw/65536.0)*165-40;

humidity_raw = (rxBuffer[3] << 8) + rxBuffer[2];
rel_H = (humidity_raw/65536.0)*100;

  

  • Dear Chris - 

    More than likely you are picking up the heat from the EK-TM4C1294NCPDT - both sets of BoosterPack headers are located above MCUs on that board. You could confirm that by separating the boards physically, extending the connections with wire jumpers and rechecking. 

  • Hi Josh,

    Thanks for the reply. I considered the residual heat from the main microcontroller as well as the debugger, so I have the booster pack connected to header pins above the debugger (BoosterPack 1) and I'm powering the EK from USB OTG power so the debugger MCU shouldn't be running. Verified this by checking voltage at TP1 and confirmed 0 volts.

    I also tried having the system running with the sensor board connected with jumper wires several inches away from the main board, along with the whole board being powered by USB OTG and I'm still seeing readings roughly 3 degrees C higher than room temp. This number seems to vary between 3-5 degrees throughout the day as the room temp increases. Any other suggestions?

    Thanks!

    Chris

  • Here's my task as of now that reads the hdc2080 for extra context

    Void readHdc2080Fxn(UArg arg0, UArg arg1) {
    	MsgObj          temperature_msg;
    	uint32_t	    temperature_raw;
    	uint32_t		humidity_raw;
    	float			rel_H;
    	float			temp_C;
    	uint8_t			rxBuffer[4];
    	uint8_t			txBuffer[2];
    
    	for (;;) {
    		Semaphore_pend(semaphore0, BIOS_WAIT_FOREVER);
    
    		txBuffer[0] = 0x04;
    		i2cTransaction.slaveAddress = Board_HDC2080_ADDR;
    		i2cTransaction.writeBuf = txBuffer;
    		i2cTransaction.writeCount = 1;
    		i2cTransaction.readBuf = rxBuffer;
    		i2cTransaction.readCount = 1;
    		if (!I2C_transfer(i2c, &i2cTransaction)) {
    			System_printf("I2C bus fault - data ready check\n");
    		}
    
    		/* DRDY redundancy check */
    
    		if (rxBuffer[0] != 0x80) {
    			System_printf("data not ready even though interrupt fired!");
    		}
    		else {
    		/* read temperature high register. the register pointer
    		 * auto-increments, allowing us to read all temperature/humidity
    		 * registers in one i2c transaction
    		 */
    
    		txBuffer[0] = 0x00;
    		i2cTransaction.slaveAddress = Board_HDC2080_ADDR;
    		i2cTransaction.writeBuf = txBuffer;
    		i2cTransaction.writeCount = 1;
    		i2cTransaction.readBuf = rxBuffer;
    		i2cTransaction.readCount = 4;
    		if (!I2C_transfer(i2c, &i2cTransaction)) {
    			System_printf("I2C bus fault - temperature read\n");
    		}
    
    		temperature_raw = (rxBuffer[1] << 8) + rxBuffer[0];
    		temp_C = (temperature_raw/65536.0)*165-40;
    
    		humidity_raw = (rxBuffer[3] << 8) + rxBuffer[2];
    		rel_H = (humidity_raw/65536.0)*100;
    
    		temperature_msg.id = TEMP_SENSE_TASK_ID;
    		temperature_msg.temperature = temp_C;
    		temperature_msg.rel_humidity = rel_H;
    
    		/* post the message in the mailbox for the UDP task */
    		Mailbox_post(temperature_mailbox, &temperature_msg, BIOS_WAIT_FOREVER);
    		GPIO_toggle(Board_LED2);
    
    		}
    	}
    
    }

  • Chris - 

    I don't have this MCU board at the house - I think I do have one in my office - best I can do here is check on Tuesday when back in the office. 

    I agree it should not be that different - by coincidence, recently I have been using that BoosterPack quite a bit and using the TMP117 as a reference and I have been putting them in a chamber with a controlled reference, and I have not noticed anything like this offset you describe - I do though want to let you know that with the HDC2080, you do need to use '-40.62' instead of '-40' in your equation for temp. This is only applicable to the HDC2080 and is due to an error in procedure about a specific probe offset that was made from characterization to production - not an issue with the silicon. 

    your code looks fine - i think it does same exact thing as my version

    HDC2_temp_MSB = (iBuff_HDC2[1] << 8); // shift left
    HDC2_temp_DEC = (HDC2_temp_MSB + iBuff_HDC2[0]); // get value for calculation, made from iBuff index array values 0 and 1 for temp reading.
    HDC2_temp_celcius = ((float)(HDC2_temp_DEC) / 65536) * 165 - 40.62; // do math for HDC2080
    // HDC2_temp_celcius = ((float)(HDC2_temp_DEC) / 65536) * 165 - 40; // do math for HDC2010, HDC2021, HDC2022, comment in when using those devices, comment out line above
    Serial.print(HDC2_temp_celcius); // print out temperature to terminal
    Serial.print(",");

  • Ah that's good information. I've updated the task calculation to use -40.62 instead of the original 40. Curiously enough, this morning as of now it's reading accurate temperatures (~25C), but now the humidity is reading 9% higher than actual! (45% actual, 54% detected). This is the first time I'm seeing humidity readings outside of the +/- 2% accuracy range. This one has me stumped. My setup is at home so I don't have any controlled chambers or other equipment to test on. I can try a few other BASSENSOR packs and see if they exhibit the same behavior.   

  • Chris - 

    OK, let us know what you find - its not uncommon in an office environment to have a gradient on %RH - if you have two units you can place in any sort of enclosure or or cover, to block moving air due to folks breathing, etc, you might see more consistency, in the absence of access to a chamber.