ESP32-Controlled Water Flow System with Pneumatic Solenoid Valve and Sensing
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components controlled by an ESP32 microcontroller to perform a range of functions. The ESP32 serves as the central processing unit, interfacing with a relay module, a water flow meter, a pressure sensor, and a pneumatic solenoid valve. The relay module is used to control high-power devices, while the water flow meter measures the flow rate of liquids. The pressure sensor provides precise pressure readings, and the pneumatic solenoid valve is used to control the flow of air or liquid. The circuit is designed to operate on a 3.3V power supply, with the ESP32 microcontroller managing the data processing and device control.
Component List
ESP32 (30 pin)
- A 30-pin microcontroller with WiFi and Bluetooth capabilities. It is the brain of the circuit, responsible for controlling the other components and processing sensor data.
Adafruit LPS3X
- A pressure sensor that measures pressure variations and communicates with the ESP32 via I2C protocol.
Relay Module 2 Channel
- A module with two channels that can control high-power devices such as motors or solenoids. It is driven by the ESP32.
YF-S201 Water Flow Meter
- A sensor that measures the flow rate of water and sends the data to the ESP32 for processing.
12v Pneumatic solenoid valve
- An electrically-controlled valve used for controlling the flow of air or liquid. It is controlled via a relay and a transistor.
TIP120 Hi-Current Darlington Transistor
- A transistor that allows the ESP32 to control high-current loads such as the pneumatic solenoid valve.
Wiring Details
ESP32 (30 pin)
- GND: Connected to the common ground net.
- 3V3: Provides power to the 3.3V net, powering other components.
- D23: Controls Relay Module IN1.
- D22: Connected to Adafruit LPS3X SCK/SCL for I2C communication.
- D21: Connected to Adafruit LPS3X SDI/SDA for I2C communication.
- D19: Controls Relay Module IN2.
- D18: Controls TIP120 BASE.
- D2: Receives signal from YF-S201 Water Flow Meter SIG.
Adafruit LPS3X
- GND: Connected to the common ground net.
- VCC: Powered by the 3.3V net.
- SDI/SDA: Connected to ESP32 D21 for I2C communication.
- SCK/SCL: Connected to ESP32 D22 for I2C communication.
Relay Module 2 Channel
- GND: Connected to the common ground net.
- VCC: Powered by the 3.3V net.
- IN1: Controlled by ESP32 D23.
- IN2: Controlled by ESP32 D19.
- NO1: Connected to TIP120 COLLECTOR.
YF-S201 Water Flow Meter
- GND: Connected to the common ground net.
- VCC: Powered by the 3.3V net.
- SIG: Connected to ESP32 D2.
12v Pneumatic solenoid valve
- GND: Connected to the common ground net.
- VCC: Connected to TIP120 COLLECTOR.
TIP120 Hi-Current Darlington Transistor
- EMITTER: Connected to the common ground net.
- BASE: Controlled by ESP32 D18.
- COLLECTOR: Connected to 12v Pneumatic solenoid valve VCC and Relay Module NO1.
Documented Code
Since no code was provided in the input, this section is currently empty. When code is available, it should be documented here with explanations of how the microcontroller interfaces with each component, including setup, main loop, and any interrupt service routines or functions used for handling component-specific operations.