Skip to content
MCU Atlas

ESP32 freezer alarm: a DS18B20 probe that emails you when the freezer warms up

A build pattern for a temperature alarm: an ESP32, a waterproof DS18B20 probe and a web setup page that emails you when the reading crosses your setpoint.

Difficulty:Intermediate

What it is

A Wi-Fi temperature alarm that emails you when your freezer gets too warm.

How hard

Intermediate: three wires, Arduino IDE or PlatformIO with a few libraries.

Key Facts

  • Email alert above the setpoint, and again when it recovers
  • Wi-Fi setup portal: Wi-Fi, email, timezone, °F/°C, InfluxDB 1.8, probe pin
  • OTA updates from v2.4 (change the default password)
  • Author uses GPIO 4
  • MIT

About This Project

This is a simple, adaptable build pattern rather than a polished product: an ESP32 reads a waterproof DS18B20 probe and sends an email alert when the temperature goes over your setpoint, then another when it comes back down. Fishrider24's version (the README credits the code and its modifications to Evan Potts, starting from Random Nerd Tutorials examples) updates the code for ESP32 Arduino core 3.x and adds a Wi-Fi setup portal, so you set the Wi-Fi, email sender, timezone, Fahrenheit or Celsius, an optional InfluxDB 1.8 server and even the probe's GPIO pin from a web page instead of in code. The author uses GPIO 4. Version 2.4 added OTA updates (change the default password), and 2.6 shows the last ten email successes or failures on the main page so a broken mail setup doesn't go unnoticed. It sends through Gmail with an app password by default. Why it matters in an outage: Ready.gov says a full freezer keeps its temperature for about 48 hours if you keep it closed, and to throw food out if it reaches 40 °F or higher. An alarm tells you when you're getting close. The ESP32 and your router both need power and internet to send the email, so put them on a UPS or power bank if you want alerts during a power cut. The README notes that AT&T no longer delivers email-to-text, and Verizon is expected to drop it, so use a normal email inbox with notifications.

Source & Attribution

Source: GitHub
License: MIT
Last verified: 10/30/2026
ESP32 freezer alarm: a DS18B20 probe that emails you when the freezer warms up

Illustration

How to Build It
Wire a DS18B20 probe to an ESP32, upload the sketch and data files, then set Wi-Fi, email and your setpoint in the setup portal.

Parts Needed

  • ESP32 dev board (ESP32-WROOM-32, e.g. DevKitC V4)
  • DS18B20 waterproof probe
  • 4.7 kΩ resistor (unless the probe board has one)
  • USB wall charger
  • USB data cable
  • Gmail account with an app password

Steps

  1. 1

    Wire the probe

    Our wiring (the README has no diagram): probe red to 3.3 V, black to GND and the data wire (usually yellow; check your probe's colours) to GPIO 4, the pin the author uses. If you pick another pin in the portal, avoid the strapping pins (0, 2, 5, 12, 15) and the input-only pins 34–39. Our note: add a 4.7 kΩ pull-up from data to 3.3 V unless your probe's adapter board already has one.

  2. 2

    Install the libraries

    Install the libraries in the README (ESP32 Arduino core 3.x, ESPAsyncWebServer, AsyncTCP, DallasTemperature, OneWire, ReadyMail, ESP8266 Influxdb). Remove old copies of ESPAsyncWebServer and AsyncTCP first.

  3. 3

    Upload

    For v2.4 and later, select the custom partition scheme, upload the sketch, then upload the data folder (two HTML files and a CSS file) to SPIFFS.

  4. 4

    Set it up

    Join the setup access point, enter your Wi-Fi, Gmail sender and app password, timezone, °F/°C, setpoint and the probe's GPIO pin. Change the default OTA/setup password.

  5. 5

    Place it

    Our tip: run the thin probe lead in through the door seal, keep the ESP32 outside, and check that the door still closes fully. For alerts during a power cut, the ESP32 and your router both need power, so put them on a UPS or power bank.

Bill of Materials

Parts list

5 parts · 4 linked

Heads up: some Buy links are affiliate links. If you buy through one, MCU Atlas may earn a small commission at no extra cost to you. It never changes which parts we list. How this works

Not included: Gmail account with an app password, 3D-printed case (optional, linked from the README)

Download CSV

Related Projects

whisli sense: ESP32 mmWave presence sensor with climate and light
Illustration
ESP32ESP32-C3
A local presence sensor on a Waveshare ESP32-C3-Zero: an HMMD mmWave radar sees even a person sitting still, plus temperature, humidity and light, a browser panel and optional Home Assistant over MQTT. No licence in the repo.
Intermediate
6 parts listed
XKC-Y25 water-tank monitor: three non-contact level sensors on an ESPHome XIAO ESP32C3
Illustration
ESP32ESP32-C3
Three XKC-Y25-V sensors stuck to the outside of a plastic tank tell Home Assistant whether the water is above each one. Nothing touches the water. Our version runs from a USB charger.
Intermediate·Code
8 parts listed
SparkFun OpenLog: Arduino-compatible data logger
Illustration
ARDUINOATMEGA328P
A tiny ATmega328-based logger that writes serial data to a microSD card with almost no host code.
Beginner·Code
2 parts listed