Jump to content
Forum sending old emails Read more... ×
mph

TI HDC2010 temp-humidity sensor

Recommended Posts

There is code available to implement I2C communication between the MSP430 and the HDC2010 temperature-humidity sensor, but it's a bit like an onion -- you have to peel away layer after layer in various libraries to drill down into what is happening at the register level.  I decided to write some transparent demo code for this sensor that is self-contained: everything related to the I2C interface is in a single C program.  It has been successfully tested with the F5529 Launchpad.  This is a simple MCU polling operation that periodically makes a T-H measurement using the on-demand mode of the sensor. The data is sent to the serial port for display on a terminal program.  The on-board heater is activated for a few seconds upon reset. I have not implemented the temperature-humidity high/low interrupts. One could also configure the sensor to output data periodically and toggle its DRDY pin to wake-up the MCU from LPM4.  Polling code is here:

https://github.com/microphonon/HDC2010

The HDC2010 is a tiny sensor with a 6-bump BGA footprint.  TI makes an evaluation module that uses an MSP430F5528 to interface the sensor with a configuration/graphing GUI program.  Their program only runs on 64-bit Windows.  The portion of the PCB hardware containing the sensor can be broken off (permanently) to reduce thermal mass and allow placement in a project.  I decided to make my own breakout boards (see photo), but just learned that MikroElektronika started selling essentially the same thing for $13 (MIKROE-2937).

 

HDC2010.jpg

Share this post


Link to post
Share on other sites

Github has been updated with firmware for the MSP430FR59xx; developed with the FR5969 Launchpad.  This was a non-trivial modification of the above F5529 code as all the configuration registers are different.  My Launchpad was unable to supply the ~90 mA of sensor heater current.  By moving some jumpers, it can be configured to run from an external 3.3V supply and the heater worked OK.  The heater is not necessary for sensor operation.

TI sells a TIDA-01625 demo board that integrates the HDC2010, MSP430FR5969, and low power TFT display.  They have CCS code on their github but it involves a multitude of nested libraries.  The code I have written is very compact with all sensor and display operations contained in a single C program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×