Battery-Powered ESP32-Controlled Water Valve with Distance Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to interface an ESP32 Devkit V1 microcontroller with a VL53L1X sensor, a 1 Channel 5V Relay Module, and a Water Solenoid Valve powered by a 4xAA battery pack with a JST connector. The ESP32 Devkit V1 is responsible for controlling the relay module, which in turn controls the power to the water solenoid valve. The VL53L1X sensor is connected to the ESP32 via I2C communication protocol, and it also has an interrupt and a shutdown pin controlled by the ESP32.
Component List
1 Channel 5V Relay Module
- Description: A relay module that can be used to control high power devices.
- Pins: VCC+, VCC- (GND), IN, N.O., COM, N.C.
VL53L1X
- Description: A time-of-flight ranging sensor with I2C interface.
- Pins: VIN, GND, SDA, SCL, INT, SHUT
ESP32 Devkit V1
- Description: A microcontroller board based on the ESP32 chip with Wi-Fi and Bluetooth capabilities.
- Pins: 3V3, GND, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, VIN
4xAA_JST
- Description: A battery pack holder for four AA batteries with a JST connector.
- Pins: POS, NEG
Water Solenoid Valve
- Description: An electrically-controlled valve used for controlling the flow of water.
- Pins: Pos, Neg
Wiring Details
1 Channel 5V Relay Module
- VCC+ connected to 4xAA_JST POS
- VCC- (GND) connected to 4xAA_JST NEG
- IN connected to ESP32 Devkit V1 D2
- N.O. connected to Water Solenoid Valve Pos
- COM connected to 4xAA_JST POS
VL53L1X
- VIN connected to ESP32 Devkit V1 3V3
- GND connected to ESP32 Devkit V1 GND
- SDA connected to ESP32 Devkit V1 D21
- SCL connected to ESP32 Devkit V1 D22
- INT connected to ESP32 Devkit V1 D4
- SHUT connected to ESP32 Devkit V1 D5
ESP32 Devkit V1
- 3V3 connected to VL53L1X VIN
- GND connected to VL53L1X GND
- D21 connected to VL53L1X SDA
- D22 connected to VL53L1X SCL
- D4 connected to VL53L1X INT
- D5 connected to VL53L1X SHUT
- D2 connected to 1 Channel 5V Relay Module IN
4xAA_JST
- POS connected to 1 Channel 5V Relay Module VCC+ and COM
- NEG connected to 1 Channel 5V Relay Module VCC- (GND) and Water Solenoid Valve Neg
Water Solenoid Valve
- Pos connected to 1 Channel 5V Relay Module N.O.
- Neg connected to 4xAA_JST NEG
Documented Code
No code was provided for the microcontrollers in the circuit. Therefore, this section is not applicable for the current documentation.