i2c scan fails for sensor HDC1008 [Update]

Hi All,

I'm fully new to Arduino, I just got an Arduino UNO R3 and bought a HDC1008 temperature/humidity sensor to get startet. (GitHub - watterott/HDC100X-Breakout: Breakout with TI HDC1000 or HDC1008 Humidity and Temperature Sensor)

I wired the breakout board to GND, 3,3V and on SCL and SDA, but I did not connect the DRDY pin (No idea what that is for)

I tried to use the I2C scanner, but both did not display anything (does it take long?)

Is there another way to check if the sensor is working fine?

Did I wired the sensor correctly?

Furthermore, I found this here: https://forums.electricimp.com/discussion/3404/error-writing-16-bits-to-i2c-register-code-for-hdc1008-hdc1000-humidity-sensor-from-ti

[UPDATE]
I rewired to A4(SDA) and A5(SCL) and did not use the pins next to AREF (. Once today I had the sensor up and running, it was found as address 67 by Gammon's I2C scanner (still at 3,3V). It gave me -39° and 2,5% humidity.

Now I am not able to get it running again, the I2C scanner fails at "if (Wire.endTransmission () == 0)"

// I2C Scanner
// Written by Nick Gammon
// Date: 20th April 2011

#include <Wire.h>

void setup() {
  Serial.begin (115200);

  // Leonardo: wait for serial port to connect
  while (!Serial) 
    {
    }

  Serial.println ();
  Serial.println ("I2C scanner. Scanning ...");
  byte count = 0;
  
  Wire.begin();
  Serial.println ("wire.begin");
  for (byte i = 8; i < 120; i++)
  {
    Serial.println ("for loop");
    Wire.beginTransmission (i);
    Serial.println ("begin Transmission");
    //delay(6.35);
    if (Wire.endTransmission () == 0)
      {
      Serial.println ("endTransmission");
      Serial.print ("Found address: ");
      Serial.print (i, DEC);
      Serial.print (" (0x");
      Serial.print (i, HEX);
      Serial.println (")");
      count++;
      Serial.println ("for loop");
      delay (1);  // maybe unneeded?
      } // end of good response
     Serial.println ("after IF == 1"); 
    if (Wire.endTransmission () == 1)
    {
     Serial.println ("1:data too long to fit in transmit buffer");
   
      }
    if (Wire.endTransmission () == 2)
    {
      Serial.println ("2:received NACK on transmit of address");

      }
    if (Wire.endTransmission () == 3)
    {
      Serial.println ("3:received NACK on transmit of data");
 
      } 
     if (Wire.endTransmission () == 4)
    {
      Serial.println ("4:other error");
      }      
  } // end of for loop
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
}  // end of setup

void loop() {}

[UPDATE - 2]
As soon as I remove the SDA and SCL (A4 and A5) pins while running the program, the scan starts and finds nothing.

Does anyone have an Idea why the I2C scan fails at that point?

thank you all :slight_smile:

Hi,

Please power the HDC1008 with 5V, because the Arduino Uno has 5V IOs.

The default I2C address is 0x43 (ADR0=1 and ADR1=1).

Here are also two Arduino libs for the HDC100x sensor:

Rgds
Andreas

Hi Andreas,

when I try to power the sensor with 5V, my arduino will not start (On lap will stay off)

do you have any other suggestions? TI says that the best voltage is 3V
regards
dahunter

Hi,

Can you post a photo of your setup/wiring? If the ON LED on the Arduino stays off then there is a short circuit.

If you want to power it with 3.3V then you have to use a level shifter for SDA+SCL between the sensor and Arduino.

Rgds,
Andreas

Wiring looks like this.

Pull Up resistor is 4k7 OHM.

Same wiring with 5V is not possible, arduino stays off.

I2C Scanner doesn't scan with this 3,3V configuration, do you know why?

The wiring looks okay, but you do not need pull-up resistors, because there are already 4k7 on the sensor board. HDC1008 breakout schematics

Do you have soldered the pin headers to the breakout?

Rgds,
Andreas

they are. I'll give my PI2 a shot this weekend and see what happens.

[EDIT] Tried another library (DssCircuits.com is for sale | HugeDomains) and this tells me that there is a problem with the bus, when the HDC1008 is connected. Without HDC1008, the scan finds nothing.

Works on the raspberry PI 2 with 3.3 volt - no idea why that is not working with 5V at the arduino.

Results still wrong, get -39° and 2,5% humidity.