⚠️ Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through our links, we may earn a small commission at no extra cost to you. Every product below was checked against its live Amazon listing before publishing. Prices change often, so we don’t list them here. Tap any Buy Here button to see the current price on Amazon.
ESP32 Sensor Buying Guide
🌡️ Best Temperature and Humidity Sensors for ESP32
From precision I2C breakouts for room monitors to waterproof probes and thermocouple amplifiers, here are 9 sensors that give your ESP32 trustworthy temperature and humidity readings.
✅ 9 Sensors Compared
✅ Verified Amazon ASINs
✅ Accuracy and I2C Addresses
✅ Honest Pros & Cons
Temperature and humidity are the first things most people measure with an ESP32: room monitors for Home Assistant, greenhouse controllers, weather stations, fridge and freezer alarms, 3D printer enclosures and data loggers that push readings to MQTT or the cloud. The sensor you choose decides whether those numbers are useful. A cheap module can be off by a couple of degrees, drift in humid air, or fight with other devices on the I2C bus.
This guide compares 9 sensors across every common job: digital I2C humidity sensors (Sensirion SHTC3 and SHT31-D, Aosong AHT20), Bosch environmental sensors that add pressure and gas (BME280, BME688), the waterproof DS18B20 probe, a plug-and-play M5Stack unit, the classic DHT22 and a MAX31855 thermocouple amplifier for high temperatures. Each review lists accuracy, interface and I2C address so you can wire it to your ESP32 with confidence.
💡 Before you buy: The biggest source of error is usually not the sensor, it’s the ESP32. The Wi-Fi radio and regulator warm the board, so a sensor soldered right next to the module can read 1 to 3 °C high and show low humidity. Mount the sensor on a short cable away from the board, give it airflow, and use deep sleep between readings. Also check that every sensor on the same I2C bus has a different address.
⚡ Quick Comparison: All 9 Sensors
| Sensor | Measures | Accuracy (typ.) | Interface | Best For | Buy |
|---|
| 🥇 Adafruit BME280 | Temp, RH, pressure | ±1 °C, ±3% RH | I2C / SPI, STEMMA QT | Best Overall | Buy Here → |
| 🎯 SparkFun SHTC3 Qwiic | Temp, RH | ±0.2 °C, ±2% RH | I2C (0x70), Qwiic | Best Accuracy for the Money | Buy Here → |
| 🏠 Adafruit SHT31-D | Temp, RH | ±0.3 °C, ±2% RH | I2C (0x44/0x45) | Best for Home Assistant | Buy Here → |
| 💰 Adafruit AHT20 | Temp, RH | ±0.3 °C, ±2% RH | I2C (0x38), STEMMA QT | Best Budget | Buy Here → |
| 🍃 SparkFun BME688 Qwiic | Temp, RH, pressure, gas | ±1 °C, ±3% RH | I2C (0x76/0x77) / SPI | Best for Air Quality | Buy Here → |
| 💧 Adafruit DS18B20 High Temp Probe | Temp | ±0.5 °C (-10 to 85 °C) | 1-Wire | Best Waterproof Probe | Buy Here → |
| 🔌 M5Stack ENV III Unit | Temp, RH, pressure | ±0.2 °C, ±2% RH | I2C, Grove (HY2.0-4P) | Best Plug-and-Play | Buy Here → |
| 🔥 Adafruit MAX31855 | K-type thermocouple | 0.25 °C resolution | SPI (3 GPIO) | Best for High Temperatures | Buy Here → |
| 🧪 HiLetgo DHT22 / AM2302 | Temp, RH | ±0.5 °C, ±2 to 5% RH | Single-wire digital | Best for Beginner Tutorials | Buy Here → |
Accuracy figures are typical values from the manufacturers’ product pages and datasheets. Star scores below are our ratings.
🔍 What Matters in a Temperature Sensor
🎯
Accuracy and Drift
Sensirion SHT parts reach ±0.2 to 0.3 °C. Bosch BME parts are ±1 °C but add pressure and gas. DHT22 humidity drifts more over time.
🔗
Interface and Address
I2C is easiest on ESP32. Check the address: fixed-address parts (SHTC3, AHT20) need a multiplexer if you want two on one bus.
🧩
Connectors
STEMMA QT, Qwiic and Grove cables mean no soldering and easy remote mounting, away from ESP32 heat.
🌡️
Temperature Range
Air sensors stop around 85 to 125 °C. Liquids need a sealed probe, and ovens or 3D printer hotends need a thermocouple.
🔋
Power and Voltage
All picks run at 3.3 V. Low standby current matters for battery nodes; some breakouts have a power LED you may want to disable.
🏆 Detailed Reviews: The Top Two
🥇 BEST OVERALL
Adafruit BME280 Temperature, Humidity and Pressure Sensor
⭐ 4.8/5 · Our Rating · The ESP32 Classic
Buy on Amazon →

The Bosch BME280 is the sensor most ESP32 weather and room-monitor projects are built on, and Adafruit’s breakout is the most dependable version of it. One chip gives you temperature (±1 °C), humidity (±3%) and barometric pressure (±1 hPa), which also lets you estimate altitude and spot incoming weather. It talks I2C (default address 0x77, 0x76 selectable) or SPI, has a regulator and level shifting so it’s safe at 3 V or 5 V, and current boards add two STEMMA QT ports for solder-free wiring. ESPHome, Arduino and ESP-IDF all have mature drivers. Temperature accuracy is a step behind the Sensirion parts, so pick an SHT sensor if you only need precise temperature and humidity.
✅ Pros- Temperature, humidity and pressure
- I2C or SPI, two addresses
- Excellent library support
- Quality Adafruit board
❌ Cons- ±1 °C, less precise than SHT parts
- Older listings may lack STEMMA QT
🎯 Verdict: The best all-round sensor for ESP32 weather stations and room monitors that also want pressure.
👉 Check Price on Amazon →
🎯 BEST ACCURACY FOR THE MONEY
SparkFun Humidity Sensor Breakout SHTC3 (Qwiic)
⭐ 4.7/5 · Our Rating · Sensirion Precision
Buy on Amazon →

If accurate temperature and humidity are all you need, the Sensirion SHTC3 beats the BME280 on both counts: ±0.2 °C and ±2% RH across a wide -40 to 125 °C range. SparkFun’s board puts it on a small breakout with two Qwiic connectors and onboard pull-ups, so you can plug it into a Qwiic-equipped ESP32 board or a cheap Qwiic cable and mount it away from the ESP32’s heat. The chip is tiny and very low power, which suits battery nodes that wake, read and sleep. Two things to know: it runs at 3.3 V only (fine for ESP32), and its I2C address is fixed at 0x70, so you need a multiplexer to run two on one bus.
✅ Pros- ±0.2 °C accuracy
- Wide range
- Qwiic plug-in wiring
- Very low power
❌ Cons- Fixed I2C address
- 3.3 V only, no pressure
🎯 Verdict: The most accurate temperature and humidity reading in this guide for the money.
👉 Check Price on Amazon →
🔧 Detailed Reviews: More Great Sensors
🏠 BEST FOR HOME ASSISTANT · ⭐ 4.7/53. Adafruit Sensirion SHT31-D Temperature and Humidity Sensor
±0.3 °C · ±2% RH · I2C 0x44 or 0x45 · 3 to 5 V · PTFE filter
Buy Here →

The SHT31-D is the long-time favourite for ESPHome room sensors. It reads ±0.3 °C and ±2% RH, has an address jumper (0x44 or 0x45) so two can share one I2C bus, and Adafruit’s board is 3 to 5 V safe with a PTFE filter that keeps dust and condensation off the sensing element, which helps in bathrooms, basements and greenhouses. ESPHome’s sht3xd platform supports it directly. Check the seller on Amazon, and note that older stock may lack the STEMMA QT connectors.
✅ Pros: Accurate; two addresses; PTFE filter; ESPHome support.
❌ Cons: No pressure; check the Amazon seller.
🎯 Verdict: The best pick for accurate, long-running ESPHome and Home Assistant room sensors.
💰 BEST BUDGET · ⭐ 4.5/54. Adafruit AHT20 Temperature and Humidity Sensor (STEMMA QT)
±0.3 °C, ±2% RH typical · -40 to 85 °C · I2C 0x38 · 3.3 to 5 V · 2x STEMMA QT
Buy Here →

The Aosong AHT20 is the modern replacement for the DHT22: a proper I2C sensor with ±0.3 °C and ±2% RH typical accuracy (±1 °C and ±3% across the full range), at a lower cost than the Sensirion boards. Adafruit’s version adds a regulator, level shifting and two STEMMA QT ports, and recent units include a PTFE filter. It’s a great choice when you’re building several room sensors on a budget. The address is fixed at 0x38, and accuracy at the extremes is not as tight as the SHTC3 or SHT31-D.
✅ Pros: Low cost; I2C; plug-in cables; far better than DHT22.
❌ Cons: Fixed address; looser full-range accuracy.
🎯 Verdict: The best value I2C sensor for multi-room ESP32 projects.
🍃 BEST FOR AIR QUALITY · ⭐ 4.6/55. SparkFun Environmental Sensor BME688 (Qwiic)
Temp, RH, pressure and gas (VOC) · ±1 °C, ±3% RH · I2C 0x76/0x77 or SPI · 2x Qwiic
Buy Here →

The Bosch BME688 does everything the BME280 does and adds a heated metal-oxide gas sensor that responds to VOCs and other gases, so your ESP32 can track indoor air quality alongside temperature, humidity and pressure (300 to 1100 hPa). Bosch’s BSEC library turns the raw gas resistance into an IAQ index, and the chip supports AI gas scanning with Bosch’s BME AI-Studio. SparkFun’s board offers Qwiic connectors, I2C at 0x76 or 0x77 and SPI on headers. The gas heater warms the chip a little, so apply a temperature offset, and remember a VOC sensor is not a true CO2 sensor.
✅ Pros: 4 measurements; IAQ index via BSEC; Qwiic.
❌ Cons: Needs BSEC for IAQ; self-heating offset.
🎯 Verdict: The pick when you want air quality on top of climate readings from one board.
💧 BEST WATERPROOF PROBE · ⭐ 4.7/56. Adafruit High Temp Waterproof DS18B20 Digital Temperature Sensor
-55 to 125 °C · ±0.5 °C (-10 to 85 °C) · 1-Wire · 316 stainless probe · PTFE cable · 4.7k resistor included
Buy Here →

For water, soil, fridges, freezers, aquariums, brewing and pipes, a sealed DS18B20 probe is the standard. Adafruit’s high-temp version uses a 316 stainless steel tip and a PTFE-insulated cable of about 90 cm that copes with heat better than the usual PVC lead, reads -55 to 125 °C with ±0.5 °C accuracy from -10 to 85 °C, and includes the 4.7k pull-up resistor. Every DS18B20 has a unique 64-bit ID, so you can chain several probes on one ESP32 GPIO using the 1-Wire bus. It measures temperature only, and conversion at 12-bit resolution takes up to 750 ms.
✅ Pros: Waterproof; many probes per pin; PTFE cable; resistor included.
❌ Cons: Temperature only; slow 12-bit conversion.
🎯 Verdict: The best way to measure liquids, soil and cold storage with an ESP32.
🔌 BEST PLUG-AND-PLAY · ⭐ 4.5/57. M5Stack ENV III Unit (SHT30 + QMP6988)
±0.2 °C (0 to 60 °C) · ±2% RH · pressure 300 to 1100 hPa · I2C 0x44 and 0x70 · Grove cable included
Buy Here →

If you use M5Stack controllers (Core, AtomS3, StickC and similar ESP32 devices), the ENV III is the quickest way to add climate sensing. A Sensirion SHT30 handles temperature and humidity and a QMP6988 reads pressure, all inside a small vented plastic case with a Grove (HY2.0-4P) port and cable in the box. Plug it in, load the M5Stack library or the ESPHome components, and it works. The case makes wall or desk mounting tidy. It’s an older generation than M5Stack’s ENV IV, so double-check you’re getting the ENV III listed here.
✅ Pros: Enclosed; cable included; temp, RH and pressure.
❌ Cons: Grove connector only; older generation.
🎯 Verdict: The zero-soldering, ready-cased option for M5Stack and Grove users.
🔥 BEST FOR HIGH TEMPERATURES · ⭐ 4.6/58. Adafruit MAX31855 Thermocouple Amplifier Breakout
K-type · -200 to 1350 °C · 0.25 °C resolution · SPI (3 GPIO) · 3.3 to 5 V · cold-junction compensation
Buy Here →

Ovens, kilns, smokers, reflow controllers and 3D printer hotends get far too hot for any chip sensor. A K-type thermocouple handles them, and the MAX31855 converts its tiny voltage into a digital reading from -200 to 1350 °C with built-in cold-junction compensation. It talks read-only SPI on three ESP32 pins and has a screw terminal for the thermocouple. Overall accuracy depends on the thermocouple itself, typically about ±2 °C, so this is for high heat rather than precision room readings. The thermocouple is sold separately.
✅ Pros: Up to 1350 °C; simple SPI; fault detection.
❌ Cons: K-type only; thermocouple not included.
🎯 Verdict: The go-to board for ESP32 reflow, kiln and smoker controllers.
➕ Also Worth Considering
🧪 BEST FOR BEGINNER TUTORIALS · ⭐ 4.2/5
9. HiLetgo DHT22 / AM2302 Temperature and Humidity Module
The DHT22 appears in more ESP32 tutorials than any other sensor, so it’s handy for following along with examples. It reads -40 to 80 °C at ±0.5 °C and 0 to 100% RH at ±2 to 5%, on a single digital data pin with a 3.3 to 5 V supply. The module version adds the pull-up resistor. It’s slow (one reading every 2 seconds), uses a timing-sensitive protocol, and its humidity reading drifts more than the I2C sensors above, so for new builds the AHT20 or SHT31-D is the better buy.
Buy Here →🛠️ Which Sensor for Which ESP32 Project?
| ESP32 Project | Recommended Sensor | Why |
|---|
| Weather station | Adafruit BME280 | Adds barometric pressure for forecasts |
| Precise room monitor | SparkFun SHTC3 | ±0.2 °C and low power |
| ESPHome / Home Assistant node, greenhouse | Adafruit SHT31-D | Two addresses, PTFE filter, native ESPHome platform |
| Many cheap room sensors | Adafruit AHT20 | Good accuracy at low cost |
| Indoor air quality | SparkFun BME688 | VOC gas sensing plus climate |
| Aquarium, pool, fridge, freezer, soil | Adafruit DS18B20 probe | Waterproof, many probes on one pin |
| M5Stack Core or Atom projects | M5Stack ENV III | Grove plug-in, enclosed case |
| Reflow oven, kiln, smoker | Adafruit MAX31855 | Reads up to 1350 °C |
| Following a beginner tutorial | HiLetgo DHT22 | Matches the most common examples |
🛒 Which One Should You Buy?
⭐
One sensor that does it all
The Adafruit BME280 for temperature, humidity and pressure.
🎯
The most accurate readings
The SparkFun SHTC3, or the SHT31-D if you need two on one bus.
💰
Lowest cost per room
The Adafruit AHT20.
💧🔥
Liquids or extreme heat
The DS18B20 probe for liquids, the MAX31855 for ovens.
❓ Frequently Asked Questions
Why does my sensor read higher than my thermostat?
Usually because of heat from the ESP32 itself. The Wi-Fi radio and voltage regulator warm everything nearby. Move the sensor onto a cable a few centimetres away, use deep sleep between readings, and apply a small offset in ESPHome or your code after comparing with a reference thermometer.
BME280 or DHT22: which should I use?
For new projects, an I2C sensor like the BME280, AHT20 or SHT31-D. They are faster, more stable over time and share the I2C bus with displays and other sensors. The DHT22 is mainly useful for following older tutorials.
Can I connect several sensors to one ESP32?
Yes, as long as each I2C device has a unique address. The SHT31-D (0x44/0x45) and BME280 (0x76/0x77) can run in pairs. Fixed-address parts like the SHTC3 and AHT20 need a TCA9548A multiplexer, or you can use the ESP32’s second I2C bus. DS18B20 probes can share a single GPIO.
Do these sensors work at 3.3 V?
All of them do. The Adafruit boards accept 3 to 5 V with onboard regulators, while the SparkFun SHTC3 and BME688 run at 3.3 V only, which matches the ESP32. Never feed 5 V logic into the ESP32’s GPIO pins.
How do I protect a humidity sensor outdoors?
Keep it out of direct sun and rain but in moving air, ideally inside a louvred radiation shield. A PTFE membrane, like the one on the SHT31-D, helps against dust and splashes. Our weather station parts guide covers radiation shields.
🏁 Final Verdict: Best Temperature and Humidity Sensors for ESP32
The right sensor for each job:
🎯 Best Accuracy for the Money: SparkFun SHTC3
Buy Here →🏠 Best for Home Assistant: Adafruit SHT31-D
Buy Here →💧 Best Waterproof Probe: Adafruit DS18B20 High Temp
Buy Here →🔥 Best for High Temperatures: Adafruit MAX31855
Buy Here →For most ESP32 projects, start with the Adafruit BME280 if you want pressure too, or the SparkFun SHTC3 or SHT31-D if you care most about accurate temperature and humidity. Use the AHT20 to cover many rooms cheaply, the BME688 for air quality, a DS18B20 probe for liquids and the MAX31855 for anything hot. To go further, see our CO2 and air quality sensors guide, the weather station parts guide, our broader best sensors for ESP32 round-up, and the tutorial on sending ESP32 sensor readings to ThingSpeak.
💬 Building a room monitor, greenhouse or freezer alarm? Tell us about it in the comments below, and we’ll help you pick the right sensor.
All Amazon links above use our affiliate tag (esp32tutorials-20). Purchasing through them supports esp32tutorials.com at no extra cost to you. Prices and availability change frequently, so always confirm the current price on Amazon before buying.
We are a team of experienced Embedded Software Developers with skills in developing Embedded Linux, RTOS, and IoT products from scratch to deployment with a demonstrated history of working in the embedded software industry. Contact us for your projects: admin@esp32tutorials.com