A smart pump/induction motor controller with advanced features and protection systems
• This project is an advanced version of the ESP8266 Water Pump Controller, offering enhanced features and capabilities. |
Project Status: Active Development & Testing
Safety Notice: |
💪 Core Features
⚡ Dual Core ESP32
- One core for UI, one for sensor monitoring🔄 OTA Updates
- Over-the-air firmware updates via local network📱 WiFi Manager
- Easy device setup using smartphone💾 Preferences
- Persistent settings storage
🛡️ Protection Systems
🚱 Dry Run Protection
- Prevents pump damage from running dry⚠️ Overload Detection
- Monitors current draw and shuts off if exceeded🔌 Short Circuit
- Advanced electrical protection features📊 Load Monitoring
- Real-time current and power monitoring
🎮 Smart Controls
🔘 One-Button System
- Short press to navigate, long press to select📟 OLED Display
- 128x64 clear visual interface🚥 RGB Indicators
- Status and warning indicators⏲️ Timer Controls
- Scheduled operations
📊 Monitoring & Logging
💧 Water Level
- Real-time tank level monitoring📈 Google Sheets
- Data logging and analysis🔍 Diagnostics
- Comprehensive system monitoring⚡ Power Stats
- Current and power consumption tracking
Note: Settings and parameters can be customized through an intuitive menu system.
Item | Description | Notes |
---|---|---|
1. | Tested on: DOIT ESP32 DEVKIT V1 (30 pin) | |
2. | 128x64 OLED Display | |
3. | Removed | |
4. | DS1307 RTC | |
5. | SCT013 30A/1V Current sensor | Check for Wiring |
6. | AJ-SR04 Ultrasonic Sensor(Water Proof) | Check Mode 2 for connection |
7. | WS2812B LED (Single LED Module) | |
8. | Any Push Button | I used metal one, feels sturdy |
9. | Any desired float sensor | |
10. | Wires, connectors, etc | According to your need |
11. | Fotek 100Amps SSR |
Check Issues
Circuit Schematic |
Front View |
Front View 2 |
Front View 3 |
Full View |
Ultra Sonic |
Ultra Sonic USB |
Complete Setup |
-
🧮 Dual Core Processing
- 🖥️ Core 1: User Interface & Display
- 🎨 UI Rendering
- 📱 Menu System
- 🔄 Display Updates
- 🤖 Core 2: Sensor & Safety
- 📊 Real-time Monitoring
- ⚡ Power Management
- 🛡️ Protection Systems
- 🖥️ Core 1: User Interface & Display
-
💾 Memory System
- 🎚️ Dynamic Sensor Configuration
- 📦 Persistent Settings Storage
- 🔧 Resource Optimization
- 💧 Pump Safety
- 🚱 Dry Run Prevention
- 🔍 Continuous Monitoring
- 🛑 Auto Shutdown
- ⚡ Overload Protection
- 📈 Current Monitoring
- 🚨 Threshold Alerts
- 🔌 Short Circuit Guard
⚠️ Fault Detection- 🚫 Emergency Cutoff
- 🚱 Dry Run Prevention
- 🔘 One-Button Interface
- 👆 Short Press Navigation
- 👇 Long Press Selection
- 🌈 RGB Status Feedback
- 📟 Display System
- 📱 1.3" OLED Screen
- 📊 Real-time Stats
- 🚦 Status Indicators
- 🔊 Audio Alerts
- 📏 Level Monitoring
- 🎚️ Float Sensor (Primary)
- ✅ Reliable Detection
- 🛑 Overflow Prevention
- 📡 Ultrasonic Sensor
- 📊 Real-time Monitoring
- 📈 Level Tracking
- 🧮 Volume Calculation
- 💧 Approximate water volume in liters
- 🔧 Customizable tank capacity
- 🎚️ Float Sensor (Primary)
- 📡 WiFi Features
- 📱 Smart Device Setup
- 🔄 OTA Updates
- ⏰ Auto Time Sync
- 📊 Remote Monitoring
- 🕒 RTC Features
- 📅 Scheduling
- ⚡ Power Monitoring
- 🔄 Auto Recovery
- 📊 Time Tracking
- ☁️ Cloud Integration
- 📈 Google Sheets Logging
- 📊 Performance Analytics
- 📉 Usage Statistics
- 🔍 System Diagnostics
💡 Pro Tips:
- 🔧 Configure sensors based on your setup
- ⚙️ Adjust thresholds for optimal performance
- 📱 Use WiFi features for remote monitoring
- 🔄 Keep firmware updated for best results
This project offers two methods for logging pump data to Google Sheets:
- 🌟 Using PythonAnywhere as middleware (Recommended, Advanced)
- 🔗 Direct Google Sheets integration (Comparatively Simpler, Not Recommended)
-
🌐 Google Cloud Setup
- Follow this guide up to step 2
- 🔑 Obtain necessary Google Cloud credentials
- 📊 Set up your Google Sheet for data reception
-
⚙️ PythonAnywhere Configuration
- 🔄 Deploy provided Flask code to PythonAnywhere
- 📂 Code available in
/resources
folder - 📡 Handles JSON data from ESP32
- 📝 Manages Google Sheets communication
-
📊 Data Collection
- ⏱️ Records fill time duration
- 📈 Logs sensor parameters
- 📊 Tracks system performance
- 💾 Stores historical data
- 📂 Located in
/resources
folder - 💻 Requires different partition scheme
- 🔧 Higher memory usage
- 📋 Check header comments for configuration
⏱️ Duration | 💧 Water Level | ⚡ Power Usage | 🔄 System Status |
💡 Tip: Choose Method 1 for better memory management and system stability. Use Method 2 only if you need direct integration and have configured the appropriate partition scheme.
- Track system efficiency
- Monitor fill patterns
- Identify potential issues
- Analyze performance trends
SCT013 | Water Level | Ultrasonic |
📊 Default Value: 27
🔧 Adjustable via program
📈 Reference: Home electricity meter
🎯 Goal: Match readings
⚡ Voltage | 📊 Current |
220-240V AC | 2.6A - 3.3A |
1. 🏃 Run pump normally
2. 📊 Compare readings
3. 🔧 Adjust values
4. ✅ Verify results
To enable the approximate water volume display:
- Locate the
TANK_VOLUME
definition in the code. - Set its value to your tank's capacity in liters.
- Example:
#define TANK_VOLUME 1000 // for a 1000-liter tank
💡 Note: The accuracy of the volume estimation depends on the precision of your ultrasonic sensor calibration and the
TANK_VOLUME
setting.
- 🔌 Voltage Protection: External voltage protection is recommended
- 📊 Current-Voltage Relationship:
- 📈 Current increases when voltage drops
- 📉 Current decreases when voltage rises
- 🔍 This relationship helps detect power quality issues
- 🛡️ Always have external circuit protection
- 📊 Monitor initial readings carefully
- 📝 Document your calibration values
- 🔄 Perform periodic calibration checks
💡 Pro Tip: The relationship between current and voltage provides indirect power quality monitoring even without dedicated voltage sensors.
- External Protection - Regular Checks - Documentation |
- Track Readings - Record Changes - Verify Values |
- Regular Calibration - Keep Records - Update Settings |
This project is licensed under the GNU General Public License v3.0 - see below for details.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and
charge for them if you wish), that you receive source code or can
get it if you want it, that you can change the software or use
pieces of it in new free programs, and that you know you can do
these things.
To protect your rights, we need to prevent others from denying
you these rights or asking you to surrender the rights. Therefore,
you have certain responsibilities if you distribute copies of the
software, or if you modify it: responsibilities to respect the
freedom of others.
For the complete license text, see the LICENSE file in this repository or visit GNU GPL v3.
Empowering smart homes, one pump at a time! 🏠💧