The HDC1080 by Texas Instruments is a digital humidity sensor with an integrated temperature sensor that offers high accuracy and low power consumption. Designed for high precision with a minimalistic approach to power requirements, the HDC1080 is ideal for a wide range of applications including smart thermostats, home automation, personal weather stations, and any other system that requires environmental monitoring.
Pin Number | Name | Description |
---|---|---|
1 | VDD | Power supply (2.7V to 5.5V) |
2 | GND | Ground |
3 | SDA | I2C Data |
4 | SCL | I2C Clock |
5 | ADDR | I2C Address select |
6 | DRDYn | Data Ready (active low) |
To use the HDC1080 in a circuit:
#include <Wire.h>
#include "ClosedCube_HDC1080.h"
ClosedCube_HDC1080 hdc1080;
void setup() {
Serial.begin(9600);
Wire.begin();
hdc1080.begin(0x40); // Initialize HDC1080. Default I2C address is 0x40
}
void loop() {
double temperature = hdc1080.readTemperature();
double humidity = hdc1080.readHumidity();
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println("°C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println("%");
delay(2000); // Wait for 2 seconds before reading again
}
Note: This example uses the ClosedCube_HDC1080 library, which simplifies the interaction with the sensor. Make sure to install the library through the Arduino Library Manager before compiling the code.
Q: Can the HDC1080 be used outdoors? A: Yes, but it should be protected from direct exposure to water and sunlight.
Q: How can I change the I2C address? A: The I2C address can be changed by connecting the ADDR pin to either VDD or GND.
Q: What is the default I2C address of the HDC1080? A: The default I2C address is 0x40.
Q: How long does it take for the HDC1080 to take a measurement? A: The typical measurement time is about 15 milliseconds for temperature and 125 milliseconds for humidity.
For further assistance, consult the HDC1080 datasheet and the Texas Instruments support forums.