The AHT10 is a digital temperature and humidity sensor module that provides accurate and reliable measurements of ambient temperature and humidity. It uses a calibrated digital signal to communicate data to a microcontroller, typically via the I²C interface. The sensor is compact, low-power, and suitable for use in various applications such as environmental monitoring, weather stations, HVAC systems, and home automation projects. It operates within a wide temperature range and provides precise readings with a relatively fast response time.
Operating Voltage | DC 1.8V to 6.0V |
---|---|
Humidity Measurement Range | 0% to 100% relative humidity |
Humidity Measurement Accuracy | ±2% RH (Resolution: 0.024%) |
Temperature Range | -40°C to +80°C |
Temperature Measurement Accuracy | ±0.3°C (Resolution: 0.01°C) |
Interface | I²C (Default address: 0x38; can be changed to 0x39 by adjusting a resistor) |
According to the manufacturer, it is recommended to store the sensor for at least 12 hours at a humidity level above 75% to ensure accuracy (this rehydrates the sensor's polymer).
AHT10 | Arduino UNO |
---|---|
GND | GND |
VIN | 3.3V or 5V |
SDA (I²C Data) | A4 |
SCL (I²C Clock) | A5 |
The following source code for reading temperature and humidity uses the Thinary/AHT10 library.
#include <Wire.h>
#include <Thinary_AHT10.h>
AHT10Class aht10;
void setup() {
Serial.begin(9600);
Wire.begin();
if (aht10.begin(0x38)) {
Serial.println("Error init!");
while (1);
}
}
void loop() {
Serial.println("Humidity: " + String(aht10.GetHumidity()) + "%");
Serial.println("Temperature: " + String(aht10.GetTemperature()) + "°C");
Serial.println("Dewpoint: " + String(aht10.GetDewPoint()) + "°C\n");
delay(1000);
}