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.

HDC3020: Trigger on Demand Mode gives only previous sampled data

Part Number: HDC3020
Other Parts Discussed in Thread: HDC3022,

Tool/software:

Hi,

I see the same problem as described in the following link: 

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1353800/hdc3020-trigger-on-demand-mode-gives-only-prevoius-sampled-data?tisearch=e2e-quicksearch&keymatch=hdc3020%20trigger%20on

In my case, I do not perform a reset but read the temperature every minute.

I have noticed that the received temperature similar to the previous minute.

For example: if the temperature in the first minute is equal to 10c, in the second minute is equal to 20c, and in the third minute 30c, the receive value in the second minute is 10c, and in the third minute 20c.

Is it a limitation? How can I overcome it?

  • Hi, 

    Another minor update, the exact sensor name is HDC3022DEJR, but I do not think it makes much difference :)

  • Hello Yair,

    This is not expected behavior, there should not be such a lag in the readings. Which commands are you using to read from the HDC3022? Are you using trigger on demand mode, or automatic measurement mode? If you can, sharing your code and a scope shot of the communications would be helpful.

    I am providing a link to our ASC Studio Code Example for HDC3020. This link has example C code for communicating with HDC302x, I would recommend cross-referencing your communications with the example code here to ensure there is no code error.

    Are you reading/reporting the data from the sensor immediately after doing the data read request?

    Thanks

    -Alex Thompson

  • Hi,

    I have captured the I2C communication and attached screenshots of the communication and saleae log file (Temperature I2C comm.rar).

    As you can see there are 4 sensor samples every 1min.

    The temperature reading command is: 0x2400, trigger on demand.

    After each temperature reading command, there is 20ms delay (see screenshot) and only after it we read the result.

    Immediately after the first sample, I turned on a heater, and expected that the temperature increase.

    But the temperature remained constant for the second sample and changed only in third sample.

    Here is a table of the sensor response values with the converted values:

    Sample No. Byte 0 Byte 1 Reported Temperature
    1 65 4 24.0547036
    2 65 0C 24.0760662
    3 72 A0 33.3581292
    4 73 D7 34.1886015

    Temperature I2C comm.rar

    I hope that this will create everything's.

    Please advise,

    Y.H.

  • Yair,

    I would try and repeat the transactions with SCL released high during the 20ms conversion time, HDC3020 does not clock stretch but some similar devices do. I would see how the linked code from ASC studio works for you and if you still see the issue.

    Have you tried this on multiple devices, and with a faster sampling rate? Do you see this issue no matter how frequently you query for data?

    Thanks

    -Alex Thompson