ESP32-Based Smart Motion and Distance Sensing System with Servo Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various sensors, servos, LEDs, resistors, and an ESP32 microcontroller. The circuit is designed to interface multiple components for a variety of functionalities, including motion detection, distance measurement, and visual indication using LEDs.
Component List
Tower Pro SG90 Servo
- Pins: Signal, +5V, GND
- Description: A small and lightweight servo motor used for precise control of angular position.
HC-SR04 Ultrasonic Sensor
- Pins: VCC, TRIG, ECHO, GND
- Description: A sensor used for measuring distance by using ultrasonic waves.
PIR/Motion Sensor
- Pins: GND, OUTPUT, VCC
- Description: A sensor used to detect motion by measuring infrared radiation.
Resistor (220 Ohms)
- Pins: pin1, pin2
- Description: A passive electrical component that provides resistance to the flow of current.
LED: Two Pin (green)
- Pins: cathode, anode
- Description: A light-emitting diode used for visual indication.
ESP32
- 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
- Description: A low-cost, low-power system on a chip microcontroller with integrated Wi-Fi and dual-mode Bluetooth.
Wiring Details
Tower Pro SG90 Servo
Servo 1
- Signal: Connected to ESP32 pin D19
- +5V: Connected to 3V3 (ESP32)
- GND: Connected to GND (ESP32)
Servo 2
- Signal: Connected to ESP32 pin D21
- +5V: Connected to 3V3 (ESP32)
- GND: Connected to GND (ESP32)
HC-SR04 Ultrasonic Sensor
Sensor 1
- VCC: Connected to 3V3 (ESP32)
- TRIG: Connected to ESP32 pin D27
- ECHO: Connected to ESP32 pin D14
- GND: Connected to GND (ESP32)
Sensor 2
- VCC: Connected to 3V3 (ESP32)
- TRIG: Connected to ESP32 pin D12
- ECHO: Connected to ESP32 pin D13
- GND: Connected to GND (ESP32)
PIR/Motion Sensor
Sensor 1
- GND: Connected to GND (ESP32)
- OUTPUT: Connected to ESP32 pin D5
- VCC: Connected to 3V3 (ESP32)
Sensor 2
- GND: Connected to GND (ESP32)
- OUTPUT: Connected to ESP32 pin D18
- VCC: Connected to 3V3 (ESP32)
Resistor (220 Ohms)
Resistor 1
- pin1: Connected to ESP32 pin D15
- pin2: Connected to anode of LED 3
Resistor 2
- pin1: Connected to ESP32 pin D4
- pin2: Connected to anode of LED 1
Resistor 3
- pin1: Connected to anode of LED 2
- pin2: Connected to ESP32 pin D2
LED: Two Pin (green)
LED 1
- cathode: Connected to GND (ESP32)
- anode: Connected to pin2 of Resistor 2
LED 2
- cathode: Connected to GND (ESP32)
- anode: Connected to pin1 of Resistor 3
LED 3
- cathode: Connected to GND (ESP32)
- anode: Connected to pin2 of Resistor 1
ESP32
- Power Connections
- 3V3: Connected to VCC of all sensors and servos
- GND: Connected to GND of all sensors, servos, and LEDs
Code
No code is provided for this circuit.
This document provides a comprehensive overview of the components and their connections in the circuit. Each component is described, and detailed wiring instructions are provided to ensure correct assembly.