"DIY Intruder Alert System with ESP32, PIR & IR Sensor"
ESP32 Motion and Obstacle Detection System Project
Introduction:
I'll demonstrate a straightforward and entertaining do-it-yourself project in this blog post that I constructed with an ESP32 microcontroller, a PIR motion sensor, an IR obstacle sensor, and a tiny OLED display.In addition to displaying real-time alerts on an OLED screen, the device can detect human activity and nearby obstructions. Ideal for those new to embedded systems and the Internet of Things!
Components Used:ESP32 Development Board
Motion Sensor PIR
Infrared Obstacle Sensor
OLED Display (I2C-based, 0.96")
Wire jumpers
A breadboard
Principle of Operation:
The OLED display displays the following when either sensor is activated:
For PIR, "Motion Detected"
"Difficulty Ahead" (for IR)
The system displays an alert or warning if both are on.
Basic connections:
| Component | ESP32 Pin |
|---|---|
| PIR Sensor | D25 (or GPIO25) |
| IR Sensor | D26 (or GPIO26) |
| OLED SDA | D21 |
| OLED SCL | D22 |
| Power (VCC) | 3.3V |
| Ground (GND) | GND |
How to use ESP32 to communicate with many sensors
How to operate an I2C OLED screen
Fundamentals of managing data from digital sensors
Debugging problems such as display glitches, library failures, and wiring
Unable to distinguish between the ESP32's Dx pins and GPIO numbers
The logic of the IR sensor was inverted (LOW = obstacle).
Through the use of basic components, this project provided me with a practical introduction to embedded systems and the Internet of Things. I intend to make it even larger by:
Including a buzzer
WiFi integration for notifications
Using it as a miniature home security system
Comments
Post a Comment