Temperature & Humidity

Temperature & Humidity

High-accuracy temperature and humidity sensor

Precision sensor providing accurate temperature and humidity measurements. Can be used to gather environmental information or integrated into home automation systems.

For ages 14 and up. Not a toy. Contains small parts: choking hazard. Keep away from children under 3. Adult supervision recommended.

Made by Atech ApS, Lille Strandstræde 6A, st. th., 1254 København K, Denmark.

Technical specifications

Part
AHT20 Temperature & Humidity Sensor
Interface
I2C (0x38)
Ports
1 port
Current
~1 mA
Size
19.5 x 19.5 x 9.5 mm
Chip
AHT20 (ASAIR (Guangzhou Aosong Electronics))

Pins

3.3V
supply
GND
ground
Data A
I²C SDA
Data B
I²C SCL

Key features

  • Temperature range: -40 to +125°C
  • Humidity range: 0-100%RH
  • Environmental data collection
  • Home automation ready

Common applications

Weather stations
Climate control
Environmental monitoring
Smart home automation
+ Use in Project

Technical

Sensor

Temperature & Humidity

AHT20 Temperature & Humidity Sensor
Interfacei2c @ 0x38
PortsTakes 1 port; needs a port carrying i2c
Current1 mA
Size19.5 × 9.54 × 19.5 mm (CAD bounding box)
DriverAHT20

Integrated temperature (-40 to +125°C) and humidity (0-100%RH) sensor. Background RTOS task measures every 2s, so readings are instant.

What it can do
  • read_temperature Read temperature in Celsiusfloat C
  • read_humidity Read relative humidityfloat %RH
How it works
AHT20 TEMPERATURE & HUMIDITY SENSOR:
- readTemperature() returns float in Celsius. readHumidity() returns float 0-100 %RH.
- Sensor runs in a background FreeRTOS task (reads every 2s automatically).
- Calling readTemperature()/readHumidity() returns the latest cached value. It's instant, not blocking.
- Don't read faster than every 500ms; the sensor update rate is fixed at ~2s.
- Values are valid after begin() completes. First read may return 0 briefly.
Suggested control

Two large numeric readouts side-by-side: Temperature (°C) and Humidity (%), each with a 60-second live sparkline beneath. Highlight when values cross user-set thresholds (e.g. red text above 30°C).

Pinout
Pinout
PinLineDirFunction
1HV–not connected
25V–not connected
33.3Vinputsupply
4GND–ground
5Data AbidirectionalI²C SDA
6Data BinputI²C SCL

from p2p/ground_truth/hardware/prototyping_line/modules/temperature&humidity_sensor.md

Chip
AHT20ASAIR (Guangzhou Aosong Electronics)datasheet ↗