Maker.io main logo

Wi-Fi SMS Alert System with Seeed Studio XIAO ESP32

47

2026-02-03 | By Rinme Tom

License: General Public License Arduino ESP32

Overview

In this project, you’ll learn how to send SMS alerts using the Seeed Studio XIAO ESP32 microcontroller and an inexpensive HC-SR04 ultrasonic sensor. Whenever the sensor detects a nearby object within a chosen distance, the ESP32 instantly sends an SMS alert directly to your phone using Wi-Fi and a cloud SMS API—no GSM module needed.

This solution is ideal for DIY security, automation, and remote monitoring systems, and it demonstrates how cloud-based SMS services can replace traditional hardware-intensive approaches.

What You’ll Learn

By completing this project, you’ll gain hands-on experience with:

  • Pinout and GPIO configuration of the Seeed XIAO ESP32-S3.

  • Wiring and sensor integration for ultrasonic distance measurement.

  • Using Arduino and HTTP requests to send SMS via a free cloud API.

  • Creating real-time alerts without needing a GSM shield or SIM card.

Hardware Set up

How It Works

This Wi-Fi SMS alert system operates in a simple yet powerful loop:

  1. Boot and Wi-Fi Setup — The XIAO ESP32 connects to your Wi-Fi network.

  2. Distance Measurement — The HC-SR04 sensor continuously measures the distance to nearby objects.

  3. Threshold Detection — When an object comes within the predefined range (e.g., 100 cm), the system triggers an alert.

  4. Cloud Request — The ESP32 sends an authenticated HTTP POST with your API key and message variables to a cloud SMS service.

  5. SMS Delivery — The cloud API formats and sends the SMS to your mobile number.

This workflow eliminates the need for GSM hardware and leverages inexpensive Wi-Fi connectivity to deliver alerts quickly and reliably.

Why Choose Seeed Studio XIAO ESP32

The Seeed XIAO ESP32-S3 is especially suited for compact IoT systems:

  • Ultra-small form factor — fits into space-limited designs.

  • Built-in Wi-Fi and Bluetooth — ideal for wireless projects.

  • Arduino IDE support — easy for beginners and pros alike.

  • Cost-effective and power efficient — great for battery-powered builds.

Compared to larger ESP32 modules, the XIAO version offers the right mix of features for most sensor-to-cloud projects without an unnecessary footprint.

SEEED Studio Xiao Esp32 Pinout

Wiring and Assembly

Connect the ultrasonic sensor to your XIAO board like this:

  • HC-SR04 VCC → 5 V

  • HC-SR04 GND → GND

  • Trig Pin → GPIO 5

  • Echo Pin → GPIO 3

The simple four-wire setup makes this project approachable for makers at all levels.

Wiring Diagram

Arduino Code and API Integration

Program the XIAO ESP32 using the Arduino IDE. Your code will:

  • Connect to Wi-Fi.

  • Monitor ultrasonic distance readings.

  • Send an HTTP POST to the cloud SMS service when a threshold is crossed.

By using the cloud API, you avoid GSM modules while still achieving real-time SMS notifications.

Testing and Troubleshooting

Once deployed:

  • Confirm Wi-Fi connection and IP address via Serial Monitor.

  • Observe continuous distance readings.

  • Review SMS success confirmations returned by the cloud API.

If alerts fail, double-check your API credentials, Wi-Fi password, and mobile number format (including country code).

Real-World Applications

This lightweight SMS alert system offers practical use cases, including

  • Home intrusion detection — get notified instantly when unwanted motion is sensed.

  • Tank level alerts — send SMS when a water tank is full or empty.

  • Industrial safety monitoring — alert safety teams to unauthorized access.

  • Asset tracking and theft prevention — secure valuable equipment with motion alerts.

Extending the System

This flexible approach isn’t limited to ultrasonic sensing. Pair the XIAO ESP32 with other sensors (temperature, light, gas, etc.) to trigger SMS notifications based on environmental conditions. You can even log sensor data, send alerts to multiple numbers, or integrate with dashboards for enhanced monitoring.

Mfr Part # 113991114
XIAO ESP32S3
Seeed Technology Co., Ltd
¥1,226
View More Details
Mfr Part # SNS-HCSR04
ULTRASONIC SENSOR 5V
Olimex LTD
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.