mph 10 Posted September 7, 2018 Share Posted September 7, 2018 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). Fmilburn, dubnet and Rei Vilo 2 1 Quote Link to post Share on other sites
Fmilburn 445 Posted September 8, 2018 Share Posted September 8, 2018 Hi @mph It is good to see someone new contributing code. Nicely written and commented. mph 1 Quote Link to post Share on other sites
mph 10 Posted September 21, 2018 Author Share Posted September 21, 2018 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.