This circuit is designed to control a water pump using an ESP32 Devkit V1 microcontroller, which interfaces with a soil moisture sensor module (YL-83 Module LM393) and a soil moisture probe (YL-69 Sonda). The system is powered by a series-parallel configuration of 18650 Li-ion batteries, which provide power to the ESP32 and the relay module through a step-down buck converter. The relay module controls the power to the water pump, and its activation is determined by the moisture level detected by the sensor. A pushbutton is included to manually trigger the relay.
VIN
connected to the output of the step-down buck converter.GND
connected to the ground net of the circuit.3V3
connected to the VCC of the YL-83 Module LM393.D34
connected to the A0 pin of the YL-83 Module LM393.+
connected to the +
pin of the YL-83 Module LM393.-
connected to the -
pin of the YL-83 Module LM393.VCC
connected to the 3V3
pin of the ESP32 Devkit V1.GND
connected to the ground net of the circuit.A0
connected to the D34
pin of the ESP32 Devkit V1.IN +
connected to the positive terminal of the 18650 Li-ion batteries.IN - GND
connected to the negative terminal of the 18650 Li-ion batteries.OUT +
connected to the VIN
pin of the ESP32 Devkit V1 and the VCC
pin of the 5V relay.OUT - GND
connected to the ground net of the circuit.Pin 1 (in)
connected to the output of the step-down buck converter.Pin 3 (out)
connected to the In
pin of the 5V relay.Common terminal
connected to the positive terminal of the 18650 Li-ion batteries.Normally Open
connected to the VCC
pin of the Water Pump.In
connected to the Pin 3 (out)
of the Pushbutton.GND
connected to the ground net of the circuit.VCC
connected to the output of the step-down buck converter.VCC
connected to the Normally Open
pin of the 5V relay.GND
connected to the ground net of the circuit.Since no code was provided, this section is left blank. The code for the ESP32 Devkit V1 would typically include the logic for reading the soil moisture level from the YL-83 Module LM393, controlling the relay to power the water pump, and possibly handling the manual override from the pushbutton.