AHT10 Temperature and Humidity Sensor
The AHT10 is a next-generation temperature and humidity sensor that sets new standards in both size and intelligence. It features a compact, pin-less SMD (Surface-Mount Device) package that is suitable for reflow soldering, with dimensions of 4 x 5 mm and a height of 1.6 mm. The sensor outputs calibrated digital signals in a standard I2C format. The AHT10 is equipped with a newly designed ASIC chip, an improved MEMS (Micro-Electro-Mechanical Systems) capacitive humidity sensing element, and a standard integrated temperature sensor, all of which deliver significantly enhanced performance, even exceeding the reliability levels of previous-generation sensors. This new generation of temperature and humidity sensors has been optimized for better stability in harsh environments. Each sensor undergoes calibration and testing, with the product batch number printed on the surface. Due to the improvements in design and miniaturization, the AHT10 offers a higher cost-performance ratio, benefiting all devices that incorporate it, with its cutting-edge energy-efficient operation mode. Applications include HVAC (heating, ventilation, and air conditioning), dehumidifiers, testing and measuring equipment, consumer electronics, automotive systems, automatic controls, data loggers, weather stations, home appliances, humidity regulation, medical devices, and other temperature and humidity control-related fields.
Module Source
Purchase Link:
https://item.taobao.com/item.htm?spm=a230r.1.14.28.5b982786BAvoXy&id=630894804483&ns=1&abbucket=19
Baidu Netdisk Download Link:
https://pan.baidu.com/s/1xTX_QCmEmy8DWgxgtgXXFw
Password: pp3k
Specifications
Operating Voltage:1.8~3.6V
Operating Current:0.25~23uA
Humidity Accuracy: ±2% RH Temperature Accuracy: ±0.3°C Output Method: IIC
Pin Count: 3 Pins
Hardware Connection
- VCC: Connect to the 3.3V pin on the development board.
- GND: Connect to the GND pin on the development board.
- SCL: Connect to the A5 pin on the development board (SCL).
- SDA: Connect to the A4 pin on the development board (SDA).
Usage Method
Install Library
- Open the Arduino IDE.
- Go to the menu bar and click on “Tools” > “Manage Libraries…”.
- In the Library Manager that pops up, type "
Adafruit AHTX0
" into the search box. - Find and select the "
Adafruit AHTX0 library
", then click “Install”.
Enter the code:
/******************************************************************************
* Test Hardware: LCSC ColorEasyDuino Development Board
* Version Number: V1.0
* Modified By: www.lckfb.com
* Modification Date: April 10, 2024
* Function Overview:
*****************************************************************************
* Open-source development board hardware and software information and related projects hardware and software information on official website
* Development board official website: www.lckfb.com
* Technical support resident forum, any technical problems are welcome at any time to exchange learning
* LCSC Forum: club.szlcsc.com
* Follow our Bilibili account: [立创开发板], stay toned to our latest news!
* We focus on cultivating Chinese engineers rather than profiting from board sales.
******************************************************************************/
#include <Adafruit_AHTX0.h>
Adafruit_AHTX0 aht;
void setup() {
Serial.begin(9600);
// 等待串行端口连接。对于本机USB端口不是必须的
while (!Serial) {
delay(10);
}
Serial.println("Adafruit AHT10/AHT20 test!");
if (! aht.begin()) {
Serial.println("Could not find AHT? Check wiring");
while (1) delay(10);
}
Serial.println("AHT10 or AHT20 found");
}
void loop() {
sensors_event_t humidity, temp;
aht.getEvent(&humidity, &temp);// populate temp and humidity objects with fresh data
Serial.print("Temperature: "); Serial.print(temp.temperature); Serial.println(" degrees C");
Serial.print("Humidity: "); Serial.print(humidity.relative_humidity); Serial.println("% rH");
delay(2000);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Usage Testing
It will show the temperature and the humidity.