Arduino and ESP32-Based Smart Security System with PIR, Vibration, and Door Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO and an ESP32 microcontroller, along with various sensors and output devices. The Arduino UNO is the primary controller, interfacing with a PIR sensor, a vibration sensor, a door sensor, an LED, and a piezo speaker. The ESP32 is connected to the Arduino UNO for additional processing capabilities.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
ESP32
- Description: A low-cost, low-power system on a chip (SoC) with Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
PIR Sensor
- Description: A passive infrared sensor used to detect motion.
- Pins: VDD, SIG, GND
Door MC-38
- Description: A magnetic door sensor used to detect the opening and closing of doors.
- Pins: S, GND
SW-420 Vibration Sensor
- Description: A vibration sensor module used to detect vibrations.
- Pins: vcc, Ground, Digital output
LED: Two Pin (yellow)
- Description: A yellow LED with two pins.
- Pins: cathode, anode
Piezo Speaker
- Description: A piezoelectric speaker used to produce sound.
- Pins: pin1, pin2
Wiring Details
Arduino UNO
- 5V: Connected to VDD of PIR sensor, vcc of SW-420 Vibration Sensor, and S of Door MC-38.
- GND: Connected to cathode of LED, pin1 of Piezo Speaker, Ground of SW-420 Vibration Sensor, GND of PIR sensor, and GND of Door MC-38.
- D7: Connected to SIG of PIR sensor.
- D6: Connected to pin2 of Piezo Speaker.
- D5: Connected to anode of LED.
- D4: Connected to Digital output of SW-420 Vibration Sensor.
- D3: Connected to GND of Door MC-38.
- D1: Connected to RX0 of ESP32.
- D0: Connected to TX0 of ESP32.
ESP32
- RX0: Connected to D1 of Arduino UNO.
- TX0: Connected to D0 of Arduino UNO.
PIR Sensor
- VDD: Connected to 5V of Arduino UNO.
- SIG: Connected to D7 of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
Door MC-38
- S: Connected to 5V of Arduino UNO.
- GND: Connected to D3 of Arduino UNO.
SW-420 Vibration Sensor
- vcc: Connected to 5V of Arduino UNO.
- Ground: Connected to GND of Arduino UNO.
- Digital output: Connected to D4 of Arduino UNO.
LED: Two Pin (yellow)
- cathode: Connected to GND of Arduino UNO.
- anode: Connected to D5 of Arduino UNO.
Piezo Speaker
- pin1: Connected to GND of Arduino UNO.
- pin2: Connected to D6 of Arduino UNO.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Documentation (documentation.txt)