ESP32 KY-052 Pressure and Temperature Sensor Module

KY-052 Pressure and Temperature Sensor Module image

KY-052

Protocol: I2C

Overview

The KY-052 module features the BMP280 sensor, offering accurate measurements of barometric pressure and temperature. It utilizes the I2C interface for communication, making it ideal for environmental monitoring projects.

About KY-052 Pressure and Temperature Sensor Module

The KY-052 module integrates the BMP280 sensor, capable of measuring both barometric pressure and temperature. It communicates via the I2C bus, providing precise environmental data suitable for applications like weather stations, altimeters, and mobile devices.

Technical Specifications

Pressure Measuring Range 300 to 1100 hPa (equivalent to +9000 to -500 m above/below sea level)
Relative Accuracy ±0.12 hPa (±1 m) within 950 to 1050 hPa at 25°C
Absolute Accuracy ±1 hPa within 950 to 1050 hPa, 0 to +40°C
Temperature Coefficient Offset 1.5 Pa/K (12.6 cm/K) from 25 to 40°C at 900 hPa
Digital Interfaces I²C (up to 3.4 MHz), SPI (3- and 4-wire, up to 10 MHz)
Power Consumption 2.7 µA at 1 Hz sampling rate
Temperature Measuring Range -40 to +85°C
Dimensions 22 x 34 x 6 mm

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.

  • VCC: Power supply pin, can be connected to 3.3V or 5V.
  • GND: Ground pin.
  • SDA: I2C data line.
  • SCL: I2C clock line.
  • SDO: Not connected in I2C mode; used for SPI communication.
  • CSB: Chip select for SPI; connect to VCC for I2C mode.

Wiring with ESP32

  • VCC: Connect to 3.3V or 5V on the microcontroller.
  • GND: Connect to the ground of the microcontroller.
  • SDA: Connect to the SDA pin of the microcontroller (e.g., GPIO21 on ESP32).
  • SCL: Connect to the SCL pin of the microcontroller (e.g., GPIO22 on ESP32).
  • SDO: Leave unconnected for I2C communication.
  • CSB: Connect to VCC to select I2C mode.

Troubleshooting Guide

Common Issues

❌ Sensor Not Responding

🌡️ Incorrect Temperature or Pressure Readings

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 KY-052 Pressure and Temperature Sensor Module is a powerful KY-0xx module 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.