Контроллер Lavritech L2 Gate D2
Lavritech L2 Gate D2: An ESP32 + W5500 Gateway That Links RS-485 Devices to Ethernet, Wi-Fi, and LoRa
0
Project description
Summary
The Lavritech L2 Gate D2 is a 2DIN-wide universal communication gateway from the Russian company Lavritech. It collects data from field Modbus RTU (RS-485) devices and sensors, then forwards it upstream over MQTT, HTTP, and Modbus TCP. Wired Ethernet comes from a WIZnet W5500 connected to the ESP32 over SPI. Its defining trait is that you build the gateway through a web UI and a firmware builder alone, without writing code.
Overview
Much field equipment, such as building services, meters, inverters, and temperature sensors, still talks Modbus RTU over RS-485. To bring that data into a dispatch system or the cloud, you need a device that turns the serial bus into an IP network. The L2 Gate D2 is a finished gateway built for that job. Its product page sits under the "For Integrators" (интеграторам) menu, so it appears to target system integrators first [Inferred].
There are three uplinks: wired Ethernet (W5500), Wi-Fi 802.11 b/g/n, and an optional LoRa (SX1276) radio. The unit ships with Lavritech firmware preinstalled. Users configure it in a web interface by picking device templates and delivery targets. The listed retail price starts at 8,600 rubles.
→ Product page: https://lavritech.com/integratoram/kontrollery-lavritech/kontroller-lavritech-l2-gate-d2
Hardware
Here is a summary of the specification table and connector notes from the official wiki.
| Item | Details |
|---|---|
| MCU | ESP32 (exact variant not stated) |
| Wired Ethernet | W5500, RJ45 10/100BASE-T |
| Wireless | Wi-Fi 802.11 b/g/n (AP/Client), LoRa SX1276 (option) |
| Field bus | RS-485 ISO (galvanically isolated), up to 32 devices |
| Sensor bus | 1-Wire (DS18B20, etc.), I²C |
| Expansion | 1 × WB slot, Wiren Board compatible |
| Debug | USB Type-C (on-board USB-UART CH340G) |
| Other | RTC + CR1220 backup battery, Safe Mode button, 2 user LEDs |
| Power | 9–24 V DC, ≤ 2.5 W consumption |
| Size / form | 55 × 100 × 32 mm, 2DIN form factor |
| Operating range | −40 … +80 °C, 0 … 95 % RH |
The RS-485 terminal also carries a sensor power output (+V). Small Modbus sensors can draw power from the gateway on the same cable run.
→ Official wiki: https://wiki.lavritech.com/controllers/l2-d2/
Architecture
- Acquisition layer: Polls Modbus devices over RS-485 and reads 1-Wire, I²C, and LoRa sensors alongside them
- Processing layer: Lavritech OS (FreeRTOS-based) on the ESP32 handles device templates (Modbus FS), scripts (Lavritech Interpreter), and the measurement archive
- Transport layer: Sends MQTT, HTTP, and Modbus TCP over Ethernet or Wi-Fi. The documentation lists Modbus TCP as supported on both "Ethernet, WiFi"
Technology Background
RS-485 and Modbus RTU
RS-485 is a differential physical layer that signals through the voltage difference between two wires (A/B). It resists noise and lets many devices share one bus, so it has become a de facto standard for field wiring. On top of it, Modbus RTU is a polling protocol: the master calls each slave address in turn, asks for register values, and gets a reply.
In the L2 Gate D2, the gateway acts as master and polls up to 32 devices (a Slave mode, where SCADA polls the gateway, is also supported). The galvanically isolated (ISO) RS-485 port matters here. On long runs, such as between switchboards, ground potential often differs from device to device. That leads to communication errors or damaged ports. An isolated port separates this potential difference from the gateway's circuitry.
→ Modbus specifications: https://www.modbus.org/modbus-specifications
MQTT
MQTT is a lightweight messaging protocol. Devices publish values to a broker by topic, and interested parties subscribe to receive them. It runs over TCP/IP, and the broker relays each message to its subscribers.
The L2 Gate D2 can publish to the Lavritech Cloud and also to external brokers such as Mosquitto and EMQX. According to the wiki, it accepts mqtt://, ws://, mqtts://, and wss:// addresses, so TLS-encrypted connections are an option. The documentation also notes that the controller must be restarted after MQTT is enabled or configured.
→ MQTT settings: https://wiki.lavritech.com/soft/lavritech/firmware/services/mqtt/
LoRa (SX1276)
LoRa is a wireless physical layer that uses chirp spread spectrum modulation to send data over long distances on little power. LoRaWAN is a network protocol layered on top, with its own gateway and network server architecture. The names are similar, but they sit at different layers.
The L2 Gate D2 can carry an SX1276 transceiver as an option to receive LoRa sensors directly. The product page states that LoRaWAN is supported through a separate Lavritech gateway, the L-Gate WAN. You can gather sensors from hard-to-wire areas over LoRa and send the data upstream over wire from the gateway.
→ SX1276 product page: https://www.semtech.com/products/wireless-rf/lora-connect/sx1276
Technical Highlights
- No-code setup: Configure the factory firmware in the web UI, and rebuild it with the options you need in the firmware builder (soft.lavritech.com)
- Device templates (Modbus FS): Register maps for supported sensors and meters come as templates, so you add devices without typing register addresses one by one
- Built-in scripting: Lavritech Interpreter runs automation logic inside the gateway, driven by sensor values, external commands, or time conditions
- Local retention: An RTC + measurement archive keeps timestamped records
- OTA updates: Firmware updates arrive remotely over Wi-Fi
- Industrial ratings: −40 … +80 °C, 9–24 V wide input, and a 2DIN width that fits in a switchboard
→ Firmware setup guide: http://wiki.lavritech.com/soft/lavritech/firmware/setup/
Where WIZnet Fits — Wired Ethernet over Six SPI Lines
How It Connects
The official wiki names the Ethernet interface as "W5500" and publishes its connection to the ESP32.
| Signal | ESP32 pin |
|---|---|
| MOSI | GPIO2 |
| MISO | GPIO15 |
| SCLK | GPIO0 |
| CS | GPIO4 |
| INT | GPIO14 |
| RST | GPIO13 |
Four SPI lines plus interrupt and reset, six pins in all, bring up one wired Ethernet port. The W5500 integrates the MAC and PHY in one chip, so only an RJ45 connector and magnetics sit outside it.
How Data Moves
- The ESP32 polls Modbus devices over RS-485 (GPIO25/26) and receives register values
- Lavritech OS decodes the values against templates and runs script and archive processing
- (When sending over Ethernet) The ESP32 passes the outgoing data to the W5500 over SPI (CS = GPIO4). Whether that data is an MQTT payload (TOE) or a complete Ethernet frame (MACRAW) depends on the firmware and cannot be confirmed from public sources
- The W5500 sends it onto the LAN through RJ45 (10/100)
- When a broker command or Modbus TCP request arrives, the ESP32 reads it from the W5500 over SPI. The W5500's INT line goes to GPIO14, but whether reception is interrupt-driven or polled has not been published [Inferred]
Think of the W5500 as a "wired-only post office counter" next to the ESP32. The ESP32 hands its content to the counter, and the counter handles sending and receiving on the cable side. Whether the counter only delivers envelopes (frame TX/RX) or also confirms receipt and resends (TCP handling) depends on the mode the firmware uses, as explained below.
TOE or Not — Unconfirmed from Public Sources
The W5500 can be used in two ways.
| Mode | What the chip does | What the MCU does |
|---|---|---|
| Hardware TCP/IP (TOE) | Handles TCP connections, retransmission, and ARP; 8 hardware sockets | Exchanges payloads only |
| MACRAW | Uses socket 0 alone as MAC + PHY, sending and receiving only Ethernet frames | A software stack on the MCU (lwIP, etc.) handles TCP/IP |
Lavritech's public documentation does not say which mode the L2 Gate D2 firmware uses. The firmware runs under license activation, its source is not public, and the Ethernet option page is marked "under development." This article therefore treats only "the W5500 provides wired Ethernet over SPI" as confirmed. Whether the chip handles TCP is unconfirmed.
Without the W5500
The ESP32 has a built-in Ethernet MAC, but it needs an external RMII PHY (e.g., LAN8720) to use it. RMII takes roughly nine pins, covering the TX/RX data lines, a 50 MHz reference clock, and the MDC/MDIO management pair. This product must also fit RS-485, LoRa (SPI), 1-Wire, I²C, and the WB slot UART in a 2DIN case, so pin headroom was likely a constraint. The W5500, which delivers MAC+PHY over six SPI pins, fits that constraint. Note that the manufacturer has not stated this reason; it is [Inferred] from the pin layout.
→ ESP-IDF Ethernet documentation: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_eth.html
Similar Projects on WIZnet Makers
- ZenoLAN0505 — A Vietnamese ESP32 + W5500 DIN-rail Modbus RTU⇄TCP gateway. It is the closest match to the L2 Gate D2 in purpose and build. ZenoLAN0505 also has isolated RS-485, a web UI, and MQTT; the L2 Gate D2 differs by offering a LoRa option and its own cloud
→ Project link: https://maker.wiznet.io/scott/resellers/ip-ethernet-wifi-zenolan0505/ - SURIOTA SRT-MGATE 1210 — A Modbus RTU/TCP IIoT gateway built on ESP32-S3 + W5500, with two isolated RS-485 ports and MQTT/HTTP cloud delivery. It is configured over BLE, unlike the L2 Gate D2's web UI
→ Project link: https://maker.wiznet.io/scott/resellers/suriota-module--modbus-gateway-iiot-srt-mgate-1210/ - Lavritech V7.1 Lite — An ESP32 controller board from the same company that connects ESP32 + W5500 on the same SPI pins (MISO 15, MOSI 2, SCK 0, CS 4). Given the identical pinout, it appears to share hardware design with the L2 Gate D2 [Inferred]
→ Project link: https://maker.wiznet.io/mayuri/projects/lavritech-v7-1-lite:-programming-esp32-and-wirenboard-modules/
All three use a W5500 attached over SPI to an ESP32-family MCU, with RS-485 either built in (ZenoLAN0505, SRT-MGATE 1210) or added as an expansion module (V7.1 Lite). Across countries and manufacturers, this combination keeps being chosen for Modbus gateways.
| Item | L2 Gate D2 | ZenoLAN0505 | SRT-MGATE 1210 | V7.1 Lite |
|---|---|---|---|---|
| MCU | ESP32 | ESP32 | ESP32-S3 | ESP32 |
| Wired Ethernet | W5500 (SPI) | W5500 | W5500 (SPI) | W5500 (SPI) |
| Wireless | Wi-Fi, LoRa (option) | Wi-Fi | Wi-Fi, BLE 5.0 | LoRa |
| Field bus | RS-485 ISO | RS-485 (isolated) | RS-485 ISO ×2 | WB slot (I²C, UART), RS-485 via expansion module |
| Configuration | Web UI + firmware builder | Web UI | BLE | Arduino sketch |
| Form | 2DIN finished unit | DIN rail | Unknown | Board |
The difference lies in the software. The more similar the hardware backbone, the more software sets products apart. The L2 Gate D2 fills that role with its firmware builder, Modbus FS device templates, and its own cloud.
Use Cases
- Building meter collection — Chain Modbus meters such as electricity and heat meters on RS-485, and publish their values to a management server over MQTT. The unit fits a switchboard at 2DIN width and can take a static IP over wired Ethernet
- Equipment temperature and status monitoring — Attach 1-Wire (DS18B20) and I²C sensors directly to log plant-room temperature and equipment status together, with no separate data logger. The RTC and archive keep timestamped records
- Sensor aggregation in hard-to-wire areas — Receive distant sensors over LoRa while the gateway connects upstream over wired Ethernet. This keeps wireless segments short and the backbone wired
- Self-hosted servers — Publish straight to an on-premises Mosquitto or EMQX broker instead of the Lavritech Cloud. This suits sites where data must stay in-house
Because the ESP32 + W5500 + RS-485 combination is used by several manufacturers, as the similar projects show, there are plenty of reference circuits and pinouts to draw on when designing comparable equipment.
Limitations and Future Improvements
The L2 Gate D2 is a mature, configuration-driven gateway, but its public documentation leaves room for improvement.
- Inconsistent documentation — Both specification tables on the wiki are titled "L-Gate Micro", and the product page body mixes in other model names such as "L-Gate Micro D2" and "L-Gate Micro D1". The product page's interface list omits Ethernet. The wiki's connector table labels LED 10 as the LoRa indicator, while the unit itself reads "RS TX". The wiki's storage temperature (−40 … +40 °C) is narrower than the operating range. Separate per-model specification tables would make evaluation easier
- Missing network behavior details — The documentation does not cover priority or automatic failover when Wi-Fi and Ethernet are both active, concurrent connection limits, or how Ethernet TCP/IP is handled. Communication paths are central to a gateway, so publishing these would help design decisions
- Closed firmware — The firmware source is not public, so changing behavior depends on builder options and Lavritech Interpreter scripts [Inferred]
- Certification details — The product page lists no certification or ingress protection (IP) rating. The site's certificate page holds only a 2015 Customs Union (EAC) declaration of conformity covering Lavritech controllers in general; CE or other certifications for the L2 Gate D2 model are not listed separately
FAQ
Q. Can it run on Ethernet only?
A. The wiki states that you can turn off the Wi-Fi subsystem in the firmware settings and use wired Ethernet only. IP addressing can be DHCP or static.
Q. If Wi-Fi and Ethernet are both active, which path is used?
A. Public documentation does not describe priority or automatic failover. If you need redundancy, confirm with the manufacturer before deployment.
Q. How many Modbus devices can I connect?
A. Per the specification table, up to 32 devices on one RS-485 port. Supported devices are listed in the Modbus FS template catalog.
Q. How is it powered?
A. Feed 9–24 V DC into the bottom terminal; consumption is 2.5 W or less. The +V pin on the RS-485 terminal can supply power to sensors.
Q. Can I modify the firmware myself?
A. The factory firmware runs under license activation, and its source is not public. To change behavior, use firmware builder options and Lavritech Interpreter scripts. The product page states that the Lavritech Cloud is free for PRO firmware users.
→ Modbus FS device catalog: https://wiki.lavritech.com/soft/lavritech/firmware/options/modbus-fs/mbfs-catalog/
요약
Lavritech L2 Gate D2 는 러시아 Lavritech 가 만든 2DIN 폭의 범용 통신 게이트웨이입니다. 현장의 Modbus RTU(RS-485) 장비와 센서 데이터를 모아 MQTT·HTTP·Modbus TCP 로 상위 시스템에 넘깁니다. 유선 Ethernet 은 WIZnet W5500 을 ESP32 에 SPI 로 연결해 구현했습니다. 코드를 짜지 않고 웹 UI 와 펌웨어 빌더 설정만으로 게이트웨이를 구성한다는 점이 이 제품의 특징입니다.
개요
건물 설비, 계량기, 인버터, 온도 센서처럼 현장 장비의 상당수는 여전히 RS-485 위의 Modbus RTU 로 통신합니다. 이 데이터를 디스패처 시스템이나 클라우드에 올리려면 시리얼 버스를 IP 네트워크로 바꿔 주는 장치가 필요합니다. L2 Gate D2 는 이 역할을 맡는 완제품 게이트웨이이며, 제품 페이지가 '통합업자용(интеграторам)' 메뉴 아래에 있어 시스템 통합업자를 주 고객으로 보는 것으로 보입니다 [추정].
업링크는 세 가지입니다. 유선 Ethernet(W5500), Wi-Fi 802.11 b/g/n, 그리고 옵션인 LoRa(SX1276) 입니다. 출고 시 Lavritech 펌웨어가 설치되어 있고, 사용자는 웹 인터페이스에서 장치 템플릿과 전송 대상을 고르는 방식으로 설정합니다. 소매가는 8,600 루블부터로 표기되어 있습니다.
→ 제품 페이지: https://lavritech.com/integratoram/kontrollery-lavritech/kontroller-lavritech-l2-gate-d2
하드웨어 구성
공식 위키의 사양표와 커넥터 설명을 정리하면 다음과 같습니다.
| 항목 | 내용 |
|---|---|
| MCU | ESP32 (세부 변형 미표기) |
| 유선 Ethernet | W5500, RJ45 10/100BASE-T |
| 무선 | Wi-Fi 802.11 b/g/n (AP/Client), LoRa SX1276 (옵션) |
| 필드 버스 | RS-485 ISO (갈바닉 절연), 최대 32대 |
| 센서 버스 | 1-Wire(DS18B20 등), I²C |
| 확장 | Wiren Board 호환 WB 슬롯 1개 |
| 디버그 | USB Type-C (내장 USB-UART CH340G) |
| 기타 | RTC + CR1220 백업 배터리, Safe Mode 버튼, 사용자 LED 2개 |
| 전원 | 9–24 V DC, 소비전력 ≤ 2.5 W |
| 크기·형태 | 55 × 100 × 32 mm, 2DIN 폼팩터 |
| 동작 환경 | −40 … +80 °C, 0 … 95 % RH |
RS-485 단자에는 센서용 전원 출력(+V) 이 함께 나와 있어, 소형 Modbus 센서는 게이트웨이에서 전원을 받아 배선할 수 있습니다.
→ 공식 위키: https://wiki.lavritech.com/controllers/l2-d2/
아키텍처
- 수집 계층: RS-485 로 Modbus 장비를 폴링하고, 1-Wire·I²C 센서와 LoRa 센서 값을 함께 읽습니다
- 처리 계층: ESP32 위의 Lavritech OS(FreeRTOS 기반)가 장치 템플릿(Modbus FS), 스크립트(Lavritech Interpreter), 측정 아카이브를 다룹니다
- 전송 계층: MQTT·HTTP·Modbus TCP 를 Ethernet 또는 Wi-Fi 로 내보냅니다. Modbus TCP 는 문서에 "Ethernet, WiFi" 양쪽 지원으로 적혀 있습니다
기술 배경
RS-485 와 Modbus RTU
RS-485 는 두 선(A/B)의 전압 차로 신호를 보내는 차동 방식 물리 계층입니다. 잡음에 강하고 한 버스에 여러 장치를 묶을 수 있어 현장 배선의 표준처럼 쓰입니다. 그 위에서 Modbus RTU 는 마스터가 슬레이브 주소를 차례로 불러 레지스터 값을 묻고 답을 받는 폴링 방식 프로토콜입니다.
L2 Gate D2 에서는 게이트웨이가 마스터가 되어 최대 32대의 장비를 폴링합니다(반대로 SCADA 가 게이트웨이를 폴링하는 Slave 모드도 지원합니다). RS-485 포트가 갈바닉 절연(ISO) 되어 있다는 점이 중요합니다. 배전반 사이처럼 긴 배선에서는 장비마다 접지 전위가 달라 통신 오류나 포트 손상이 생기기 쉬운데, 절연 포트는 이 전위차를 게이트웨이 회로와 분리합니다.
→ Modbus 규격 목록: https://www.modbus.org/modbus-specifications
MQTT
MQTT 는 장치가 브로커에 토픽 단위로 값을 발행(publish)하고, 필요한 쪽이 구독(subscribe)해 받는 경량 메시징 프로토콜입니다. TCP/IP 위에서 동작하며, 메시지는 브로커가 구독자에게 중계합니다.
L2 Gate D2 는 Lavritech Cloud 뿐 아니라 Mosquitto·EMQX 같은 외부 브로커로도 보낼 수 있습니다. 위키에 따르면 mqtt://, ws://, mqtts://, wss:// 주소 형식을 지원해 TLS 암호화 연결도 고를 수 있습니다. MQTT 를 켜거나 설정한 뒤에는 컨트롤러를 재시작해야 동작한다는 점도 문서에 적혀 있습니다.
→ MQTT 설정 문서: https://wiki.lavritech.com/soft/lavritech/firmware/services/mqtt/
LoRa (SX1276)
LoRa 는 처프 확산 스펙트럼 변조를 써서 적은 전력으로 먼 거리를 보내는 무선 물리 계층입니다. LoRaWAN 은 그 위에 얹는 네트워크 프로토콜로, 게이트웨이·네트워크 서버 구조를 따로 갖습니다. 둘은 이름이 비슷하지만 다른 층위입니다.
L2 Gate D2 는 SX1276 트랜시버를 옵션으로 탑재해 LoRa 센서를 직접 받습니다. LoRaWAN 은 Lavritech 의 별도 게이트웨이(L-Gate WAN)를 거쳐 지원한다고 제품 페이지에 적혀 있습니다. 배선이 어려운 곳의 센서를 LoRa 로 모으고, 게이트웨이에서 유선으로 올리는 구성이 가능합니다.
→ SX1276 제품 페이지: https://www.semtech.com/products/wireless-rf/lora-connect/sx1276
기술 특징
- 코드 없는 구성: 출고 펌웨어를 웹 UI 로 설정하고, 필요한 기능은 펌웨어 빌더(soft.lavritech.com)에서 옵션으로 골라 다시 빌드합니다
- 장치 템플릿(Modbus FS): 지원 센서·계량기의 레지스터 맵을 템플릿으로 제공해, 레지스터 주소를 일일이 입력하지 않고 장치를 등록합니다
- 내장 스크립트: Lavritech Interpreter 로 센서 값·외부 명령·시간 조건에 따른 자동화 로직을 게이트웨이 안에서 실행합니다
- 로컬 보존: RTC + 측정 아카이브로 시각이 붙은 기록을 남깁니다
- OTA 업데이트: 펌웨어를 Wi-Fi 로 원격 갱신합니다
- 산업 환경 사양: −40 … +80 °C, 9–24 V 광역 입력, 2DIN 폭으로 배전반에 들어갑니다
→ 펌웨어 설정 문서: http://wiki.lavritech.com/soft/lavritech/firmware/setup/
W5500 이 맡는 자리 — 6가닥 SPI 로 얻는 유선 Ethernet
연결 구조
공식 위키는 Ethernet 인터페이스를 "W5500" 으로 명시하고, ESP32 와의 연결 핀을 다음과 같이 공개합니다.
| 신호 | ESP32 핀 |
|---|---|
| MOSI | GPIO2 |
| MISO | GPIO15 |
| SCLK | GPIO0 |
| CS | GPIO4 |
| INT | GPIO14 |
| RST | GPIO13 |
SPI 4가닥 + 인터럽트 + 리셋, 모두 6개 핀으로 유선 Ethernet 하나가 붙습니다. W5500 은 MAC 과 PHY 를 한 칩에 담고 있어, 바깥에는 RJ45 커넥터와 자기 결합부만 있으면 됩니다.
데이터가 지나가는 순서
- ESP32 가 RS-485(GPIO25/26)로 Modbus 장비를 폴링해 레지스터 값을 받습니다
- Lavritech OS 가 값을 템플릿에 맞춰 해석하고, 스크립트·아카이브 처리를 합니다
- (Ethernet 으로 내보낼 때) 보낼 데이터를 SPI(CS = GPIO4) 로 W5500 에 넘깁니다. 넘기는 것이 MQTT 페이로드인지(TOE) 완성된 Ethernet 프레임인지(MACRAW)는 펌웨어에 달려 있으며, 공개 자료로는 확인할 수 없습니다
- W5500 이 RJ45(10/100) 로 LAN 에 내보냅니다
- 브로커의 명령이나 Modbus TCP 요청이 들어오면 ESP32 가 SPI 로 W5500 에서 읽어 갑니다. W5500 의 INT 선은 GPIO14 에 연결되어 있지만, 수신을 인터럽트로 처리하는지 폴링으로 처리하는지는 공개되지 않았습니다 [추정]
비유하자면 W5500 은 ESP32 옆에 붙은 "유선 전용 우편 창구"입니다. ESP32 는 보낼 내용을 창구에 건네고, 창구가 케이블 쪽 송수신을 맡습니다. 창구가 봉투 배달만 할지(프레임 송수신), 수신 확인과 재발송까지 맡을지(TCP 처리)는 아래 설명처럼 펌웨어가 칩을 어떤 모드로 쓰느냐에 달려 있습니다.
TOE 사용 여부 — 공개 자료로는 확인 불가
W5500 은 두 가지 방식으로 쓸 수 있습니다.
| 모드 | 칩이 하는 일 | MCU 가 하는 일 |
|---|---|---|
| 하드웨어 TCP/IP (TOE) | TCP 연결·재전송·ARP 까지 칩이 처리, 하드웨어 소켓 8개 | 페이로드만 주고받음 |
| MACRAW | 소켓 0 하나를 MAC + PHY 로 써서 Ethernet 프레임만 송수신 | MCU 의 소프트웨어 스택(lwIP 등)이 TCP/IP 처리 |
Lavritech 의 공개 문서는 L2 Gate D2 의 펌웨어가 어느 쪽을 쓰는지 밝히지 않습니다. 펌웨어는 라이선스를 활성화해 쓰는 방식이고 소스가 공개되어 있지 않으며, Ethernet 옵션 문서는 "작성 중" 상태입니다. 따라서 이 글은 "W5500 이 SPI 로 유선 Ethernet 을 제공한다"까지만 확인된 사실로 다룹니다. TCP 처리를 칩이 맡는지는 확인 불가입니다.
만약 W5500 이 없었다면
ESP32 에는 Ethernet MAC 이 내장되어 있지만, 쓰려면 RMII 방식의 외부 PHY(예: LAN8720)를 붙여야 합니다. RMII 는 송수신 데이터선과 50 MHz 기준 클록, 관리용 MDC/MDIO 까지 9개 안팎의 핀을 차지합니다. 2DIN 케이스 안에 RS-485, LoRa(SPI), 1-Wire, I²C, WB 슬롯 UART 를 함께 넣어야 하는 이 제품에서는 핀 여유가 제약이 됐을 것으로 보입니다. SPI 6개 핀으로 MAC+PHY 를 통째로 얻는 W5500 은 이 제약에 맞는 선택입니다. 다만 이 선택 이유는 제조사가 밝힌 것이 아니라 핀 구성에서 읽어 낸 [추정] 입니다.
→ ESP-IDF Ethernet 문서: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_eth.html
WIZnet Makers 유사 사례
- ZenoLAN0505 — 베트남에서 만든 ESP32 + W5500 DIN 레일 Modbus RTU⇄TCP 게이트웨이입니다. 용도와 구성이 L2 Gate D2 와 가장 가깝습니다. ZenoLAN0505 도 절연 RS-485, 웹 UI, MQTT 를 갖췄고, L2 Gate D2 는 LoRa 옵션과 자체 클라우드가 있다는 점이 다릅니다
→ 프로젝트 링크: https://maker.wiznet.io/scott/resellers/ip-ethernet-wifi-zenolan0505/ - SURIOTA SRT-MGATE 1210 — ESP32-S3 + W5500 기반 Modbus RTU/TCP IIoT 게이트웨이로, 절연 RS-485 포트 2개와 MQTT/HTTP 클라우드 전송을 지원합니다. 설정을 BLE 로 하는 점이 웹 UI 를 쓰는 L2 Gate D2 와 다릅니다
→ 프로젝트 링크: https://maker.wiznet.io/scott/resellers/suriota-module--modbus-gateway-iiot-srt-mgate-1210/ - Lavritech V7.1 Lite — 같은 회사의 ESP32 컨트롤러 보드로, ESP32 + W5500 을 같은 SPI 핀(MISO 15·MOSI 2·SCK 0·CS 4) 에 연결했습니다. 같은 핀 배치를 쓴다는 점에서 L2 Gate D2 와 하드웨어 설계를 공유하는 것으로 보입니다 [추정]
→ 프로젝트 링크: https://maker.wiznet.io/mayuri/projects/lavritech-v7-1-lite:-programming-esp32-and-wirenboard-modules/
세 사례 모두 ESP32 계열 MCU 에 SPI 로 붙인 W5500 을 쓰고, RS-485 를 기본 탑재하거나(ZenoLAN0505·SRT-MGATE 1210) 확장 모듈로 붙입니다(V7.1 Lite). 나라와 제조사가 달라도 Modbus 게이트웨이를 만들 때 이 구성이 반복해서 선택되고 있습니다.
| 항목 | L2 Gate D2 | ZenoLAN0505 | SRT-MGATE 1210 | V7.1 Lite |
|---|---|---|---|---|
| MCU | ESP32 | ESP32 | ESP32-S3 | ESP32 |
| 유선 Ethernet | W5500 (SPI) | W5500 | W5500 (SPI) | W5500 (SPI) |
| 무선 | Wi-Fi, LoRa(옵션) | Wi-Fi | Wi-Fi, BLE 5.0 | LoRa |
| 필드 버스 | RS-485 ISO | RS-485 (절연) | RS-485 ISO ×2 | WB 슬롯(I²C·UART), RS-485 는 확장 모듈 |
| 설정 방식 | 웹 UI + 펌웨어 빌더 | 웹 UI | BLE | Arduino 스케치 |
| 형태 | 2DIN 완제품 | DIN 레일 | 미상 | 보드 |
차이는 소프트웨어 쪽에서 납니다. 하드웨어 뼈대가 비슷할수록 소프트웨어가 제품을 가르는 요소가 되고, L2 Gate D2 는 펌웨어 빌더·Modbus FS 장치 템플릿·자체 클라우드로 이 부분을 채웠습니다.
어디에 쓰나
- 건물 계량 수집 — 전력량계·열량계 같은 Modbus 계량기를 RS-485 로 묶고, 값을 MQTT 로 관리 서버에 올립니다. 배전반 안에 2DIN 폭으로 들어가고 유선 Ethernet 으로 고정 IP 를 줄 수 있습니다
- 설비 온도·상태 모니터링 — 1-Wire(DS18B20)와 I²C 센서를 직접 붙여, 별도 수집 장치 없이 기계실 온도와 장비 상태를 함께 기록합니다. RTC 와 아카이브로 시각이 붙은 기록이 남습니다
- 배선이 어려운 구역의 센서 집선 — 멀리 떨어진 센서는 LoRa 로 받고, 게이트웨이는 유선 Ethernet 으로 상위에 연결합니다. 무선 구간을 짧게, 기간망은 유선으로 나누는 구성입니다
- 자체 서버 운영 — Lavritech Cloud 를 쓰지 않고 사내 Mosquitto·EMQX 브로커로 직접 보낼 수 있어, 데이터를 외부에 두지 않아야 하는 현장에도 맞습니다
ESP32 + W5500 + RS-485 조합은 위 유사 사례처럼 여러 제조사가 쓰는 구성이라, 비슷한 장비를 직접 설계할 때 참고할 회로와 핀 배치 선례가 많습니다.
한계 및 개선 방향
L2 Gate D2 는 설정 중심 게이트웨이로 완성도를 갖췄지만, 공개 문서 기준으로 보완할 부분이 있습니다.
- 문서 표기 불일치 — 위키의 사양표 두 개 제목이 "L-Gate Micro" 로 되어 있고, 제품 페이지 본문에도 "L-Gate Micro D2"·"L-Gate Micro D1" 같은 다른 모델명이 섞여 있습니다. 제품 페이지의 인터페이스 목록에는 Ethernet 이 빠져 있고, 위키 커넥터 표는 10번 LED 를 LoRa 표시등으로 적었지만 본체 라벨은 "RS TX" 입니다. 위키의 보관 온도(−40 … +40 °C)는 동작 온도보다 좁게 적혀 있습니다. 모델별 사양표를 분리하면 도입 검토가 쉬워집니다
- 네트워크 동작 정보 부족 — Wi-Fi 와 Ethernet 을 동시에 쓸 때의 우선순위나 자동 전환(failover), 동시 접속 수, Ethernet 의 TCP/IP 처리 방식이 문서에 없습니다. 게이트웨이는 통신 경로가 핵심이므로 이 항목이 공개되면 설계 판단에 도움이 됩니다
- 비공개 펌웨어 — 펌웨어 소스가 공개되어 있지 않아, 동작을 바꾸려면 빌더 옵션과 Lavritech Interpreter 스크립트에 기대야 합니다 [추정]
- 인증 정보 — 제품 페이지에는 인증·보호 등급(IP) 정보가 없습니다. 사이트 인증서 페이지에는 Lavritech 컨트롤러 전반에 대한 관세동맹(EAC) 적합 선언(2015)만 있고, L2 Gate D2 모델의 CE 등 인증은 따로 적혀 있지 않습니다
FAQ
Q. Ethernet 만으로 운용할 수 있나요?
A. 펌웨어 설정에서 Wi-Fi 서브시스템을 끄고 유선 Ethernet 만 쓰도록 할 수 있다고 위키에 적혀 있습니다. IP 는 DHCP 와 고정 IP 중에서 고릅니다.
Q. Wi-Fi 와 Ethernet 을 동시에 쓰면 어느 쪽으로 나가나요?
A. 공개 문서에는 우선순위나 자동 전환에 대한 설명이 없습니다. 이중화가 필요하다면 도입 전에 제조사에 확인해야 합니다.
Q. Modbus 장치는 몇 대까지 붙일 수 있나요?
A. 사양표 기준 RS-485 한 포트에 최대 32대입니다. 지원 장치는 Modbus FS 템플릿 목록에서 확인할 수 있습니다.
Q. 전원은 어떻게 공급하나요?
A. 9–24 V DC 를 하단 단자로 넣으며 소비전력은 2.5 W 이하입니다. RS-485 단자의 +V 로 센서에 전원을 내보낼 수 있습니다.
Q. 펌웨어를 직접 수정할 수 있나요?
A. 출고 펌웨어는 라이선스를 활성화해 쓰는 방식이며 소스는 공개되어 있지 않습니다. 동작을 바꾸려면 펌웨어 빌더의 옵션과 Lavritech Interpreter 스크립트를 사용합니다. Lavritech Cloud 는 PRO 펌웨어 사용자에게 무료로 제공된다고 제품 페이지에 적혀 있습니다.
→ Modbus FS 장치 목록: https://wiki.lavritech.com/soft/lavritech/firmware/options/modbus-fs/mbfs-catalog/
