ESP32 AHT10 Temperature and Humidity Sensor

AHT10 Temperature and Humidity Sensor image

AHT10

Protocol: I2C

Overview

The AHT10 is an advanced, fully calibrated, and highly integrated temperature and humidity sensor that provides reliable, precise environmental measurements. Designed with cutting-edge CMOSens® technology, it offers high performance in a compact and energy-efficient package, making it ideal for various applications ranging from consumer electronics to industrial monitoring systems.

About AHT10 Temperature and Humidity Sensor

The AHT10 is the first sensor in the AHT series, developed by AOSONG (Aosong Electronics Co., Ltd.). It offers moderate accuracy in temperature and humidity measurements, making it a budget-friendly choice for various environmental monitoring applications.

Key Features

  • Affordable & Reliable – A cost-effective option for basic climate sensing.
  • Digital Output – Communicates via I²C interface for easy integration.
  • Compact & Energy-Efficient – Suitable for IoT, smart home, and weather monitoring.

🔗 Learn more about the AHT10 sensor.
🔗 Check out the AHT20 sensor for an upgraded version with higher accuracy.
🔗 Explore a real-world project using the AHT10 in our IKEA Vindriktning Air Quality Sensor guide.

Where to Buy

AHT10 Temperature and Humidity Sensor

Starting from

1$ per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Interface I2C
Accuracy ±2% RH, ±0.3 °C
Operating Range -40°C to 85°C, 0–100% RH
Voltage 1.8V to 3.6V (typical 3.3V)

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

The AHT10 pinout is simple and follows the I2C communication protocol:

  • SDA (Data Line): Used for transferring data between the sensor and the microcontroller (ESP32).
  • SCL (Clock Line): Provides the clock signal for synchronizing data transfer.
  • GND (Ground): Connect to the ground of the ESP32 to complete the circuit.
  • VCC (Power): Connect to the 3.3V or 5V power supply on the ESP32 to power the sensor.

Wiring with ESP32

Since AHT10 uses I2C protocol, simply connect SDA, SCL, VCC and GND pins to the ESP32. Make sure to configure the I2C pins accordingly.

Troubleshooting Guide

Common Issues

🔍 Sensor Not Detected on I2C Bus

🛑 Compilation Errors When Using AHT10 Library

🌡️ Inaccurate Temperature or Humidity Readings

🔄 Interference with Other I2C Devices

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🔧

ESP-IDF Example

C++
🏠

ESPHome Example

YAML
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

The ESP32 AHT10 Temperature and Humidity Sensor is a powerful environment sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.