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.

HDC2080: Sporadic Error readings

Part Number: HDC2080
Other Parts Discussed in Thread: CC2650MODA, CC2650, BOOSTXL-BASSENSORS

Hi,

I'm programming my HDC2080 (with cc2650MODA) to read temp and hum each 60 seconds.

First I programmed the sensor to be powered by VDD and all worked fine.

Now I programmed the sensor to be powered by DIO_3 and sometimes the value that I get is like if the sensor was turned off.

Am I configure the dio_3 wrong (see in the image how I configura the DIO_3 in sensor controller studio)? or what can be wrong?

Thanks,

JR

  • Hi Jorge,

    Are you sure you are giving the sensor sufficient time to boot up before you read out the sensor values? Can you try adding a small delay between setting the IO high and reading the sensor?

    The sleep current of the sensor is 50 nA, so another alternative is simply to put the sensor in sleep between your readouts. 

    Regards,
    Fredrik

  • Hi

    In my code I start Sensor controller and never put it sleeping so the DIO_3 is always 3.3 V. 

    As the DIO_3 is always 3.3 V the sensor is always powered.

    I can see by the measures that sometimes the measurements are equivalent to the sensor is powered off.

    And I say equivalent the sensor is powered off because (when I see error measurements) even if the the measure was not made sucefully the cc2650 would read the last measure, right?.

    why this happens? what could be wrong? 

    Thanks.

    JR

    PS: I click "this resolved my issue" by mistake

  • Dear Jorge -

    Let's review the configuration please - if you could send that over - that would be great and any sequence you are using. 

    I would recommend following a flow like what has been put here: 

    http://www.ti.com/lit/an/snaa312/snaa312.pdf

    Also, just FYI - on the CC2640R2 LaunchPad Platform, there is complete SW "plugin" which uses a BoosterPack (BOOSTXL-BASSENSORS) you could have a look at or switch over to. 

    http://www.ti.com/tool/download/SIMPLELINK-SDK-SENSOR-ACTUATOR-PLUGIN

    http://www.ti.com/tool/simplelink-cc2640r2-sdk

    http://www.ti.com/tool/BOOSTXL-BASSENSORS

    http://dev.ti.com/tirex/explore/node?node=ALZQ5W9aPtmM8LgXA1WvOQ__swcUKHN__LATEST

    In case you want to power up and down, below is the basic code for this that I have tested down to, using GPIO for power source (in this case MSP432E4, but it should be similar idea for CC2650)

    where SensorPowerUp() and SensorPowerDown are: 

    void SensorPowerUp(void)
    {
    MAP_GPIOPinWrite(GPIO_PORTL_BASE, GPIO_PIN_2, GPIO_PIN_2);
    }

    void SensorPowerDown(void)
    {
    MAP_GPIOPinWrite(GPIO_PORTL_BASE, GPIO_PIN_2, 0);
    }

    ===========

    while(1)
    {

    SensorPowerUp();
    MAP_SysCtlDelay(DELAY_1000_US*3.05);

    txBuf[0] = 0x01;
    retState = WriteToSensor(SLAVE_ADDRESS, 0x0F, txBuf, 2);

    if(retState == I2C_MASTER_ANAK)
    {
    while(1);
    }

    MAP_SysCtlDelay(6000000);
    do
    {
    ReadFromSensor(SLAVE_ADDRESS, 0x04, rxBuf, 1, true);
    } while((rxBuf[0] & 0x80) != 0x80);

    ReadFromSensor(SLAVE_ADDRESS, 0x00, rxBuf, 4, true);

    UARTprintf("Temp 0x%02x%02x ",rxBuf[1],rxBuf[0]);
    UARTprintf("Humidity 0x%02x%02x\n",rxBuf[3],rxBuf[2]);
    }

  • Hi,

    For now I just want to power up sensor and stay like that. I already verified that the error is the way I configured the DIO_3

    I configured the DIO_3 in the "resource task"... need I to configure the DIO_3 in the initialization code again?

    I send my sensor controller studio project.

    Thanks,

    JR

    project.rar

  • Dear Jorge - 

    it would be easier probably to just capture with logic analyzer the behavior - most all of us use the Saleae LSA, as it makes it easy to capture and also save/send the complete captures) but if you have another model or o'scope - be best to see the behavior of the lines - so please measure SDA, SCL, your GPIO line and INT/DRDY and send that over.