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.

CCS/HDC2010: Automatic ODR mode is not automatically updating humidity reading

Part Number: HDC2010

Tool/software: Code Composer Studio

I'm using the HDC2010 on my own hardware.  On-demand measurement mode has been working fine with this device, and I'm trying to get automatic ODR mode to work.  i want to set the HDC2010 so it samples at 5Hz, and then I'll read the latest humidity reading once per second.  I'm not using the interrupts; I just have a one second timer on my microcontrolller to trigger a read.  When I setup the HDC2010 for automatic ODR mode, the humidity register doesn't update unless I also trigger a reading in the Measurement Configuration Register.  Here's the sequence I am following from power up:

1. Power up system and wait at least 100 milliseconds prior to talking to the HDC2010

2. Set register 0x0E (Reset and DRDY/INT Configuration Register) to 0xF8.  This performs a soft reset of the sensor, sets the ODR for 5Hz and turns on the heater.

3. Wait for 10 milliseconds

4. Set register 0x0E to 0x70.  This turns off the heater and leaves the ODR at 5 Hz.

5. Set register 0x0F to 0x05.  This triggers measurements to start and sets the sensor to only perform humidity measurements.

6. Once per second, do the following:

a. Read register 0x0F, set bit 0 of the result to 1 and write back to register 0x0F.  This triggers a measurement.

b. Wait at least 2 milliseconds.

c. Read registers 0x02 and 0x03 to get the humidity reading.

If I do all the following steps above, I get updated humidity measurements each time through the loop.  If I skip step 6a, then I get a valid humidity reading each second but they all match the first reading.  If I skip steps 5 and 6a, then all humidity readings are 0.

Is there some other order I should be performing the register settings?  How do I get automatic ODR mode to run without forcing measurement triggers?

  • Hi Bryan,

    Everything looks correct, but one important note is that you only need to run 6a once, and then ODR will output at the rate specified in your startup sequence.

    Therefore, the reading loop should only include 6b-6c.

    Please let me know if this answers your question.

    Best Regards,

    Matt

  • Matt,

    Yes, this is what I would like to do. However, if I don't include step 6a in the above sequence, then the humidity reading never changes. I just keep reading back the first entry that was triggered due to step 5. Now I'm checking the DRDY bit in the Interrupt DRDY register (address 0x04), and the DRDY bit only gets set if I first set bit 0 in the Measurement Configuration register (address 0x0F).

    Any other reasons why setting up automatic ODR mode does not update the humidity sample?

    Thanks,
    Bryan
  • Hi Bryan,

    You will still need 6a to start the continuous conversion, but only need to write to this register field once. Have you tried to run 6a only once before the repetitive reads?

    Best Regards,
    Matt
  • Yes, I've tried this. If I never set bit 0 in register 0x0F, then I always read back 0. If I set bit 0 in register 0x0F once after all the other register configuration, then humidity reading is a valid value but never changes on repeated readings. The only way I can get updated humidity readings is if I set bit 0 in register 0x0F prior to performing the reading, regardless of the ODR setting.
  • Hi Bryan,

    Can you verify that you read transaction is following the frame shown in the below post. It may be that the previous trigger is providing some form of termination before the read. If my assumption is correct, it would mean that you could probably have replaced the trigger with any type of arbitrary write or read. I've provided a link below that shows the correct format with sequence when reading from the register, please let me know if this helps in resolving your issue.

    e2e.ti.com/.../687873

    If the above doesn't work, I will require an oscilloscope capture of the I2C transactions for the trigger and read.

    Best Regards,
    Matt
  • Matt,

    If I follow the sequence shown in the flow chart that you referenced, then I can read humidity data just fine and I can tell from the data that I am getting updated readings.  However, I am trying to collect data with an ODR of 5 Hz as shown in the flow chart below:

    With the above sequence shown, I will read the temperature and humidity registers successfully, but the temperature and humidity values never change after the first reading.  Is there a different sequence required to get the humidity sensor to continuously update the temperature and humidity registers?

    Thanks,

    Bryan

  • Hi Bryan,

    I don't see anything wrong with the sequence you have provided. From my understanding the above should set the ODR to update every 200ms (5Hz). Can you enable DRDY interrupt and inspect DRY/INT pin? This would verify if the ODR is being correctly entered, as you would see a periodic pulse on the DRDY pin that would suggest ODR operation.

    Best Regards,
    Matt
  • Hi Bryan,

    Were you able to capture the above for review?

    Best Regards,
    Matt