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: periodic zero (0), readings for temp / humidity.

Part Number: HDC2080

I have been using the HDC2080 for several months with good results.  Just started to notice every once in a while getting bad 0x00 readings from the temp / humidity result registers (registers 0 to 3).  This is an infrequent event (out of 109K samples it happened 3 times).  I am using the DRDY / INT line to tell me when the measurement is ready.

Other then the HDC2080 I have two other devices sharing the I2C line (their I2C addresses are 0xE0 and 0xEE).

Anyone else have this issue?

Doug

  • Dear Douglas -
    i have only seen this kind of behavior when the device loses power or communication line connection while MCU is running - mostly with a socket board, in the lab, because something moved the connection wires. what is the setup you are working with? are you powering up/down in between operations? how much time are you allowing before you attempt I2C communications after power up?
  • Think my issue is an I2C commuication issue with the other devices on the bus. For instance when things are working correctly my measurement configuration register (0x0F), reads as 0x00 before I change it to 0x01 to start measurement. After some communication to a different device on the i2C bus the measurement configuration register is now 0xF6? This is all NA settings. Working on fixing the communication issues now.
  • Hi Douglas,

    Douglas Richard said:
    Think my issue is an I2C commuication issue with the other devices on the bus. For instance when things are working correctly my measurement configuration register (0x0F), reads as 0x00 before I change it to 0x01 to start measurement. After some communication to a different device on the i2C bus the measurement configuration register is now 0xF6? This is all NA settings. Working on fixing the communication issues now.

    ...After some communication to a different device on the i2C bus the measurement configuration register is now 0xF6?...

    Don't get caught up on the register value at this point because it's probably random data/noise that managed to find its way into the register. If you can, explicitly initialize all registers on the HCD2080 with your initialization of the device.

    Good luck!

    Patrick

  • All registers initialized upon power up.  

  • Dear Douglas -
    please let me know when you feel as though you have completed your "clean up" and if you still need help.
    LSA or o'scope captures are most helpful to share.
  • Nope still working on it. If someone could enlighten me as to how measurement configuration register (0x0F) can change from 0x00 to 0xF6 without a direct I2C command that might help.
  • Douglas - it should not be changing on its own - you would have to be writing it, and i would doubt that noise could play into it...unless its alot and somehow you are getting the address correct enough to get ack'ed, but then having the data and possibly the register be that off...seems improbable...from binary point of view, the difference is too great.

    1111 0110 vs. 0000 0001

    if you have an LSA screen capture of all what you are doing or better yet an o'scope capture (or both) that would be great to share here.
  • Douglas Richard said:
    Nope still working on it. If someone could enlighten me as to how measurement configuration register (0x0F) can change from 0x00 to 0xF6 without a direct I2C command that might help.

    Hi Douglas,

    some questions to consider in addition to Josh's fine comments and suggestions...

    1. is this a repeatable error, and if so what are the knowns (ie, it happens after 895 ms after .... )

    2. is your sensor working properly without any other sensors?

    3. How can you reproduce the error?

    Patrick

  • First off thank you all for your help.

    Attached is the capture from my Saleae logic analyzer.

    Everything is running fine up until the 8.6 second mark.  At that point a gas gauge (address 0xE0), that shares the I2C bus with the temp / humidity sensor gets serviced.  After that point my temp readings are bad.

    By removing the gas gauge code I don't have this issue anymore.

    So now the question is why does servicing the gas gauge effect the HDC2080?

    Doug

    gag gauge mess up temp_hum reading.zip

  • Hi Doug,
    Sounds like you have forward momentum in your project, which is always a plus! Would you mind posting the images on the forum instead of a compressed file?
  • Again thank you all for your help.  Believe I found the issue and working on the solution.  Once I have it worked out I will post the final results.

    Doug

  • ... also Doug, without viewing your code or knowing if you are utilizing the sensor controller or main uC, this is a general suggestion to:
    1. ensure your code is wrapped in a pass/fail if statement (if in sensor controller studio) or a case statement if on the main uC. SCS does not allow for case statements. Your code might be cascading and going rogue when one of your sensors is not in the ready state due to timing contention.
    2. you can nest one sensor service in another, doing away with a timing clash - in other words you force your program into a service of one sensor at a time; it's not the best final answer but helps debug at this time.
    3. add in some GPIO LED flashes for debugging.
  • So long story short the servicing of a different sensor (gas gauge), on the same I2C line was messing up the HDC2080.

    Unrelated to the i2c bus I have a process that needs to be serviced every 1 mS. The gas gauge takes several mS to service so I need to break it up. The way I broke it up was effecting the HDC2080. I changed the way I was servicing the gas gauge so it no longer effects the HDC2080.

    Again thank you all for your help.

    Doug