Wiznet makers

Hannah

Published October 29, 2025 ©

43 UCC

15 WCC

1 VAR

0 Contests

0 Followers

0 Following

Original Link

Water Level Monitor

Water Level Monitor - Arduino / ESP8266 / ESP32

COMPONENTS
PROJECT DESCRIPTION

Project Overview

hladinomer-studna-scripty is an open-source project designed to monitor water levels in wells, tanks, or reservoirs and visualize the data via web and MQTT communication.

Originally built around Wi-Fi (ESP8266/ESP32), this version integrates WIZnet’s W5500 Ethernet controller, transforming it into a wired IoT water monitoring node with enhanced stability and reliability.

This approach eliminates the connectivity issues of Wi-Fi—signal interference, range limits, and unstable networks—while maintaining real-time communication through HTTP (JSON) and MQTT protocols.

우물, 탱크, 저수조 등에서 수위를 측정하고 그 데이터를 웹과 MQTT를 통해 시각화·모니터링하는 오픈소스 프로젝트입니다.
ESP8266/ESP32의 Wi-Fi 환경으로도 설계되어있고,  아두이노와 W5500 을 이용해 유선 기반 IoT 수위 모니터링 노드로도 구현되어있습니다. 

Core Hardware

ComponentFunction
Arduino Board (UNO/MEGA, etc.)Main controller and data processor
WIZnet W5500Wired Ethernet communication with hardware TCP/IP offload
Water Level Sensor (HC-SR04, JSN-SR04T, etc.)Measures distance from sensor to water surface
Power Supply (DC / PoE options)Reliable power delivery for long-term installations
MQTT Broker / Web ServerCentralized data visualization and remote access

💡 W5500’s hardware TCP/IP engine significantly reduces MCU load, ensuring smooth long-term operation.

구성요소역할
Arduino 보드 (UNO/MEGA 등)전체 제어 및 데이터 처리
WIZnet W5500유선 이더넷 통신, 하드웨어 TCP/IP 오프로딩
수위 센서 (HC-SR04, JSN-SR04T 등)거리 기반 수면 높이 측정
전원 공급부 (DC/PoE 옵션)현장 환경에 따라 안정적 전력 공급
MQTT 브로커 / 웹서버수집 데이터 시각화 및 원격 관리

How It Works / Main Features

This system follows a simple yet powerful workflow:

  1. Water Level Measurement
    The ultrasonic sensor measures the distance to the water surface, calculating the level (in cm) and volume (in liters).
  2. Data Communication
    Through W5500, the device performs HTTP GET requests to the webserver (arduino.clanweb.eu) and retrieves JSON-formatted data.
    Then, it publishes parsed values to the MQTT broker (mqtt.iotindustries.sk) using topics: hladinomer/vyska → water height / hladinomer/objem → volume
  3. MQTT Integration
    The MQTT broker allows real-time visualization and remote monitoring via platforms such as Node-RED, Grafana, or AWS IoT Core.
  4. Periodic Operation
    The system collects and transmits data every 60 seconds.
  5. Error Recovery & Reconnection
    If the MQTT connection drops, the system automatically retries.
    DHCP failures trigger an immediate fallback to static IP.

⚙️ Main libraries used:
Ethernet2.h (W5500), ArduinoJson.h (for JSON parsing), PubSubClient.h (for MQTT communication)

  1. 센서 측정
    초음파 센서가 수면까지의 거리를 계산하여 수위(cm)와 용량(리터)을 산출합니다.
  2. 데이터 통신
    W5500을 통해 **HTTP 요청(GET)**으로 웹서버(arduino.clanweb.eu)에서 JSON 데이터를 수신하고, MQTT 퍼블리시hladinomer/vyska(수위), hladinomer/objem(용량) 토픽을 전송합니다.
  3. MQTT 통합
    브로커(mqtt.iotindustries.sk)에 데이터를 업로드하여,
    다른 시스템(예: Node-RED, Grafana, AWS IoT Core)에서 구독 및 시각화 가능.
  4. 주기적 업데이트
    기본 60초 주기로 데이터 수집 → HTTP → MQTT 업로드 루프를 수행합니다.
  5. 에러 복구 및 재접속
    MQTT 연결이 끊기면 자동 재시도하며, DHCP 실패 시 정적 IP로 즉시 전환합니다.

Key Technologies

TechnologyDescription
WIZnet W5500 Ethernet ControllerHardware TCP/IP stack for reliable, low-overhead network handling
MQTT ProtocolLightweight message transport for IoT data
HTTP + JSONRESTful data exchange with remote servers
ArduinoJson LibraryEfficient parsing of incoming JSON payloads
PubSubClient LibraryManages MQTT publishing and subscription
Deep Sleep / OTA (ESP extension)Optional low-power and remote firmware update features

🔒 Future expansions with WIZnet ecosystem:

  • W6100 for IPv6-ready networks
  • TLS-secured MQTT communication
  • PoE (Power over Ethernet) for power + data integration

Applications & Benefits

SectorExample UseBenefit
AgricultureGroundwater or irrigation well monitoringReal-time water resource management
Smart BuildingsRainwater or cooling tank trackingPrevent overflow, automate maintenance
Industrial PlantsCooling or waste-water tank level controlIncreased safety and efficiency
Disaster ResponseFlood / drought monitoringEarly warning systems
Smart CitiesCentralized water network monitoringImproved urban water infrastructure management

Advantages of WIZnet Ethernet Integration:

  • Reliable in noisy or remote environments (no signal loss)
  • Immune to RF interference in industrial sites
  • Enhanced network security (wired-only connectivity)
  • Ideal for 24/7 unattended operation
분야적용 예시기대 효과
농업지하수 수위 감시, 관정 자동 급수실시간 수자원 관리
스마트 빌딩빗물 저장조, 냉각수 탱크 모니터링누수 방지 및 유지보수 자동화
산업 플랜트냉각수/폐수 탱크 수위 감시안전성 및 자동 제어 향상
재난 대응홍수·가뭄 대비 수위 모니터링조기 경보 시스템 구축
스마트시티 인프라중앙 서버 기반 원격 감시도시 규모 물 관리 최적화

WIZnet 기반의 장점

  • Wi-Fi보다 안정적 (지하·원거리·전파혼잡 구간 대응)
  • 산업 환경 내 간섭 최소화

 

Documents
  • Water Level Monitor

Comments Write