LamaPLC: AHT10 Modul

AHT10 Modul The AHT10 is an affordable, high-precision digital sensor module that measures both temperature and humidity. It uses a standard I²C interface for communication and is commonly used with microcontrollers such as Arduino and ESP32.

Key Specifications

  • Operating Voltage: 1.8V to 6.0V.
  • Temperature Range: -40°C to +85°C with ±0.3°C typical accuracy.
  • Humidity Range: 0% to 100% RH with ±2% typical accuracy.
  • Resolution: 0.01°C for temperature and 0.024% for humidity.
  • Communication: I²C (Default Address: 0x38).

Notable Features

  • Fully Calibrated: It provides a calibrated digital signal directly, eliminating the need for complex external calibration.
  • Internal Components: Equipped with a dedicated ASIC-specific chip and an improved MEMS semiconductor capacitive humidity sensor.
  • Energy Efficiency: Extremely low power consumption (under 100 nA in sleep mode), making it ideal for battery-powered IoT devices.

Pinout Configuration

PinNameFunctionTypical Connection
1VIN / VCCPower Supply (1.8V to 6.0V)3.3V or 5V pin
2GNDGroundGND pin
3SCLI²C Serial ClockSCL / A5 (Arduino Uno)
4SDAI²C Serial DataSDA / A4 (Arduino Uno)

Wiring & Integration Details

  • Voltage Levels: While the raw AHT10 chip operates at 1.8V–3.6V, most modules include an onboard voltage regulator (like the XC6206) and level shifters, making them safe for use with 5V systems like the Arduino Uno.
  • Pull-up Resistors: Stable I²C communication requires pull-up resistors (typically 4.7kΩ or 10kΩ) on the SDA and SCL lines. Most pre-assembled modules already have these built-in.
  • I²C Address: The default hardware address is 0x38.

Arduino example code

To use the AHT10 sensor with an Arduino, the most common and reliable method is using the Adafruit AHTX0 library.

This script initializes the sensor and prints temperature and humidity data to the Serial Monitor every 2 seconds.

#include <Wire.h>
#include <Adafruit_AHTX0.h>
 
Adafruit_AHTX0 aht;
 
void setup() {
  Serial.begin(115200);
  Serial.println("AHT10 Sensor Test");
 
  // Initialize I2C and the sensor
  if (!aht.begin()) {
    Serial.println("Could not find AHT10. Check wiring!");
    while (1) delay(10);
  }
  Serial.println("AHT10 found and initialized.");
}
 
void loop() {
  sensors_event_t humidity, temp;
 
  // Get new sensor events with the latest data
  aht.getEvent(&humidity, &temp); 
 
  // Print results to Serial Monitor
  Serial.print("Temperature: ");
  Serial.print(temp.temperature);
  Serial.println(" °C");
 
  Serial.print("Humidity: ");
  Serial.print(humidity.relative_humidity);
  Serial.println(" % rH");
 
  delay(2000); // Wait 2 seconds between readings
}

Implementation Notes

  • Baud Rate: Ensure your Serial Monitor is set to 115200 to match the Serial.begin(115200) command.
  • Polling Frequency: While this code polls every 2 seconds, the manufacturer recommends a polling frequency of 8 to 30 seconds for long-term stability and to avoid sensor self-heating.
  • Wiring: Connect SDA to A4 and SCL to A5 on an Arduino Uno (or the dedicated SDA/SCL pins on other boards).

I²C topics on lamaPLC

PageDateTags
2025/05/31 21:56, , , , , , ,
2025/09/23 19:25, , , , , ,
2026/03/21 19:20, , , , , , ,
2026/02/15 20:33, , , , , , , , ,
2026/02/14 22:24, , , , , , , , , , , , ,
2026/02/15 20:40, , , , , , , , , , , , , ,
2026/02/14 23:37, , , , , , , , , , ,
2026/02/14 22:40, , , , , , , , , ,
2026/03/21 22:25, , , , , , , , , , ,
2026/02/14 18:19, , , , , , , , , , ,
2026/02/14 18:11, , , , , , , ,
2025/05/31 21:32, , , , , , , ,
2026/02/14 19:29, , , , , , , , , , , , , ,
2025/11/21 23:07, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2023/07/01 15:29, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
2026/03/22 00:26, , , , , , , , ,
2026/02/14 22:45, , , , , , , , ,
2026/02/14 22:09, , , , , , , , , , , , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 21:54, , , , , , , , , , , , , , , , , , , , , , , , ,
2026/02/14 23:58, , , , , , , , , , ,
2026/02/14 17:27, , , , , , , , , ,
2026/02/14 23:38, , , , , , ,
2026/02/14 22:52, , , , , , , ,
2026/02/14 22:23, , , , , , , ,
2026/02/14 22:53, , , , , , , , , , , , ,
2026/02/15 20:27, , , , , , , , , , , , , , , ,
2026/02/15 20:29, , , , , , , , , , , , , ,
2026/02/14 22:47, , , ,
2026/02/14 22:51, , , , , ,
2026/02/14 17:26, , , ,
2026/02/14 22:22, , , , , , , , , , , , ,
2026/02/14 22:21, , , , , , , , , , ,
2026/02/14 22:22, , , , , , , ,
2026/03/05 20:19, , , , , , , , , , , , , , , , ,
2026/02/14 17:27, , , , , , ,




This page has been accessed for: Today: 8, Until now: 21