I have HH100D humidity sensor. It outputs a frequency signal, which I know how to handle. However, it also has a small EEPROM with calibration values that is available via I2C. Those values are necessary to get the actual humidity.

The problem is, that I'm very new to I2C. I cannot figure out how to read out those bytes. I've googled for half a day and still got no solution.

There's something I have:


You are going to want to use the Arduino Wire library (more details here) to talk to the device (it comes built in with the IDE).

The I2C lines you will need to connect between your Arduino and your Sensor are SDA, SCL, and GND. Namely:

  • Arduino Analog Pin 4 = SDA = Sensor Pin SDA (2)
  • Arduino Analog Pin 5 = SCL = Sensor Pin SCL (1)
  • Arduino GND Pin = GND = Sensor Pin GND (5)

Depending on the distance between the Sensor and the Arduino you might also need external pull up resistors (e.g. 3.3k Ohm) connected between each of SDA and SCL and VCC.

There's a gotcha though. The sensor appears to operate at 3.3V and the Arduino operates at 5V. So to "interface" I2C between them you need to use transistors to level shift the signaling as described in this other post (with this key reference). You're going to want those pull up resistors I mentioned on either side of the level conversion transistors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.