ESP32-Controlled Water Flow Monitoring System with OLED Display and Stepper Motor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components to perform a specific function. It includes an ESP32 microcontroller, which serves as the central processing unit, interfacing with a water flow sensor, a stepper motor via a ULN 2003 driver, an OLED display, and a pushbutton for user input. The circuit is powered by a 3.7V battery, which is managed by a lipo battery charger module and a step-up boost power converter to regulate the voltage. The ESP32 reads the water flow sensor data, controls the stepper motor, and displays information on the OLED screen. The pushbutton allows for user interaction with the system.
Component List
ESP32
- Description: A microcontroller with Wi-Fi and Bluetooth capabilities.
- 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
ULN 2003
- Description: A 7-channel Darlington array used for driving high-current loads.
- Pins: IN1, IN2, IN3, IN4, IN5, IN6, IN7, GND, +, COIL1, COIL2, COIL3, COIL4, COIL5
Stepper Motor (Bipolar)
- Description: A bipolar stepper motor for precise motion control.
- Pins: A, B, C, D
Water Flow Sensor
- Description: A sensor used to measure the flow rate of water.
- Pins: Signal, Vcc, GND
Step Up Boost Power Converter, Adjustable Voltage Regulator
- Description: A voltage regulator that steps up the input voltage to a higher, adjustable output voltage.
- Pins: VOUT+, VOUT-, VIN+, VIN-
3.7V Battery
- Description: A lithium-polymer battery providing power to the circuit.
- Pins: +, -
Lipo Battery Charger Module
- Description: A module for charging lithium-polymer batteries.
- Pins: B-, B+, OUT-, OUT+
OLED 1.3"
- Description: A small OLED display for visual output.
- Pins: GND, VCC, SCL, SDA
Pushbutton
- Description: A simple pushbutton for user input.
- Pins: Pin 1, Pin 2, Pin 3, Pin 4
Wiring Details
ESP32
- VN connected to Water Flow Sensor Vcc
- D34 connected to Pushbutton Pin 1
- D27 connected to Water Flow Sensor Signal
- D14, D12, D13, D15 connected to ULN 2003 IN1, IN2, IN3, IN4 respectively
- GND connected to Lipo Battery Charger Module OUT-
- VIN connected to Step Up Boost Power Converter VIN+ and Lipo Battery Charger Module OUT+
- 3V3 connected to OLED VCC
- D21 connected to OLED SDA
- D22 connected to OLED SCL
ULN 2003
- IN1, IN2, IN3, IN4 connected to ESP32 D14, D12, D13, D15 respectively
- GND connected to Step Up Boost Power Converter VOUT-
-
- connected to Step Up Boost Power Converter VOUT+
- COIL1, COIL2, COIL3, COIL4 connected to Stepper Motor A, C, B, D respectively
Stepper Motor (Bipolar)
- A, C, B, D connected to ULN 2003 COIL1, COIL2, COIL3, COIL4 respectively
Water Flow Sensor
- Vcc connected to ESP32 VN
- Signal connected to ESP32 D27
- GND connected to Pushbutton Pin 2, OLED GND, and ESP32 GND
Step Up Boost Power Converter, Adjustable Voltage Regulator
- VOUT+ connected to ULN 2003 +
- VOUT- connected to ULN 2003 GND
- VIN+ connected to Lipo Battery Charger Module OUT+ and ESP32 VIN
- VIN- connected to Lipo Battery Charger Module B- and 3.7V Battery -
3.7V Battery
-
- connected to Lipo Battery Charger Module B+
-
- connected to Lipo Battery Charger Module B-
Lipo Battery Charger Module
- B-, B+ connected to 3.7V Battery -, +
- OUT-, OUT+ connected to ESP32 GND, Step Up Boost Power Converter VIN+, and ESP32 VIN respectively
OLED 1.3"
- VCC connected to ESP32 3V3
- GND connected to Water Flow Sensor GND, Pushbutton Pin 2, and ESP32 GND
- SCL connected to ESP32 D22
- SDA connected to ESP32 D21
Pushbutton
- Pin 1 connected to ESP32 D34
- Pin 2 connected to Water Flow Sensor GND, OLED GND, and ESP32 GND
Documented Code
There is no code provided for the microcontroller. The documentation of the code would typically include a description of the functionality implemented, the setup and loop functions for an Arduino-based microcontroller like the ESP32, and any functions or libraries used to interface with the peripherals. Since no code is available, this section cannot be completed.