Circuit Documentation
Summary
The circuit in question appears to be a control system that utilizes an ESP32 microcontroller to interface with various sensors and actuators. The system includes a PIR (Passive Infrared) sensor for motion detection, a capacitive soil moisture sensor for monitoring soil humidity, a mini water pump for water dispensing, a relay module for controlling high power devices, and a piezo buzzer for audio feedback. The circuit is powered by a 5V supply, and it includes toggle switches for user input and resistors for current limiting or voltage division.
Component List
ESP32 38 PINS
- Microcontroller with a wide range of GPIO pins.
- Used for controlling the logic of the circuit and interfacing with sensors and actuators.
PIR HC-SR501
- Motion sensor that detects infrared signals from moving objects.
- Used for triggering events when motion is detected.
5v Mini Water Pump
- An actuator that pumps water when powered.
- Used for dispensing water in response to sensor data or control signals.
Capacitive Soil Moisture Sensor V1.2
- Sensor that measures the moisture level in the soil.
- Used for monitoring the soil condition in applications like gardening.
Relay 4 Channel 5v
- A module with multiple relay switches that can control high power devices.
- Used for switching devices on and off under microcontroller command.
Piezo Buzzer
- An electronic device that emits sound when voltage is applied.
- Used for providing audio alerts or feedback.
Toggle Switch
- A switch that can open or close a circuit when toggled.
- Used for manual control or as an input device.
Resistor (200 Ohms)
- A passive component that limits current or divides voltage.
- Used for protecting components or creating reference voltages.
AC Source
- Provides alternating current power to the circuit.
- Used for powering devices that require AC input.
Socket
- A connector that provides a means to plug in devices or power sources.
- Used for connecting the circuit to an AC power source or other devices.
Wiring Details
ESP32 38 PINS
- GND: Connected to the ground of the circuit.
- G4: Connected to a toggle switch for input.
- G0: Connected to the PIR sensor signal output.
- 33: Connected to the soil moisture sensor analog output.
- G25, G26, G27: Connected to relay module inputs for controlling relays.
- G12: Connected to the piezo buzzer.
- 5V: Powers the PIR sensor, toggle switch, soil moisture sensor, and relay module.
PIR HC-SR501
- GND: Ground connection.
- SIG: Signal output connected to ESP32 pin G0.
- VDD: Power input connected to 5V from ESP32.
5v Mini Water Pump
- Positive Pin: Connected to the normally open (NO) contact of a relay.
- Negative Pin: Ground connection.
Capacitive Soil Moisture Sensor V1.2
- GND: Ground connection.
- VCC: Power input connected to 5V from ESP32.
- AOUT: Analog output connected to ESP32 pin 33.
Relay 4 Channel 5v
- GND: Ground connection.
- IN1, IN2, IN3: Control inputs from ESP32 pins G26, G25, G27 respectively.
- VCC: Power input connected to 5V from ESP32.
- COM1, COM2, COM4: Common contacts connected to AC source.
- NO1, NO2, NO4: Normally open contacts, NO1 and NO2 connected to resistors, NO4 to the water pump.
Piezo Buzzer
- Pin 1: Ground connection.
- Pin 2: Connected to ESP32 pin G12.
Toggle Switch
- Vcc: Power input connected to 5V from ESP32.
- Sig: Signal output connected to ESP32 pin G4.
- Gnd: Ground connection.
Resistor (200 Ohms)
- Pin1: One resistor connected to NO1 of the relay, another to NO2.
- Pin2: Both resistors connected to the positive terminal of the AC source.
AC Source
- -: Connected to common contacts (COM1, COM2) of the relay module.
- +: Connected to pin2 of both resistors.
Documented Code
The code for the microcontroller is not provided in the input. If code were available, this section would include a detailed explanation of the code, including setup, main loop, functions, and any libraries used. It would also describe how the code interacts with the hardware components listed above.
