This project shows how to build a Wireless Mobile-Controlled Humane Bird Trap using an ESP32 microcontroller. The system is made only for educational and content purposes, to demonstrate how wireless IoT technology can operate small mechanical systems safely.
There are no sensors or harmful parts — just a gentle servo-driven door that you control directly from your phone’s web browser. This setup is perfect for YouTube videos, classroom IoT lessons, and wildlife-safe tech demonstrations.
When powered on, the ESP32 creates its own Wi-Fi Access Point. You can connect your smartphone or laptop to it and open the webpage 192.168.4.1.
The webpage shows three buttons:
🟢 Open Trap – gently lifts or opens the door
🔴 Close Trap – lowers or closes the door
🔁 Reset – reopens and resets the servo position
Pressing these buttons sends commands wirelessly to the ESP32, which moves a servo motor attached to a light plastic door or mesh frame. The door moves softly — no harm, no shock, no pressure.
ESP32 development board
SG90 / MG90S servo motor
5V power source (USB or battery)
Breadboard and jumper wires
| Component | ESP32 Pin | Description |
|---|---|---|
| Servo Signal | GPIO 18 | Control signal |
| Servo VCC | 5V | Power supply |
| Servo GND | GND | Common ground |
Use a lightweight plastic or cardboard door connected to the servo horn or a string. Avoid metal or tight parts — the goal is gentle motion for safe demo.
#include <WiFi.h> #include <WebServer.h> #include <Servo.h> // Wi-Fi Access Point credentials const char* ssid = "BirdTrap_AP"; const char* password = "12345678"; // Create web server and servo objects WebServer server(80); Servo doorServo; #define SERVO_PIN 18 bool doorClosed = false; // ---------- HTML Web Page ---------- String htmlPage() { String html = R"rawliteral( <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Wireless Humane Bird Trap</title> <style> body { font-family: 'Poppins', Arial, sans-serif; text-align: center; background: linear-gradient(135deg, #b8e994, #38ada9); color: #2f3640; margin: 0; padding: 0; } h1 { margin-top: 30px; color: #2d3436; } h3 { color: #0984e3; } p { font-size: 20px; } button { padding: 18px 35px; margin: 10px; border: none; border-radius: 12px; cursor: pointer; font-size: 18px; transition: 0.3s; } #open { background: #44bd32; color: #fff; } #close { background: #c23616; color: #fff; } #reset { background: #273c75; color: #fff; } button:hover { transform: scale(1.05); opacity: 0.9; } footer { margin-top: 30px; font-size: 14px; color: #555; } </style> </head> <body> <h1>🕊️ Wireless Humane Bird Trap</h1> <h3>Created by ɪɴᴄʀᴇᴅɪʙʟᴇ ᴛᴇᴄʜɴᴏʟᴏɢʏ</h3> <p>Status: <b id="statusText">%STATUS%</b></p> <button id="open" onclick="fetch('/open')">Open Trap</button> <button id="close" onclick="fetch('/close')">Close Trap</button> <button id="reset" onclick="fetch('/reset')">Reset</button> <footer>Educational Project | No harm to birds | © ɪɴᴄʀᴇᴅɪʙʟᴇ ᴛᴇᴄʜɴᴏʟᴏɢʏ</footer> </body> </html> )rawliteral"; // Replace status placeholder with live status html.replace("%STATUS%", doorClosed ? "Door Closed" : "Door Open"); return html; } // ---------- HTTP Handlers ---------- void handleRoot() { server.send(200, "text/html", htmlPage()); } void handleOpen() { doorServo.write(0); // Open position doorClosed = false; server.sendHeader("Location", "/"); server.send(303); } void handleClose() { doorServo.write(90); // Close position doorClosed = true; server.sendHeader("Location", "/"); server.send(303); } void handleReset() { doorServo.write(0); // Reset to open doorClosed = false; server.sendHeader("Location", "/"); server.send(303); } // ---------- Setup ---------- void setup() { Serial.begin(115200); doorServo.attach(SERVO_PIN); doorServo.write(0); // Start with open door WiFi.softAP(ssid, password); Serial.println("\nWi-Fi Access Point Started!"); Serial.print("Connect to Wi-Fi: "); Serial.println(ssid); Serial.print("Then open: http://"); Serial.println(WiFi.softAPIP()); // Web routes server.on("/", handleRoot); server.on("/open", handleOpen); server.on("/close", handleClose); server.on("/reset", handleReset); server.begin(); Serial.println("Web server started!"); } // ---------- Loop ---------- void loop() { server.handleClient(); }
Upload code to ESP32.
Open Wi-Fi on your mobile → connect to BirdTrap_AP.
Open browser → type 192.168.4.1.
Tap buttons to control your trap door wirelessly!
This is a non-harmful educational project created for learning and content creation.
Do not use it to capture or harm birds or animals. Always release any trapped bird immediately and follow local wildlife protection laws. The aim is to learn IoT and automation, not to cause harm.
You can watch the full demo and code explanation on my YouTube channel – ɪɴᴄʀᴇᴅɪʙʟᴇ ᴛᴇᴄʜɴᴏʟᴏɢʏ.
Subscribe for more ESP32, Arduino, and smart IoT projects.
Tags: #ESP32 #Wireless #DIY #IoT #Humane #BirdTrap #Arduino #Educational #NoHarm #ɪɴᴄʀᴇᴅɪʙʟᴇᴛᴇᴄʜɴᴏʟᴏɢʏ
0 Comments