Wiznet makers

scott

Published February 12, 2026 ©

101 UCC

20 WCC

44 VAR

0 Contests

0 Followers

0 Following

Original Link

Water level monitor - Arduino / ESP8266 / ESP32 / Sigfox

Industrial-Grade Water Level Monitoring Architecture Based on Hardware TCP/IP

COMPONENTS Hardware components

Arduino - Arduino Ethernet Shield

x 1


Espressif - ESP32

x 1


PROJECT DESCRIPTION

본 프로젝트는 초음파 센서를 활용하여 탱크 및 우물의 수위를 측정하고, 이를 클라우드 서버에 전송하여 데이터베이스에 저장하는 IoT 기반 수위 모니터링 시스템입니다. Wi-Fi, Sigfox, 그리고 Ethernet을 모두 지원하는 유연한 통신 구조를 갖추고 있으며, 특히 하드웨어 TCP/IP 기반 Ethernet 솔루션을 통해 산업 환경에서도 안정적인 데이터 전송이 가능합니다. 센싱부터 데이터 아카이빙까지 완결된 End-to-End 파이프라인을 구성함으로써, 단순 DIY 프로젝트를 넘어 실환경 적용이 가능한 구조를 제시합니다.


1. 프로젝트 개요 및 배경

수위 모니터링은 농업용 저수조, 산업용 액체 저장 탱크, 빗물 저장 시스템 등 다양한 현장에서 필수적인 관리 요소입니다. 그러나 여전히 많은 환경에서 수동 점검 방식에 의존하고 있으며, 이는 다음과 같은 한계를 가집니다.

  • 원거리 접근의 어려움
  • 실시간 데이터 부재
  • 위험 환경에서의 안전 문제
  • 기록 관리의 비효율성

본 프로젝트는 초음파 기반 비접촉식 측정 방식과 네트워크 통신을 결합하여 이러한 문제를 해결합니다. 특히 다양한 통신 옵션을 지원함으로써 설치 환경에 맞는 유연한 시스템 구성이 가능합니다.


2. 시스템 아키텍처

2.1 전체 구성 요소

  • 초음파 센서 (HC-SR04)
  • 마이크로컨트롤러 (Arduino / ESP8266 / ESP32)
  • 통신 계층
  • Ethernet (WIZnet 하드웨어 TCP/IP 솔루션 기반)
  • Wi-Fi
  • Sigfox
  • Web Cloud 서버
  • MySQL 데이터베이스

2.2 데이터 흐름 단계 분석 (1~6)

본 시스템은 다음과 같은 순차적 동작 구조를 가집니다.

Principle how measurement and data transmission works
데이터 흐름 단계 분석

① Trigger 신호 발생
MCU가 초음파 센서의 Trigger 핀에 펄스를 인가하여 측정을 시작합니다.

② 초음파 전파
초음파가 탱크 내부 공간을 통과하여 수면 방향으로 전파됩니다.

③ 수면 반사
수면에 도달한 초음파가 반사되어 센서로 되돌아옵니다.

④ Echo 수신 및 시간 측정
MCU는 Echo 신호의 왕복 시간을 측정합니다.

거리 계산 공식은 다음과 같습니다.

거리 계산 공식

이 값을 기준으로 탱크 높이 대비 실제 수위를 환산합니다.

⑤ 클라우드 전송
계산된 수위 데이터를 HTTP 또는 HTTPS POST 방식으로 클라우드 서버에 전송합니다.

⑥ 데이터 저장 및 시각화
서버는 수신 데이터를 MySQL DB에 저장하고, 웹 대시보드에서 시각화합니다.


2.3 계층 구조 관점

물리 계층

  • 초음파 센서
  • 수면
  • 탱크 구조

제어 계층

  • MCU 수위 환산 로직
  • 거리 계산 및

네트워크 계층

  • Ethernet / Wi-Fi / Sigfox

데이터 계층

  • Cloud Application
  • MySQL Database

이 구조는 센싱부터 데이터 아카이빙까지 완결된 IoT 파이프라인을 형성합니다.


3. 핵심 기술 선택과 설계 포인트

3.1 초음파 기반 비접촉식 측정

  • 수질 오염 및 부식 영향 최소화
  • 구조가 단순하고 비용 효율적
  • 산업 현장 적용에 적합

3.2 통신 방식 비교

Wi-Fi

  • 설치 편의성 우수
  • 전파 간섭 가능성 존재
  • 전력 소모 상대적으로 높음

Sigfox

  • 저전력 장거리 통신
  • 데이터 전송량 제한 존재
  • 간헐적 상태 모니터링에 적합

Ethernet

  • 예측 가능한 지연 시간
  • 높은 통신 신뢰성
  • 장시간 연속 운용 환경에 적합

환경 조건에 따라 통신 전략을 선택할 수 있는 점이 본 설계의 핵심입니다.


4. WIZnet Insight: 하드웨어 TCP/IP Ethernet의 전략적 의미

WIZnet의 하드웨어 TCP/IP 기반 Ethernet 솔루션은 네트워크 스택을 칩 내부에서 처리합니다. 이 구조는 다음과 같은 장점을 제공합니다.

  • MCU의 연산 부담 감소
  • 메모리 사용량 절감
  • 안정적인 소켓 처리
  • 장시간 운용 시 통신 안정성 확보
  • 무선 대비 예측 가능한 네트워크 품질

특히 소형 MCU 환경에서도 복잡한 TCP/IP 스택을 소프트웨어로 구현할 필요가 없다는 점은 시스템 안정성과 개발 효율성 측면에서 중요한 차별 요소입니다. 산업 IoT 환경에서는 “연결의 안정성”이 곧 시스템 신뢰성을 결정합니다.


5. 비즈니스 가치 및 적용 시나리오

5.1 농업용 저수조 자동 모니터링

원격 농지의 수위 변화를 실시간 확인하여 급수 시점을 최적화할 수 있습니다.

5.2 산업용 액체 저장 탱크 관리

임계 수위 도달 시 경보 시스템과 연동하여 안전 사고를 예방할 수 있습니다.

5.3 빌딩 설비 통합 관리

기존 BMS(Building Management System)와 연동하여 설비 자동화를 구현할 수 있습니다.

5.4 스마트 시티 수자원 관리

빗물 저장 및 홍수 대응 시스템과 통합하여 도시 단위의 수자원 관리에 활용할 수 있습니다.

이 구조는 단일 센서 프로젝트를 넘어 확장 가능한 IoT 플랫폼으로 발전할 수 있습니다.


6. 확장 및 고도화 전략

  • HTTPS/TLS 완전 적용
  • MQTT 기반 경량 메시징 구조 도입
  • Edge 연산 추가 (이상 감지 로직 탑재)
  • 다중 센서 통합
  • Single Pair Ethernet(10BASE-T1S) 기반 산업 네트워크 확장

FAQ

Q1. Wi-Fi 대신 Ethernet을 선택해야 하는 환경은 언제인가요?
통신 안정성이 중요하고 장시간 연속 운용이 필요한 산업 환경에서는 Ethernet이 적합합니다.

Q2. 하드웨어 TCP/IP 오프로딩의 실제 이점은 무엇인가요?
MCU 리소스를 절감하고 소프트웨어 네트워크 스택 오류 가능성을 줄일 수 있습니다.

Q3. HTTPS 적용 시 MCU 성능은 충분한가요?
소프트웨어 TLS 적용 시 메모리 요구량이 증가합니다. 하드웨어 오프로딩 구조와 적절한 MCU 선택이 중요합니다.

Q4. Sigfox는 어떤 용도에 적합한가요?
저전력, 저빈도 데이터 업로드가 필요한 원거리 모니터링 환경에 적합합니다.

Q5. 산업 현장에서 센서 정확도는 어떻게 보정하나요?
온도 보정, 다중 샘플 평균화, 설치 위치 최적화 등을 통해 정확도를 개선할 수 있습니다.

 



This project presents an IoT-based water level monitoring system that measures tank or well levels using an ultrasonic sensor and transmits the data to a cloud server for database storage. The architecture supports multiple communication options, including Wi-Fi, Sigfox, and Ethernet. In particular, an Ethernet solution based on hardware TCP/IP offloading enables stable and reliable communication suitable for industrial environments. From sensing to cloud archiving, the system forms a complete end-to-end data pipeline, extending beyond a simple DIY implementation toward real-world deployment.


1. Project Overview and Background

Water level monitoring is essential in agricultural reservoirs, industrial liquid storage tanks, and rainwater harvesting systems. However, many sites still rely on manual inspection, which presents several limitations:

  • Limited accessibility in remote locations
  • Lack of real-time visibility
  • Safety risks in hazardous environments
  • Inefficient data logging and history tracking

This project addresses these challenges by combining non-contact ultrasonic measurement with network connectivity. The system’s flexible communication options allow adaptation to various installation environments.


2. System Architecture

2.1 Key Components

  • Ultrasonic sensor (HC-SR04)
  • Microcontroller (Arduino / ESP8266 / ESP32)
  • Communication layer
  • Ethernet (based on WIZnet hardware TCP/IP solution)
  • Wi-Fi
  • Sigfox
  • Web cloud server
  • MySQL database

2.2 Step-by-Step Data Flow (1–6)

Principle how measurement and data transmission works
Step-by-Step Data Flow

The system operates in the following sequential process:

1. Trigger Signal Generation
The MCU sends a pulse to the ultrasonic sensor’s trigger pin to initiate measurement.

2. Ultrasonic Wave Transmission
The ultrasonic signal propagates through the tank toward the water surface.

3. Surface Reflection
The wave reflects off the water surface and returns to the sensor.

4. Echo Reception and Time Measurement
The MCU measures the round-trip time of the echo signal.

The distance is calculated as:

Using the tank height as a reference, the system converts this distance into an actual water level value.

5. Cloud Transmission
The calculated water level is transmitted to the cloud server using HTTP or HTTPS POST requests.

6. Data Storage and Visualization
The server processes the received data, stores it in a MySQL database, and presents it through a web dashboard.


2.3 Layered Architecture Perspective

Physical Layer

  • Ultrasonic sensor
  • Water surface
  • Tank structure

Control Layer

  • MCU
  • Distance calculation and level conversion logic

Network Layer

  • Ethernet / Wi-Fi / Sigfox

Data Layer

  • Cloud application
  • MySQL database

This layered structure forms a complete IoT data pipeline from sensing to long-term archiving.


3. Core Design Considerations

3.1 Advantages of Ultrasonic Non-Contact Measurement

  • Minimizes corrosion and contamination risks
  • Simple and cost-effective structure
  • Suitable for industrial environments

3.2 Communication Strategy Comparison

Wi-Fi

  • Easy deployment
  • Susceptible to interference
  • Relatively higher power consumption

Sigfox

  • Low power, long-range communication
  • Limited payload size and transmission frequency
  • Suitable for periodic status reporting

Ethernet

  • Predictable latency
  • High communication reliability
  • Ideal for continuous operation environments

The ability to select the communication method based on environmental constraints is a key strength of the system design.


4. WIZnet Insight: Strategic Value of Hardware TCP/IP Ethernet

WIZnet’s hardware TCP/IP-based Ethernet solution processes the TCP/IP stack within dedicated hardware. This architecture provides several important advantages:

  • Reduced computational burden on the MCU
  • Lower memory usage
  • Stable socket handling
  • Reliable long-term operation

Predictable and interference-free network performance compared to wireless solutions

In small MCU environments, eliminating the need for a software-based TCP/IP stack significantly enhances system stability and development efficiency. In industrial IoT deployments, connection reliability directly determines overall system trustworthiness.


5. Business Value and Application Scenarios

5.1 Agricultural Reservoir Monitoring

Remote farms can monitor water levels in real time and optimize irrigation timing.

5.2 Industrial Liquid Storage Management

Critical threshold alerts can be integrated to prevent overflow or shortage incidents.

5.3 Building Facility Integration

The system can interface with Building Management Systems (BMS) to enable automated facility control.

5.4 Smart City Water Resource Management

Integration with rainwater storage and flood response systems supports urban-scale water management strategies.

This architecture is scalable and can evolve into a broader IoT monitoring platform.


6. Future Expansion and Enhancement

  • Full HTTPS/TLS implementation
  • MQTT-based lightweight messaging
  • Edge-based anomaly detection logic
  • Multi-sensor integration

Expansion toward Single Pair Ethernet (10BASE-T1S) industrial networks


FAQ

Q1. When should Ethernet be chosen over Wi-Fi?
Ethernet is recommended in industrial environments where long-term stability and predictable communication performance are critical.

Q2. What are the practical benefits of hardware TCP/IP offloading?
It reduces MCU resource usage and minimizes risks associated with software-based network stack implementation.

Q3. Is MCU performance sufficient for HTTPS implementation?
Software TLS increases memory requirements. Proper MCU selection and hardware offloading architecture are important considerations.

Q4. When is Sigfox appropriate?
Sigfox is suitable for low-power, infrequent data transmissions over long distances.

Q5. How can sensor accuracy be maintained in industrial environments?
Temperature compensation, multi-sample averaging, and optimized sensor placement improve measurement reliability.

Documents
  • Source codes for Arduino / ESP8266 / ESP32

  • Schematics

Comments Write