Wiznet makers

Hannah

Published February 01, 2026 ©

64 UCC

17 WCC

1 VAR

0 Contests

0 Followers

0 Following

Original Link

farm-pump-controller

This project is an industrial-grade smart pump controller designed for agricultural water supply systems.

COMPONENTS
PROJECT DESCRIPTION

프로젝트 개요 (KR)

본 프로젝트는 농업용 급수 펌프를 자동·원격으로 제어하고 보호하는 산업용 수준의 스마트 펌프 컨트롤러입니다.
수위(초음파), 전류·전압(3상), 온도, 플로트 스위치 등 다중 센서를 기반으로 펌프를 안전하게 운전하며,
Ethernet(W5500) + MQTT를 통해 실시간 상태 모니터링과 원격 제어를 지원합니다.

단순 ON/OFF 제어가 아니라,
건식 운전, 과전류, 상 결상, 센서 오류, 통신 장애까지 고려한 Fail-Safe 제어 로직을 중심으로 설계되었습니다.

기존의 급수펌프 자동화 프로젝트들이 단순 수위 기반 제어에 머무른 반면, 본 프로젝트는 실제 농업 현장에서 발생하는 전기·센서·통신 장애를 고려한 Fail-Safe 중심의 산업용 제어 구조를 구현한 것이 가장 큰 차별점입니다.

기존 프로젝트

“수위 낮으면 켜고, 높으면 끈다”

이 프로젝트

“펌프가 켜졌고, 멈췄으며, 언제 다시 켜도 안전한지를 판단한다”

👉 차별점은 **제어 논리의 ‘깊이’와 ‘현장성’**입니다.

 

Fail-Safe 중심 설계 (제어보다 보호가 먼저)

  • Hard Fault / Soft Fault 이중 구조
    • Hard Fault: 즉시 차단 + 수동 리셋 필요
    • Soft Fault: 조건 회복 시 자동 복귀 또는 안전 정지
  • 실제 산업 제어기(PLC, 인버터)와 유사한 사고 체계

시스템 아키텍처 요약 (KR)

시스템은 다음 3개 계층으로 구성됩니다.

제어 계층 (ESP32 MCU)

  • 펌프 상태 FSM (IDLE / STARTING / RUNNING / STOPPING)
  • 자동·수동 모드 전환
  • 안전 인터락 및 타이머 기반 보호 로직

센서 계층

  • 초음파 수위 센서 (탱크 수위 % 계산)
  • PZEM004T (전압·전류 측정)
  • ZMPT101B (3상 전압 감시)
  • DHT11 / DS18B20 (환경·수조 온도)
  • 플로트 스위치 (오버플로우 하드웨어 보호)

네트워크 & UI 계층

  • W5500 Ethernet (Static IP)
  • MQTT 상태 Publish / 명령 Subscribe
  • I2C LCD 실시간 상태 표시
  • RTC 기반 로그 타임스탬프

핵심 기능 및 차별점 (KR)

완전 자동 급수 제어

  • 수위 기반 자동 시작/정지
  • 최소 운전 시간 & 재시작 락 적용

산업용 안전 보호 로직

  • 건식 운전(Dry-Run) 감지
  • 과전류 / 상 결상(Phase Fail)
  • 초음파 센서 장애 감지
  • 플로트 스위치 즉시 차단(Hard Fault)

Hard Fault / Soft Fault 이중 구조

  • 위험 상황은 즉시 차단
  • 경고 수준은 운전 중단 또는 알림 처리

신뢰성 중심 설계

  • Watchdog 기반 MCU 보호
  • Ethernet 링크 감시 및 재초기화
  • 주기적 안전 리부트(펌프 OFF 조건)

왜 W5500 Ethernet인가? (KR)

이 프로젝트는 농장·펌프실 환경을 고려하여 Wi-Fi 대신 **유선 Ethernet(W5500)**을 선택했습니다.

  • 전파 간섭, 거리, 환경 변화에 강함
  • 고정 IP 기반의 안정적인 MQTT 통신
  • 장시간 무인 운용에 적합
  • ESP32와 SPI로 단순·신뢰성 높은 연결

👉 “항상 연결되어 있어야 하는 제어 시스템”에 최적의 선택입니다.

Project Overview (EN)

This project is an industrial-grade smart pump controller designed for agricultural water supply systems.
It automatically and remotely controls a water pump using multiple sensors such as ultrasonic level sensing, three-phase voltage/current monitoring, temperature sensors, and a float switch.

Using Ethernet (W5500) and MQTT, the system provides real-time monitoring and remote operation.
Beyond simple ON/OFF control, it focuses on fail-safe operation, handling dry-run conditions, over-current, phase failure, sensor faults, and communication failures.

 

System Architecture Summary (EN)

 

The system is organized into three main layers:

1.Control Layer (ESP32 MCU)

  • Pump FSM (IDLE / STARTING / RUNNING / STOPPING)
  • Automatic and manual operation modes
  • Safety interlocks and time-based protection logic

2.Sensor Layer

  • Ultrasonic water-level sensor (tank level percentage)
  • PZEM004T for voltage/current monitoring
  • ZMPT101B for three-phase voltage detection
  • DHT11 / DS18B20 for ambient and tank temperature
  • Float switch for hardware-level overflow protection

3.Network & UI Layer

  • W5500 Ethernet with static IP
  • MQTT publish/subscribe for monitoring and control
  • I2C LCD for real-time local status
  • RTC-based timestamped logging

Key Features & Differentiators (EN)

Fully Automatic Water Pump Control

  • Level-based automatic start/stop
  • Minimum runtime and restart lock protection

Industrial-Grade Safety Logic

  • Dry-run detection
  • Over-current and phase failure protection
  • Ultrasonic sensor fault handling
  • Immediate shutdown via float switch (Hard Fault)

Dual Fault Model (Hard / Soft Fault)

  • Critical faults trigger immediate shutdown
  • Non-critical faults generate warnings or controlled stops

Reliability-Focused Design

  • Watchdog-protected MCU
  • Ethernet link supervision and recovery
  • Periodic safe reboot (only when pump is OFF)

Why W5500 Ethernet? (EN)

W5500 Ethernet was chosen over Wi-Fi due to the harsh and remote nature of farm pump installations.

  • Resistant to interference and environmental changes
  • Stable MQTT communication with static IP
  • Suitable for long-term unattended operation
  • Simple and reliable SPI interface with ESP32

👉 It is an ideal choice for always-on, safety-critical control systems.

 

 

FAQ (WIZnet-Focused)

1. Why use W5500 instead of Wi-Fi for a farm pump controller?

W5500 provides wired Ethernet with a hardware TCP/IP stack, eliminating Wi-Fi instability caused by distance, walls, moisture, and EMI common in farms. It also reduces ESP32 RAM usage by roughly 30 KB compared to a software TCP/IP stack, improving long-term reliability for always-on pump controllers.

2. How is the W5500 connected to the ESP32 in this project?

The W5500 communicates over SPI, with a dedicated chip-select pin (Ethernet.init(5)) and a separate hardware reset pin (GPIO25). This allows both software reinitialization and physical reset of the Ethernet controller without rebooting the MCU.

3. What exact role does W5500 play in the MQTT architecture?

W5500 acts as the TCP/IP engine beneath EthernetClient. MQTT publish/subscribe traffic is handled through W5500 hardware sockets, ensuring stable broker connections even when the ESP32 is busy with sensor processing and motor FSM logic.

4. Is this project suitable for beginners in Industrial IoT?

The system is advanced but educational. Beginners can learn structured fault handling, deterministic networking, and FSM-based motor control. However, basic knowledge of SPI, MQTT, and electrical safety is recommended before deploying it in a real pump environment.

5. How does W5500 compare to ENC28J60 or software TCP/IP?

ENC28J60 relies heavily on the MCU for TCP/IP processing and is sensitive to timing issues under load. W5500 integrates full TCP/IP hardware, supports 8 sockets, and is far more stable for MQTT-based Industrial IoT applications like pump controllers.

Documents
Comments Write