Build a local wireless doorbell by connecting a pushbutton to one ESP32 and a DFPlayer Mini audio module to another. When someone presses the button, the sender sends a local HTTP request over Wi-Fi; the receiver then plays an MP3 through a speaker.
This is a customizable indoor chime—not a video doorbell, cloud notification system, or security product. It needs reliable power at both locations and will not work while the sender, receiver, or Wi-Fi router is offline.
As an Amazon Associate I earn from qualifying purchases.
How the ESP32 Wi-Fi doorbell works
[Pushbutton] → [Sender ESP32] → local Wi-Fi → [Receiver ESP32] → UART → [DFPlayer Mini] → [Speaker]
The sender reads the button and makes a request such as GET /bell/on to the receiver’s local IP address. The receiver runs a small web server, accepts the request, and commands the DFPlayer Mini to play a stored file from a microSD card.
The two-board arrangement is useful when the entrance and indoor chime cannot be connected conveniently with cable. It also allows the receiver to be placed near a power outlet and speaker while the button node is installed at a gate or door.
#1 Best Overall
- Perfect choice for beginners to learn, electronics and program.
- The Basic Starter Kit is easy to use and you can learn to program at an introductory level.
- You can use ESP32 modules to control other modules, such as LED,DHT11,OLED module, etc
- The tutorial include codes and lessons.It will teach every users how to assembly Basic Starter Kit for ESP32.
- Please download our tutorial and learn after you receive the goods.
What you need
Sender
- ESP32 development board with USB programming and onboard regulation
- Momentary pushbutton
- Optional status LED and current-limiting resistor
- Low-voltage USB power supply
- Weather-resistant enclosure for an outdoor installation
Receiver
- ESP32 development board
- DFRobot DFPlayer Mini
- microSD/TF card
- Compatible speaker, such as a 4-ohm, 3-watt unit used in the reference build
- Stable power supply and jumper wires or perfboard
- Optional 1-kΩ resistor for the DFPlayer serial connection
Use development boards for a first build. A bare ESP32-WROOM module requires a suitable 3.3-V supply, boot circuitry, and USB-to-serial programming hardware. GPIO numbers and pin availability vary among ESP32 board generations, so verify the pinout for your exact board before wiring it.
Prepare the audio card
The DFPlayer needs a microSD card inserted before it can communicate and play audio. DFRobot documents support for cards up to 32 GB and FAT16 or FAT32 file systems, although cards and clone modules can behave differently.
- Format the card as FAT32, if appropriate for its capacity.
- Create a root-level folder named
mp3. - Copy a short test sound named
0001.mp3into that folder. - Safely eject the card and insert it into the DFPlayer before startup.
DFPlayer indexing can depend on file organization and copy order. Do not assume that play(2) always means the second file visible in a computer’s file browser. Use an explicit naming scheme and test the result. DFRobot’s DFPlayer documentation describes the mp3 folder, four-digit names, and folder playback commands.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesmacOS may add hidden files such as ._0001.mp3. These can confuse the player. With the card mounted, clean the volume using:
dot_clean /Volumes/<SDVolumeName>
Wire the sender ESP32
A robust button circuit uses the ESP32’s internal pull-up:
ESP32 GPIO ─── pushbutton ─── GND
Configure the input as INPUT_PULLUP. The pin is normally HIGH and becomes LOW when pressed. This prevents a floating input and usually eliminates the need for an external resistor.
Rank #2
- ESP32-S3 camera board: Dual-core 32-bit microprocessor up to 240 MHz, 8 MB flash, 8 MB PSRAM, onboard 2.4 GHz Wi-Fi and Bluetooth 5 (LE), USB-OTG, USB code uploader, camera, memory card slot (Comes with 1GB memory card and card reader)
- 3 sets of code: MicroPython, C and Processing (Java). Python is one of the most popular languages, and C is one of the most classic languages. Processing code needs to run on computers to provide graphical interfaces
- Detailed tutorial: Can be downloaded (in English, 828-page in total) or viewed online (original in English, can be translated into other languages by browsers) (The tutorial link can be found on the product box, no paper tutorial)
- 121 projects from simple to complex: Provides step-by-step guide with electronics and components knowledge, each project has schematics, wiring diagrams, complete code and detailed explanations
- 243 items in total: This ultimate kit includes the most commonly used electronic components, modules, sensors, wires and other compatible items
The original reference used GPIO 21 for the button and GPIO 23 for an LED. Those are example choices, not universal requirements. Select GPIOs that are exposed and safe on your board, avoiding pins with boot-strapping or other special functions unless you understand their behavior.
Free tools Windows power users keep installed
One-click scans. No signup required.
Wire the receiver and DFPlayer
ESP32 TX → DFPlayer RX
ESP32 RX ← DFPlayer TX
ESP32 GND → DFPlayer GND
Power → appropriate DFPlayer VCC
Speaker → DFPlayer SPK+ and SPK−
UART transmit and receive lines must be crossed. The ESP32 and DFPlayer must share ground. Do not treat the DFPlayer speaker outputs as ordinary ground-referenced line outputs; connect the speaker according to the module documentation.
The reference receiver initializes an ESP32 UART at 9600 baud using GPIO 18 and GPIO 19:
Serial1.begin(9600, SERIAL_8N1, 18, 19);
ESP32 UART pins can be assigned differently, and the correct pins depend on the board and framework. Confirm which argument is TX and which is RX for your selected Arduino core and board. Espressif documents UART configuration and pin routing in its UART reference.
DFRobot’s product guidance recommends a 1-kΩ resistor in the serial wiring for the relevant module and board combination. Follow the current module wiring guidance, particularly if using a DFPlayer-compatible clone.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The DFPlayer’s integrated mono amplifier can drive a modest speaker directly. Its stated operating range is 3.2–5.0 V and its manufacturer-stated direct speaker capability is up to 3 W; that is not a guarantee of distortion-free output under every power or speaker condition. Use a stable supply, short wiring, and decoupling near the modules.
Rank #3
- 【POWERFUL ESP32‑S3 CONTROLLER】Built‑in Xtensa 32‑bit LX7 dual‑core processor, 512KB SRAM, 8MB PSRAM, 16MB Flash for stable AI voice computing and multitask processing.
- 【Preloaded Dual AI Platforms】Comespre-installed with complete Deepseek and OpenAI voice dialogue projects.Experience intelligent voice interaction instantly. (Note: OpenAI functionality requires your own API key.)
- 【STABLE WIRELESS & CLEAR AUDIO】Integrated 2.4GHz Wi‑Fi + Bluetooth 5 (LE); dedicated audio decoding module for natural, responsive voice interaction.
- 【USER‑FRIENDLY VISUAL & PLUG‑AND‑PLAY】2” TFT‑SPI color screen shows real‑time chat; modular design, no extra wiring, ready to use after setup.
- 【FULL LEARNING SUPPORT】45 programmable GPIOs, rich interfaces, online web tutorials, free technical support for beginners & developers.
Install the Arduino software
Use Arduino IDE or another compatible Arduino environment with:
- ESP32 board support installed
WiFi.hHTTPClient.hfor the senderWebServerorWiFiServerfor the receiver- The
DFRobotDFPlayerMinilibrary
DFRobot’s maintained examples are linked from its current DFPlayer documentation.
Program the receiver first
Test the audio hardware before adding the sender. The receiver must join Wi-Fi, initialize the DFPlayer, serve the endpoint, and play a known track.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#include <WiFi.h>
#include <WebServer.h>
#include <DFRobotDFPlayerMini.h>
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
WebServer server(80);
DFRobotDFPlayerMini player;
void bell() {
player.play(1);
server.send(200, "text/plain", "Bell played");
}
void setup() {
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, 18, 19);
if (!player.begin(Serial1)) {
Serial.println("DFPlayer initialization failed");
while (true) delay(1000);
}
player.setTimeOut(500);
player.volume(20); // DFPlayer range: 0–30
player.outputDevice(DFPLAYER_DEVICE_SD);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) delay(250);
Serial.println(WiFi.localIP());
server.on("/bell/on", bell);
server.begin();
}
void loop() {
server.handleClient();
}
Replace the example pins with those selected for your board. The reference project plays track 2, but this example uses play(1) with the documented 0001.mp3 test file. Once the receiver starts, open its printed IP address in a browser:
http://RECEIVER-IP/bell/on
If the browser request produces the sound, the DFPlayer, card, speaker, Wi-Fi, and server are working independently of the button node.
For a real installation, avoid an address that changes unexpectedly. Create a DHCP reservation for the receiver in the router, or use a suitable local-name/configuration approach. A hard-coded address such as 192.168.1.149 works only while the receiver keeps that address.
Rank #4
- 🚀 Beginner-Friendly ESP32 Starter Kit:Designed for beginners to explore electronics, programming, and IoT concepts, this ESP32 starter kit combines an ESP32 development board with essential electronic modules, providing a practical way to learn through hands-on experiments and simple DIY projects.
- 🧠 Powerful ESP32 WiFi Development Board:Built around the ESP32 ESP-32S microcontroller with integrated WiFi, the development board supports wireless communication, digital control, and sensor-based projects. It helps beginners gain practical experience with microcontrollers and basic IoT applications.
- 🔧 Hands-On Learning with Multiple Modules:The included electronic components and modules allow users to experiment with sensors, outputs, and basic circuit functions. By building and testing different projects, beginners can gradually understand how hardware components work together with microcontroller programming.
- 💻 Arduino IDE Programming Support:Compatible with the Arduino IDE, the ESP32 starter kit provides a familiar programming environment for beginners, students, hobbyists, and makers. Users can write, upload, and test their own programs while developing practical coding and embedded programming skills.
- 🎓 Ideal for Education & DIY Projects:Suitable for STEM education, classroom activities, electronics practice, and home DIY projects, this ESP32 learning kit encourages hands-on exploration. It helps beginners develop foundational skills in programming, circuit building, sensor applications, and IoT concepts.
Program the sender
The sender should trigger on the press edge, debounce the switch, and wait for release. This prevents one long press from generating a stream of requests.
#include <WiFi.h>
#include <HTTPClient.h>
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
const char* bellUrl = "http://RECEIVER-IP/bell/on";
constexpr int buttonPin = 21;
constexpr int ledPin = 23;
bool wasPressed = false;
void setup() {
Serial.begin(115200);
pinMode(buttonPin, INPUT_PULLUP);
pinMode(ledPin, OUTPUT);
WiFi.begin(ssid, password);
}
void loop() {
if (WiFi.status() != WL_CONNECTED) {
digitalWrite(ledPin, !digitalRead(ledPin));
delay(250);
return;
}
bool pressed = digitalRead(buttonPin) == LOW;
if (pressed && !wasPressed) {
delay(50);
if (digitalRead(buttonPin) == LOW) {
HTTPClient http;
http.begin(bellUrl);
http.setConnectTimeout(1500);
int code = http.GET();
Serial.printf("Doorbell request: %dn", code);
http.end();
digitalWrite(ledPin, HIGH);
}
}
if (!pressed) digitalWrite(ledPin, LOW);
wasPressed = pressed;
delay(10);
}
After uploading, press and release the button. One press should produce one chime; a second press after release should produce another. The sample uses the same GPIO numbers as the reference only for illustration—change them if necessary.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Make the prototype more reliable
Use nonblocking Wi-Fi recovery
A simple while (WiFi.status() != WL_CONNECTED) loop can stop the receiver from servicing requests during an outage. A stronger design periodically attempts reconnection while continuing to run the main state machine. Add a timeout, serial diagnostics, and—where appropriate—a watchdog reset for a device that becomes unresponsive.
Suppress duplicate playback
Decide what should happen if a visitor presses repeatedly or the sender retries:
- Ignore: do not start a new track while one is playing.
- Replace: restart the current chime.
- Queue: play each request in order.
A minimum interval and the DFPlayer BUSY signal can help prevent overlapping or excessive playback. Keep the HTTP response prompt even if playback continues in the background.
Add basic access control
The plain endpoint is unauthenticated. Any device able to reach the receiver may be able to trigger it. For a private prototype, that may be acceptable; for a more controlled LAN, use a long random token or shared secret, restrict access to the local subnet, and never port-forward the receiver directly to the public internet. HTTPS or MQTT with appropriate authentication is preferable for systems that must cross untrusted networks.
Best Value
- WiFi kit 32 is a classic IoT Dev-board
- It’s a highly integrated product based on ESP32(including WiFI and BLE)
- ESP32-S3FN8 dual core processor
- 3.7V lithium battery power supply and charging
- Type-C USB
Prevent unwanted startup chimes
Some reference implementations play a track during receiver startup as a test. Remove that behavior or make it optional. Otherwise, every power restoration can sound like a visitor.
Outdoor installation and electrical safety
Put the button ESP32 and its low-voltage supply in a sealed, UV-resistant enclosure with strain relief. Protect the board from rain, condensation, insects, corrosion, and static discharge. Use a properly rated button and leave speaker openings protected from water while allowing sound to escape.
Do not connect an existing doorbell transformer directly to an ESP32 or DFPlayer. Measure unknown wiring first and use an appropriate regulator, converter, or isolated supply. A USB-powered indoor receiver is the simplest arrangement. Any work involving mains wiring should be performed by a qualified person.
Troubleshooting
| Symptom | Likely causes and fixes |
|---|---|
| Browser cannot trigger the bell | Check the receiver IP, Wi-Fi status, endpoint spelling, router client isolation, and whether both devices are on the same LAN. |
| Sender repeatedly triggers | Use INPUT_PULLUP, edge detection, 30–100 ms debounce, and a wait-for-release rule. |
| DFPlayer initialization fails | Check the inserted card, power, common ground, crossed TX/RX wiring, serial pins, baud rate, resistor, and library installation. |
| No sound | Test the DFPlayer example first, lower the volume, check the speaker wiring, verify the card format, and confirm the selected output device. |
| Wrong track plays | Use a known file layout and naming scheme. Indexing can depend on copy order; test play(1) before using another number. |
| ESP32 resets when audio starts | Suspect supply sag, inadequate USB power, long thin wires, or poor decoupling. Improve the 5-V supply and wiring. |
| Sound plays after every reboot | Remove or disable the startup test playback. |
| It stops working after router changes | Create a DHCP reservation or update the sender’s receiver URL. |
| Button triggers falsely | Check the enclosure for moisture, use a defined pull-up state, shorten wiring, and add software debounce. |
When this design is the right choice
Choose the two-ESP32 approach when you want a custom offline sound, local control, separated button and chime locations, and a practical introduction to Wi-Fi and UART. It is especially suitable where extending an old doorbell cable is difficult.
Choose another approach when you need guaranteed operation during router outages, a polished mobile app, video, two-way audio, cloud recording, safety-critical reliability, or a maintenance-free weatherproof product.
HTTP, MQTT, and ESPHome compared
| Approach | Best for | Trade-off |
|---|---|---|
| Direct HTTP | One sender and one receiver | Simple, but depends on the receiver address and needs security improvements. |
| MQTT | Multiple buttons, chimes, and automations | More scalable, but requires a broker. |
| ESPHome/Home Assistant | Existing smart-home installations | Better dashboards and notifications, but adds server infrastructure. |
| Commercial wireless doorbell | Plug-and-play reliability | Less control over firmware and custom behavior. |
Final assessment
This project is a sound maker build: two low-voltage Wi-Fi nodes, a local HTTP endpoint, and a DFPlayer Mini provide a customizable chime without a cloud subscription. Treat the 2019 reference implementation as a starting point rather than finished production firmware. Add stable addressing, edge-triggered debouncing, reconnection logic, duplicate suppression, sensible power design, and LAN access control before installing it permanently.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

