Skip to content

RMS GATEWAY

RMS GATEWAY

mason

Published November 19, 2026

Original author: onmilkOriginal source (new tab)

RMS GATEWAY

Components

Hardware components

WIZnet parts

Project description

1. 프로젝트 개요

OnMilk는 베트남 Nhatrang Hitech(NHTC)가 개발한 산업용 IoT 기반 우유 냉각 탱크 원격 모니터링 시스템입니다.

STM32F4 마이크로컨트롤러를 기반으로 냉각 탱크의 온도, 중량, 운전 상태를 수집하고, WIZnet W5500 이더넷 컨트롤러를 통해 서버로 전송합니다. 관리자는 OnMilk Dashboard에서 장비 상태와 운전 기록을 원격으로 확인할 수 있습니다.

RMS 게이트웨이
1. 프로젝트 개요

특히 NHTC의 공식 MIII RMS Gateway Version 2 사양서에서 W5500의 실제 사용이 확인됩니다. 이 제품은 TCP/IP 통신을 하드웨어로 처리하여 STM32F4의 네트워크 처리 부담을 줄이는 역할을 합니다.

2. OnMilk 시스템은 어떻게 작동하나요?

우유 냉각 탱크는 집유된 우유의 품질을 유지하기 위해 온도와 장비 상태를 지속적으로 관리해야 합니다. 그러나 여러 시설에 설치된 장비를 작업자가 일일이 확인하는 방식에는 한계가 있습니다.

OnMilk는 이러한 문제를 해결하기 위해 현장 장비의 데이터를 자동으로 수집하고 중앙 서버에서 관리하도록 설계되었습니다.

주요 하드웨어 구성

NHTC가 공개한 MIII RMS Gateway Version 2의 주요 사양은 다음과 같습니다.

구성 요소주요 기능
STM32F4센서 데이터 수집 및 장비 상태 처리
WIZnet W5500이더넷 및 TCP/IP 통신
RS485Mueller MIII 냉각 탱크 제어보드 연결
RS232전자 저울 우유의 중량 측정
4–20mA 입력PT100 온도 센서 신호 수집
릴레이 출력현장 경보 장치 제어
SD 카드 슬롯외부 저장장치 인터페이스 제공
USB / FOTA펌웨어 업데이트 지원

RS485와 RS232 인터페이스에는 절연 및 서지 보호 회로가 적용되어 있습니다. 이는 전기적 노이즈가 발생할 수 있는 산업 현장에서 장비 간 통신을 보호하기 위한 구성입니다.

RMS GATEWAY

데이터 흐름

OnMilk의 전체 데이터 흐름은 다음과 같습니다.

냉각 탱크 및 센서 → STM32F4 → W5500 → MQTT 서버 → OnMilk Dashboard

데이터 수집: STM32F4가 RS485, RS232 및 아날로그 입력을 통해 탱크 상태와 측정값을 수집합니다.

 

데이터 처리: 수집된 정보를 원격 전송에 적합한 형태로 처리합니다.

네트워크 전송: W5500의 이더넷 인터페이스를 통해 MQTT 서버로 데이터를 전달합니다.

원격 모니터링: 관리자는 대시보드에서 온도 변화, 운전 상태 및 이벤트 기록을 확인합니다.

이 구조는 기존 냉각 탱크의 제어 기능을 유지하면서 원격 모니터링 기능을 추가할 수 있다는 점에서 의미가 있습니다.

RMS GATEWAY, 데이터 흐름

3. WIZnet W5500은 어떤 역할을 하나요?

STM32F4의 네트워크 통신 처리 부담 감소

W5500은 하드웨어 TCP/IP 스택과 이더넷 MAC/PHY를 내장한 컨트롤러입니다. MCU와 SPI 인터페이스로 연결되며, 네트워크 소켓과 패킷 처리를 담당합니다.

주요 사양은 다음과 같습니다.

10/100Mbps Ethernet 지원

하드웨어 TCP/IP 스택 내장

8개의 독립 하드웨어 소켓

총 32KB의 내부 송수신 버퍼

최대 80MHz SPI 인터페이스 지원

OnMilk에서는 STM32F4가 현장 데이터 수집과 처리를 담당하고, W5500이 서버 연결에 필요한 네트워크 기능을 분담합니다.

이러한 역할 분리는 여러 산업용 인터페이스를 동시에 관리해야 하는 임베디드 게이트웨이에 적합합니다.

유선 이더넷 기반의 지속적인 데이터 전송

OnMilk Gateway는 고정 설치형 산업 장비에 해당합니다. 따라서 현장 네트워크에 연결된 상태에서 장비 데이터를 주기적으로 전송하는 구조가 중요합니다.

W5500을 이용하면 MCU에 복잡한 소프트웨어 TCP/IP 스택을 직접 구현하지 않고도 유선 네트워크 통신을 구성할 수 있습니다.

다만 W5500이 MQTT 메시지 생성이나 데이터 분석까지 수행하는 것은 아닙니다. 이러한 기능은 MCU 펌웨어와 서버에서 처리해야 합니다.

4. 구현 시 확인할 사항

공개 자료에서 확인된 내용

NHTC의 공식 사양서에는 STM32F4, W5500, 산업용 통신 인터페이스, MQTT 서버 연결 구조가 명시되어 있습니다.

이를 통해 게이트웨이의 기본 하드웨어 구성과 네트워크 역할은 파악할 수 있습니다.

반면 다음 항목은 공개 자료만으로 확인하기 어렵습니다.

STM32F4와 W5500의 실제 GPIO 및 SPI 핀 배치

W5500 초기화 및 소켓 관리 코드

MQTT 메시지 형식과 통신 주기

DHCP 또는 고정 IP 설정 방식

네트워크 장애 시 데이터 저장 및 재전송 절차

NHTC의 실제 펌웨어 소스 코드도 확인되지 않았으므로 특정 라이브러리나 함수가 사용되었다고 단정할 수는 없습니다.

유사 시스템을 개발할 경우

WIZnet의 공식 ioLibrary를 활용하면 STM32F4에서 W5500 기반 TCP 통신을 구현할 수 있습니다.

일반적인 개발 과정은 다음과 같습니다.

STM32F4의 SPI 및 W5500 제어 핀을 설정합니다.

W5500을 초기화하고 소켓 버퍼를 구성합니다.

MAC 주소와 IP 네트워크 정보를 설정합니다.

TCP 연결을 생성하고 MQTT 서버에 접속합니다.

측정 데이터를 전송하고 연결 상태를 주기적으로 확인합니다.

이는 유사한 게이트웨이를 개발하기 위한 일반적인 구현 절차이며, NHTC의 실제 펌웨어 구현을 재현한 것은 아닙니다.

5. 산업 현장에서 고려해야 할 사항

SPI 통신 안정성: MCU와 W5500 사이의 신호 무결성, 클록 속도, 리셋 시퀀스를 확인해야 합니다.

RS485/RS232 인터페이스: 종단 저항과 통신 설정뿐 아니라 절연, 접지 및 서지 보호를 검토해야 합니다.

네트워크 복구: 이더넷 케이블 분리 또는 서버 접속 실패 후 자동으로 연결을 복구하는 기능이 필요합니다.

데이터 보존: 통신 장애 중에도 측정 기록을 유지하려면 별도의 비휘발성 저장장치와 재전송 로직을 설계해야 합니다.

현장 경보: 인터넷 연결이 끊어져도 중요한 온도 이상이나 장비 오류를 현장에서 감지할 수 있도록 구성하는 것이 좋습니다.

통신 보안: W5500 자체는 TLS 암호화를 처리하지 않으므로, 암호화와 장치 인증이 필요하다면 별도의 보안 구조를 마련해야 합니다.

6. FAQ

Q1. OnMilk에서 WIZnet W5500을 사용하는 이유는 무엇인가요?

W5500은 하드웨어 TCP/IP 스택을 내장하고 있어 STM32F4의 네트워크 처리 부담을 줄일 수 있습니다. MCU가 센서 데이터 수집과 장비 상태 관리에 집중하면서 서버 통신을 구현할 수 있다는 장점이 있습니다. 다만 NHTC가 해당 부품을 선택한 구체적인 내부 평가 자료는 공개되지 않았습니다.

Q2. W5500은 STM32F4와 어떻게 연결되나요?

SPI 인터페이스를 이용합니다. 기본적으로 SCLK, MOSI, MISO, CS 신호가 필요하며, 설계에 따라 리셋 및 인터럽트 핀도 사용합니다. 실제 OnMilk Gateway의 GPIO 배치는 회로도가 공개되지 않아 확인할 수 없습니다.

Q3. W5500은 OnMilk에서 어떤 데이터를 전송하나요?

시스템 구성상 냉각 탱크의 온도, 중량, 운전 상태 및 이벤트 정보를 서버로 전달하는 이더넷 통신에 사용됩니다. 데이터 수집과 MQTT 메시지 생성은 MCU 측 소프트웨어가 담당하며, W5500은 TCP/IP 전송 기능을 제공합니다.

Q4. 초보 개발자도 W5500 기반 모니터링 시스템을 구현할 수 있나요?

기본적인 SPI 통신과 TCP/IP 개념을 이해한다면 WIZnet ioLibrary를 이용해 간단한 데이터 전송 장치를 개발할 수 있습니다. 다만 OnMilk처럼 산업용 센서, 직렬 통신, 절연 회로 및 서버를 통합하려면 추가적인 임베디드 시스템 개발 경험이 필요합니다.

Q5. W5500만으로 네트워크 장애 중 데이터를 저장할 수 있나요?

아닙니다. W5500의 32KB 메모리는 네트워크 송수신 버퍼이며 장기 데이터 저장용이 아닙니다. 연결이 끊어진 동안 측정값을 보존하려면 별도의 저장장치와 복구 로직이 필요합니다. NHTC 사양서에는 SD 카드 슬롯이 명시되어 있지만, 실제 오프라인 데이터 저장 기능에 사용되는지는 확인되지 않았습니다.

모든 이미지 출처 : https://nhtc.com.vn/products/onmilk.html#products

1. Project Overview

OnMilk is an Industrial IoT-based remote monitoring system for milk cooling tanks, developed by Nhatrang Hitech (NHTC) in Vietnam.

The system uses an STM32F4 microcontroller to collect temperature, weight, and operating status data from milk cooling tanks. The collected data is transmitted to a server through the WIZnet W5500 Ethernet controller. Operators can remotely monitor equipment status and operational records through the OnMilk Dashboard.

RMS 게이트웨이
1. Project Overview

The use of the W5500 is explicitly confirmed in NHTC's official MIII RMS Gateway Version 2 specifications. By handling TCP/IP communication in hardware, the W5500 reduces the network processing workload on the STM32F4 microcontroller.

2. How Does the OnMilk System Work?

Milk cooling tanks require continuous monitoring of temperature and equipment conditions to maintain the quality of collected milk. However, manually inspecting equipment installed across multiple facilities can be inefficient and difficult to manage.

OnMilk addresses this challenge by automatically collecting data from field equipment and managing it through a centralized server.

Main Hardware Components

The following table summarizes the main hardware specifications of the MIII RMS Gateway Version 2 published by NHTC.

ComponentMain Function
STM32F4Sensor data acquisition and equipment status processing
WIZnet W5500Ethernet and TCP/IP communication
RS485Connection to the Mueller MIII milk cooling tank control board
RS232Connection to an electronic scale for measuring milk weight
4–20mA InputSignal acquisition from a PT100 temperature sensor
Relay OutputControl of local alarm devices
SD Card SlotInterface for external storage
USB / FOTAFirmware update support

The RS485 and RS232 interfaces include electrical isolation and surge protection circuits. These features help protect communication between devices in industrial environments where electrical noise and voltage transients may occur.

RMS GATEWAY

Data Flow

The overall data flow of the OnMilk system is as follows:

Milk Cooling Tank and Sensors → STM32F4 → W5500 → MQTT Server → OnMilk Dashboard

Data Acquisition: The STM32F4 collects tank status information and measurement data through RS485, RS232, and analog input interfaces.

Data Processing: The collected information is processed and formatted for remote transmission.

Network Transmission: The processed data is transmitted to the MQTT server through the Ethernet interface provided by the W5500.

Remote Monitoring: Operators can monitor temperature changes, equipment operating conditions, and event logs through the OnMilk Dashboard.

This architecture enables remote monitoring capabilities to be added while preserving the existing control functions of the milk cooling tank.

RMS GATEWAY, Data Flow

3. What Role Does the WIZnet W5500 Play?

Reducing the Network Processing Workload on the STM32F4

The W5500 is an Ethernet controller with an integrated hardware TCP/IP stack and Ethernet MAC/PHY. It communicates with the MCU through an SPI interface and handles network socket management and packet processing.

Its key specifications include:

10/100 Mbps Ethernet support

Integrated hardware TCP/IP stack

8 independent hardware sockets

32 KB of internal transmit and receive buffers

SPI interface supporting speeds up to 80 MHz

In the OnMilk system, the STM32F4 handles field data acquisition and processing, while the W5500 manages the network functions required for server communication.

This division of responsibilities is well suited to embedded gateways that must manage multiple industrial interfaces simultaneously.

Continuous Data Transmission over Wired Ethernet

The OnMilk Gateway is designed for fixed industrial installations. Therefore, maintaining network connectivity and periodically transmitting equipment data are important system requirements.

By using the W5500, developers can implement wired Ethernet communication without having to run a complete software-based TCP/IP stack on the MCU.

However, the W5500 does not generate MQTT messages or perform data analysis. These functions must be handled by the MCU firmware and server-side software.

4. Implementation Considerations

Information Confirmed by Public Documentation

NHTC's official specifications identify the STM32F4, W5500, industrial communication interfaces, and MQTT server connection architecture.

This information provides a general understanding of the gateway's hardware configuration and network functionality.

However, the following implementation details cannot be confirmed from the publicly available documentation:

Actual GPIO and SPI pin assignments between the STM32F4 and W5500

W5500 initialization and socket management code

MQTT message format and communication intervals

DHCP or static IP configuration

Data storage and retransmission procedures during network outages

Since NHTC's actual firmware source code is not publicly available, it is not possible to confirm which specific libraries or functions are used.

Developing a Similar System

Developers can use WIZnet's official ioLibrary to implement W5500-based TCP communication on an STM32F4 microcontroller.

A typical development process includes the following steps:

Configure the STM32F4 SPI interface and W5500 control pins.

Initialize the W5500 and configure its socket buffers.

Set the MAC address and IP network configuration.

Establish a TCP connection and connect to the MQTT server.

Transmit measurement data and periodically monitor the connection status.

These steps describe a general implementation approach for developing a similar gateway. They are not a reproduction of NHTC's actual firmware implementation.

5. Considerations for Industrial Environments

SPI Communication Reliability: Verify signal integrity, clock speed, and reset sequences between the MCU and W5500.

RS485/RS232 Interfaces: Review termination resistors, communication settings, electrical isolation, grounding, and surge protection.

Network Recovery: Implement automatic reconnection mechanisms to recover from Ethernet cable disconnections or server connection failures.

Data Retention: To preserve measurement records during network outages, use non-volatile storage and implement data retransmission logic.

Local Alarms: Critical temperature abnormalities or equipment faults should be detectable locally, even when the internet connection is unavailable.

Communication Security: The W5500 does not provide built-in TLS encryption. If encrypted communication and device authentication are required, additional security mechanisms must be implemented.

6. FAQ

Q1. Why is the WIZnet W5500 used in the OnMilk system?

The W5500 integrates a hardware TCP/IP stack, reducing the network processing workload on the STM32F4. This allows the MCU to focus on sensor data acquisition and equipment status management while maintaining communication with the server. However, NHTC has not publicly disclosed the specific internal evaluation criteria behind its component selection.

Q2. How is the W5500 connected to the STM32F4?

The W5500 communicates with the STM32F4 through an SPI interface. The basic signals include SCLK, MOSI, MISO, and CS, with reset and interrupt pins used depending on the hardware design. The exact GPIO assignments of the OnMilk Gateway cannot be confirmed because its circuit schematics are not publicly available.

Q3. What data does the W5500 transmit in the OnMilk system?

According to the system architecture, the W5500 provides Ethernet communication for transmitting milk cooling tank temperature, weight, operating status, and event information to the server. Data acquisition and MQTT message generation are handled by the MCU software, while the W5500 provides TCP/IP communication functionality.

Q4. Can beginners develop a W5500-based monitoring system?

Developers with a basic understanding of SPI communication and TCP/IP networking can build simple data transmission systems using WIZnet's ioLibrary. However, integrating industrial sensors, serial communication interfaces, electrical isolation circuits, and server infrastructure, as demonstrated by OnMilk, requires additional embedded system development experience.

Q5. Can the W5500 store data during network outages without additional hardware?

No. The W5500's 32 KB internal memory is used for network transmit and receive buffers, not long-term data storage. Preserving measurement data during connection failures requires additional storage and recovery logic. Although NHTC's specifications identify an SD card slot, it has not been confirmed whether this feature is used for offline data storage in the actual system.

image source : https://nhtc.com.vn/products/onmilk.html#products

 

Comments

Similar projects you might like

Comments