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-Q1: HDC302x automatic measurement mode

Part Number: HDC3020-Q1

We plan on measuring RH and temperature periodically.

Quoting from the datasheet (section 8.5.7.3.2):

"The latest measurement acquisition in Auto Measurement Mode can be retrieved using a measurement readout command"
"Once the measurement readout is complete, the HDC302x clears the measurement result from memory"
"As in Trigger-On Demand, if the I2C controller attempts to read the measurement results prior to measurement completion, the HDC302x will respond with a NACK condition"

Assume that during initialization I configure the device for AMM with a rate of 1 Hz and wait for, say, 100 ms (all this only performed once).

What will happen if then I attempt reading RH and T (using command E0 00) periodically every 100 ms? Will I ever encounter a NAK?

If yes, and I need to poll the device (for say 20 ms) until receiving an ACK, what is the use of AMM (other than accumulating minimum and maximum statistics)?

Thanks.

  • Beni,

    If I am understanding correctly, you are asking what will happen if you measure 10 times per second, but the HDC302x-Q1 is only acquiring data once per second? The first read you perform with the 0xE000 command after the conversion will provide the data, and then it is cleared from memory. The rest should provide NACKs since no new conversion data is available. If you want to set the AMM to 1Hz, I would just only poll the sensor once a minute. 

    Thanks

    -Alex Thompson

  • Alex,

    Thank you very much for your prompt reply.

    1. It is now my understanding that when AMM is active, the device automatically updates the internal measurement buffer at the programmed rate. If the previous measurement has not been read by the controller, it is silently overwritten.

    When 0xE000 command is issued, if the measurement buffer is not empty, then its contents is returned immeditately, without a NAK (and the device internally marks the buffer as empty).

    If the buffer is empty when 0xE000 command is issued, this command triggers a measurment. The device will return a NAK to the controller until the measurement is complete (up to 20 ms or so). Following the read, the buffer will be marked empty.

    Is my understanding correct?

    2. If yes, then I presume that it I use 1 Hz AMM and perform readout via 0xE000 command once every 2 seconds, then I will never see a NAK.
    Why did you suggest polling the sensor only once per minute?

    3. I read somewhere on this forum (can't find it now) that if the device is set up for AMM and an ALERT event occcurs, the device automatically reverts to triggered mode. I haven't found anything like that in the datasheet. Can the device switch from AMM to triggered mode by itself for any reason (except a hardware or software reset)?

    Again, thanks.

    Beni Falk

  • Hi Beni,

    1. Yes you are correct. I would say that the 0xE000 command triggers a reading in AMM, but not a new measurement. If the data is not ready, it will either return a NACK or all the data will be 0xFFFF.

    2. Sorry for the confusion here, I misread the frequency. You are correct that it should not be polled once a minute, but every 2 seconds would be more appropriate. You should never see a NACK or 0xFFFF if you set the AMM to 1Hz and poll every 2 seconds.

    3. If an ALERT is triggered, it can be cleared with a reset event (power cycle, nRESET pin, soft reset command). This will then place the sensor back into it's default shutdown mode (trigger on demand mode). You can program the EEPROM on this device to change the default measurement state if desired using the 0x61BB command, so that when the reset is sent, the device remains in AMM (note, this is a NVM programming change, and requires the device to already be in shutdown mode and the user must wait 77ms after the command is sent before issuing any more communications, otherwise the NVM can be corrupted). The device should not switch from AMM to triggered mode unless a reset event has occured.

    Thanks

    -Alex Thompson