IoT Based Water Level Control and Monitoring System

Jul 16, 2024

IoT Based Water Level Control and Monitoring System

Introduction

  • Project: Build an IoT-based water level control and monitoring system
  • Main components: ESP8266 Wi-Fi module, waterproof ultrasonic sensor, OLED display, Blynk platform
  • Modes: Manual and automatic
    • Manual mode: Switch water pump on/off anytime
    • Automatic mode: Set logic for pump operation
  • Demonstration setup: Two buckets (one for the reservoir, one for the tank)

Components Required

  • ESP8266 Wi-Fi module
  • 0.96 inches I2C OLED display
  • High link AC to 5V DC converter module
  • Single channel relay module
  • Push button switches
  • SR04 waterproof ultrasonic sensor
  • AC water pump (any compatible pump)
  • Water pipe for transportation
  • Zero PCB board

Schematic and Assembly

  • Software: Fritzing for schematic design
  • Power: High link AC to 5V DC converter module powers the device
  • Connections:
    • Relay controls motor on/off
    • Motor powered via 220V AC
    • OLED display connected to I2C pins of ESP
    • Ultrasonic sensor’s echo and trigger pins connected to ESP digital pins
    • Three push buttons (mode selection, buzzer, relay control - using 2)
  • Assembly on Zero PCB board
  • Connection of AC lines to high link input terminal and relay
  • ESP8266 board placed into holder, ultrasonic sensor connected
  • Option to create a custom PCB for a professional look

Blink App Setup

  • Login to Blynk web dashboard
  • Add components:
    • Gauge (water level indication) - assign virtual pin V1
    • Switches for relay control and mode selection
  • Setup virtual digital pins to configure functions
  • Mobile dashboard setup similar to web dashboard

Coding and Testing

  • Libraries: Add required libraries to library folder
  • Pin assignments: Follow circuit diagram
  • Modify authentication token, Wi-Fi SSID, and password
  • Select NodeMCU board from list, select COM port, upload code
  • Testing:
    • ESP8266 connects to Wi-Fi, sends data to Blynk
    • OLED displays water level, manual mode status
    • Motor starts, fills tank, sensor measures level
    • Motor stops at 100% water level
  • Auto mode: Assign start/stop levels in app, automatic operation
    • Example: Motor turns off at 96% water level

Conclusion

  • Source code and written tutorial available on website
  • Users can ask questions in the comment section
  • Thank the viewers for watching