Wiznet makers

josephsr

Published August 14, 2026 ©

146 UCC

13 WCC

13 VAR

0 Contests

0 Followers

0 Following

Original Link

ESP32-S3 Hybrid Aeroponic Controller with W5500, RS485 and ESP-NOW

ESP32-S3 aeroponic controller combining W5500 Ethernet, Wi-Fi, RS485 and ESP-NOW for irrigation, lighting, climate and logging.

COMPONENTS
PROJECT DESCRIPTION

Project Overview

Aeroponic is a distributed grow-tent automation system built around an ESP32-S3 N16R8 master controller. The master integrates irrigation scheduling, lighting control, climate monitoring, CO₂ control, exhaust-fan control, SD-card logging, web-based configuration and OTA updates. Wired RS485 devices and wireless ESP-NOW nodes extend sensing and actuation beyond the central controller.

The repository is organized as multiple firmware projects rather than a single monolithic application:

Firmware / ComponentMCU / InterfaceMain Role
AeroponikESP32-S3 / W5500 + Wi-FiCentral controller and web server
MultisensorESP32-C3 / RS485 or ESP-NOWCO₂, temperature, humidity, PPFD and spectrum sensing
Lichtx4ESP32 / RS485Four-channel relay/SSR lighting controller
SteckdosenESP32 / ESP-NOWGeneral-purpose wireless relay nodes
ProtoRS485ESP32-C3 / RS485Modbus RTU slave simulator
shared/espnow_commonShared libraryCommon ESP-NOW protocol implementation

Hardware and Control Structure

The master uses an ESP32-S3 with 16 MB Flash and 8 MB OPI PSRAM. Its local peripherals include a W5500 Ethernet controller, PCF8574AP GPIO expander, DS3231 RTC, MicroSD, MAX13487 RS485 transceiver, two DS18B20 temperature sensors, a 0.5–4.5 V pressure sensor, HC-SR04 ultrasonic level sensing and an AHT21B room-climate sensor.

The W5500 and MicroSD share the master SPI bus with separate chip-select lines. The documented W5500 signals include reset, interrupt, MOSI, MISO, SCK and chip select.

System Architecture

                    ┌─────────────────────────┐
                    │ Browser / Local Client  │
                    └────────────┬────────────┘
                                 │ HTTP :80
                 ┌───────────────┴────────────────┐
                 │                                │
          W5500 Ethernet                       Wi-Fi
                 │                                │
                 └───────────────┬────────────────┘
                                 │
                         esp_eth / lwIP
                                 │
                    ┌────────────▼────────────┐
                    │ ESP32-S3 Aeroponik      │
                    │ Master + WebServer      │
                    └─┬──────┬───────┬──────┘
                      │      │       │
             Local I/O│      │       │ESP-NOW
                      │      │       └──────────► Wireless relay nodes
                      │      │
                      │      └── RS485 / MAX13487
                      │             │
                      │             ├── Multisensor
                      │             ├── Lichtx4
                      │             ├── MARS Hydro fan
                      │             └── Optional 0–10 V module
                      │
                      ├── PCF8574AP → Solenoid valves
                      ├── DS3231 RTC
                      ├── DS18B20 ×2
                      ├── Pressure sensor
                      ├── HC-SR04
                      ├── AHT21B
                      └── MicroSD → CSV logging

The wired RS485 path is independent of ESP-NOW and uses a MAX13487 transceiver at 9600 baud, 8N1. The controller implements a simplified Modbus RTU state machine using FC03 for register reads and FC06 for writes, with one outstanding request at a time and a 2000 ms response timeout.

Operation Flow

The ESP32-S3 initializes local I/O and stored configuration.

The SPI bus is initialized and the firmware directly reads the W5500 VERSIONR register to verify that the Ethernet controller is physically present.

If detected, the master initializes W5500 Ethernet through ETH.begin(ETH_PHY_W5500, ...).

Wi-Fi is then started, allowing Ethernet and Wi-Fi to coexist in the same system.

The HTTP server exposes the web UI and REST-style API endpoints on port 80.

RS485 devices are polled cyclically while ESP-NOW nodes register with the master and provide wireless sensor or actuator connectivity.

Irrigation, lighting, CO₂ and fan-control logic operate from schedules and sensor data.

Measurement and control values are periodically written to MicroSD as daily CSV files.

Irrigation and Environmental Control

Three independent irrigation circuits support configurable valve-open time and pause intervals. A fourth valve can optionally provide a configurable return/pre-flush sequence. Tank level is measured with an HC-SR04 and converted from measured distance into water height and volume using configurable truncated-cone tank geometry.

Tent measurements can include CO₂, temperature, relative humidity, PPFD and eight-channel spectral information. The system also controls lighting, CO₂ relays and exhaust ventilation using a combination of schedules, hysteresis and sensor feedback.

The logging subsystem stores measurement and control values every five minutes in daily CSV files and exposes log download and deletion through the web interface.

WIZnet Product Usage

WIZnet Product: W5500 Ethernet Controller

WIZnet Product Role: SPI-based wired Ethernet interface for the ESP32-S3 master. It provides the LAN path used by the web interface and network services such as NTP synchronization. Ethernet and Wi-Fi are operated simultaneously.

The implementation includes some direct W5500 register access. Before Ethernet initialization, the firmware reads VERSIONR at 0x0039 to detect the controller. It also writes PHYCFGR to configure the PHY for 100BASE-T full duplex. These accesses are hardware detection and PHY configuration rather than application TCP/UDP socket handling.

Network Software Path

Application
   │
   ├── Arduino WebServer / Network APIs
   │
   ▼
lwIP TCP/IP stack
   │
esp_netif / esp_eth
   │
Espressif W5500 MAC driver
   │
W5500 MACRAW mode
   │
SPI
   │
W5500 Ethernet MAC/PHY

The source includes Arduino ETH.h and initializes Ethernet through ETH.begin(ETH_PHY_W5500, ...), while the project documentation explicitly states that W5500 Ethernet and Wi-Fi operate simultaneously through lwIP.

Espressif's official W5500 Ethernet driver documentation states that the W5500's internal hardwired TCP/IP stack is not used by the ESP driver. The driver configures the device as an Ethernet MAC using MACRAW mode and passes Ethernet frames to the ESP networking stack.

TOE Usage

TOE: No, for application network traffic.

Although the W5500 itself contains a hardwired TCP/IP engine, this project does not use W5500 hardware socket registers for application TCP/UDP communication. Application networking is handled through the ESP32 networking framework and lwIP, with the W5500 operating as the SPI Ethernet MAC/PHY interface in MACRAW mode.

Direct W5500 register transactions in the project are limited to device detection and PHY configuration and therefore do not constitute W5500 TCP/IP offload usage.

Hybrid Network

Hybrid Network: Yes.

This is a clear wired/wireless hybrid implementation rather than separate Ethernet and Wi-Fi examples. The master runs W5500 Ethernet and Wi-Fi concurrently, and the same web server is reachable through both network interfaces. The system additionally combines RS485 wired field devices with ESP-NOW wireless sensor/actuator nodes.

                 ┌── W5500 Ethernet ── LAN
ESP32-S3 Master ─┤
                 ├── Wi-Fi ─────────── WLAN / AP
                 ├── ESP-NOW ───────── Wireless nodes
                 └── RS485 ─────────── Wired field devices

Strengths

Concrete multi-network architecture: Ethernet, Wi-Fi, ESP-NOW and RS485 are integrated into one operational system rather than provided as isolated examples.

Detailed hardware integration: pin assignments, Modbus registers, protocols and device roles are documented at implementation level.

Practical W5500 handling: the firmware detects the W5500 before initialization and explicitly manages PHY configuration.

Distributed control model: wired sensors, lighting and fan devices coexist with automatically registering ESP-NOW relay nodes.

Operational features: web configuration, OTA, fallback Wi-Fi AP, SD logging, NTP/RTC synchronization and live node state tracking are integrated into the master.

Non-blocking runtime work is present in several paths: for example, ultrasonic echo timing is interrupt-driven instead of using a long pulseIn() call, allowing the web server and communication loops to continue running.

Limitations

The W5500's hardwired TCP/IP socket engine is not used; TCP/IP processing remains in the ESP32/lwIP networking stack. This reduces the value of the project as a W5500 TOE reference, although it remains a valid W5500 Ethernet integration example.

The system spans several separate firmwares, multiple physical buses and numerous external peripherals, resulting in greater integration and deployment complexity than a single-controller grow system. This is an architectural assessment based on the documented multi-project structure.

The master uses the synchronous Arduino WebServer and services it from the main control loop together with RS485, ESP-NOW and control tasks rather than using an asynchronous HTTP server architecture.

Initial Wi-Fi association can perform repeated one-second connection attempts during startup before the fallback-AP path is selected. Runtime control paths are subsequently structured around periodic loop processing.

The documented web interface operates on HTTP port 80; transport-level HTTPS is not part of the documented network architecture.

Application Value

The repository provides a substantial reference for smart-farm edge controllers, especially where a central MCU must combine local sensors, deterministic wired field devices and flexible wireless nodes.

Its strongest reusable patterns are:

simultaneous Ethernet and Wi-Fi operation on ESP32-S3,

W5500 integration through Espressif's Ethernet framework,

RS485/Modbus RTU device aggregation,

ESP-NOW sensor and actuator expansion,

browser-based local control and configuration,

local time-series CSV logging,

irrigation and grow-environment control logic.

The project is particularly useful as a Hybrid Network smart-agriculture reference, while it should not be classified as a W5500 hardware-TOE application because the W5500 socket offload engine is bypassed by the ESP-IDF Ethernet driver architecture.

Author Information

The repository is maintained under the GitHub account JoergSH. The inspected GitHub profile does not expose an additional personal name. The repository was initially committed on July 18, 2026, with the current commit history showing updates through July 31, 2026. The repository is distributed under the GNU GPL v3 license.


W5500·RS485·ESP-NOW 기반 ESP32-S3 하이브리드 에어로포닉 제어 시스템


프로젝트 개요

Aeroponic은 ESP32-S3 N16R8을 중앙 Master로 사용하는 분산형 에어로포닉 재배 자동화 시스템이다. 관수, 조명, CO₂, 온습도, 배기 팬, 데이터 로깅을 하나의 Master에서 관리하며, RS485 기반 유선 장치와 ESP-NOW 기반 무선 노드를 함께 연결한다.

저장소는 단일 Firmware가 아니라 역할별 Firmware가 결합되는 Multi-Root 구조이다.

구성MCU / 통신역할
AeroponikESP32-S3 / W5500 + Wi-Fi중앙 Master, Web UI, Scheduler
MultisensorESP32-C3 / RS485 또는 ESP-NOWCO₂·온도·습도·PPFD·Spectrum 측정
Lichtx4ESP32 / RS4854채널 조명 Relay/SSR 제어
SteckdosenESP32 / ESP-NOW범용 무선 Relay Node
ProtoRS485ESP32-C3 / RS485Modbus RTU Slave Simulator
shared/espnow_common공통 LibraryESP-NOW 공용 Protocol

주요 Hardware 구성

Master는 ESP32-S3, 16 MB Flash, 8 MB OPI PSRAM 구성이며 다음 장치를 직접 연결한다.

WIZnet W5500 Ethernet Controller

PCF8574AP GPIO Expander

DS3231 RTC

MicroSD

MAX13487 RS485 Transceiver

DS18B20 Temperature Sensor ×2

0.5–4.5 V Analog Pressure Sensor

HC-SR04 Ultrasonic Level Sensor

AHT21B Room Climate Sensor

W5500과 MicroSD는 Master의 SPI Bus를 공유하며 각각 별도의 Chip Select를 사용한다. W5500에는 SPI 데이터 신호 외에도 Reset과 Interrupt GPIO가 할당되어 있다.

시스템 구조

                    ┌─────────────────────┐
                    │ Browser / Local UI  │
                    └──────────┬──────────┘
                               │ HTTP :80
               ┌───────────────┴───────────────┐
               │                               │
        W5500 Ethernet                       Wi-Fi
               │                               │
               └───────────────┬───────────────┘
                               │
                         esp_eth / lwIP
                               │
                  ┌────────────▼────────────┐
                  │ ESP32-S3 Master         │
                  │ Web + Control Engine    │
                  └─┬────────┬────────┬─────┘
                    │        │        │
              Local I/O    RS485    ESP-NOW
                    │        │        │
                    │        │        └── 무선 Relay Node
                    │        │
                    │        ├── Multisensor
                    │        ├── Lichtx4
                    │        ├── MARS Hydro Fan
                    │        └── 0–10 V Analog Module
                    │
                    ├── PCF8574AP → Solenoid Valve
                    ├── DS3231 RTC
                    ├── DS18B20 ×2
                    ├── Pressure Sensor
                    ├── HC-SR04
                    ├── AHT21B
                    └── MicroSD → CSV

RS485는 ESP-NOW와 독립된 유선 통신 경로로 구성된다. MAX13487을 이용한 9600 baud, 8N1 Bus이며, FC03 Read Holding Registers와 FC06 Write Single Register를 사용하는 간소화된 Modbus RTU 상태 머신으로 각 장치를 순차적으로 Polling한다. 응답 Timeout은 2000 ms이다.

동작 흐름

ESP32-S3가 Local I/O와 저장된 설정을 초기화한다.

SPI Bus 초기화 후 W5500 VERSIONR을 직접 읽어 W5500의 실제 장착 여부를 검사한다.

W5500이 검출되면 ETH.begin(ETH_PHY_W5500, ...)으로 Ethernet을 초기화한다.

이후 Wi-Fi를 시작하여 Ethernet과 Wi-Fi를 동시에 운영한다.

Port 80의 WebServer가 Web UI와 각종 제어 API를 제공한다.

Master는 RS485 장치를 주기적으로 Polling하고 ESP-NOW Node의 등록과 상태를 관리한다.

측정값과 Scheduler를 기반으로 관수, 조명, CO₂ 및 배기 팬을 제어한다.

센서와 제어 상태를 MicroSD의 날짜별 CSV 파일에 저장한다.

관수 및 환경 제어

관수부는 세 개의 독립 Valve Circuit으로 구성되며 각각 Valve Open Time과 Pause Interval을 설정할 수 있다. 네 번째 Valve는 필요에 따라 Return Pre-flush 용도로 사용할 수 있다.

Tank의 수위는 HC-SR04로 측정하고, 단순 거리값이 아니라 설정된 상단·하단 반경과 높이를 이용해 원뿔대형 Tank의 실제 물 높이와 Volume으로 환산한다.

재배 환경 측정 항목은 CO₂, 온도, 습도, PPFD 및 8채널 Spectrum까지 확장되어 있으며, 이 값을 기반으로 조명 Scheduler, CO₂ Hysteresis Control 및 배기 팬 자동제어를 수행한다.

측정값과 제어 상태는 기본적으로 5분 간격으로 날짜별 CSV 파일에 기록되며 Web UI에서 다운로드와 삭제가 가능하다.

WIZnet 제품 사용 여부

사용 제품: WIZnet W5500 Ethernet Controller

WIZnet Product Role: ESP32-S3 Master의 SPI 기반 유선 Ethernet Interface이다. Web UI 접근과 NTP 등의 LAN 통신 경로를 제공하며 Wi-Fi와 동시에 운영된다.

W5500을 단순 Library 호출만으로 사용하는 것은 아니다. Firmware는 Ethernet 초기화 전에 W5500의 VERSIONR을 직접 읽어 장치 존재 여부를 확인하며, PHYCFGR Register를 직접 설정해 PHY Mode를 조정한다.

다만 이 직접 Register Access는 W5500 TCP/UDP Socket을 제어하기 위한 것이 아니라 장치 탐지와 PHY 설정 목적이다.

실제 Network Stack 경로

Web UI / Application
        │
Arduino WebServer
        │
       lwIP
        │
esp_netif / esp_eth
        │
Espressif W5500 MAC Driver
        │
 W5500 MACRAW Mode
        │
       SPI
        │
W5500 Ethernet MAC/PHY

소스에서는 Arduino ETH.h를 포함하고 ETH.begin(ETH_PHY_W5500, ...)을 호출하며, 저장소 문서도 W5500 Ethernet과 Wi-Fi가 동일한 lwIP Stack 위에서 병행 운영된다고 명시한다.

Espressif의 공식 W5500 Driver 역시 W5500에 내장된 Hardwired TCP/IP Stack을 ESP Driver에서는 사용하지 않는다고 명시하며, W5500을 MACRAW Ethernet MAC 장치로 구성한다.

TOE 사용 여부

TOE 사용 여부: 아니오

W5500 자체는 Hardwired TCP/IP Engine을 갖지만, 이 프로젝트의 Application TCP/IP 통신은 W5500 Hardware Socket을 사용하지 않는다.

W5500 Socket Register 직접 TCP/UDP 제어
→ 사용하지 않음

Arduino Ethernet Library 기반 W5500 Hardware Socket
→ 사용하지 않음

ESP32 ETH.h
→ esp_eth
→ MACRAW W5500
→ lwIP
→ 사용

따라서 W5500은 실제 제품에 포함되어 있지만 W5500의 TCP/IP Offload Engine을 활용하는 TOE 프로젝트로 분류하기는 어렵다.

소스에서 확인되는 W5500 직접 SPI Register Access는 Version 확인과 PHY 설정에 국한되며 Hardware Socket 기반 Application 통신과는 구분된다.

Hybrid Network 여부

Hybrid Network: 해당

이 프로젝트는 Ethernet 예제와 Wi-Fi 예제가 단순히 같은 저장소에 존재하는 형태가 아니다.

Master에서 W5500 Ethernet과 Wi-Fi를 실제로 동시에 실행하고 있으며 동일 Web Interface가 두 Network Interface의 IP를 통해 접근 가능하다. 따라서 유선과 무선이 동일 시스템에서 함께 동작한다는 Hybrid Network 기준을 명확하게 충족한다.

여기에 내부 Device Network도 두 계층으로 나뉜다.

ESP32-S3 Master
 │
 ├─ W5500 Ethernet ─ LAN
 ├─ Wi-Fi ───────── WLAN / Fallback AP
 ├─ ESP-NOW ─────── Wireless Sensor/Actuator Nodes
 └─ RS485 ───────── Wired Field Devices

즉, 외부 Network뿐 아니라 Sensor·Actuator 계층에서도 RS485 유선 + ESP-NOW 무선 구조가 함께 사용된다.

장점

Hybrid Network 구현이 명확하다. W5500 Ethernet과 Wi-Fi가 실제 하나의 Master에서 동시에 동작한다.

W5500 적용이 구체적이다. 자동 Device Detection과 PHY Register 설정까지 구현되어 있다.

단순 센서 예제가 아닌 완성도 높은 분산 제어 구조를 갖는다. RS485와 ESP-NOW Node가 실제 제어 시스템의 일부로 결합되어 있다.

Hardware와 Protocol 문서의 밀도가 높다. GPIO, Sensor, Modbus Register, Packet 구조, Polling 조건 등이 저장소 문서에 정리되어 있다.

실제 운영에 필요한 기능 범위가 넓다. Web 설정, OTA, Wi-Fi Fallback AP, NTP/RTC, SD Logging, Node 상태 관리 등을 포함한다.

초음파 측정 등 일부 Runtime 처리는 Interrupt와 State 기반으로 변경하여 WebServer, RS485, ESP-NOW Loop의 장시간 Blocking을 줄이도록 구현되어 있다.

한계

W5500 TOE를 활용하지 않는다. W5500을 Ethernet Interface로 사용하지만 TCP/IP 처리는 ESP32의 lwIP가 담당한다. W5500 Hardware Socket 활용 사례라는 측면에서는 가치가 제한된다.

여러 Firmware, RS485, ESP-NOW, Ethernet, Wi-Fi 및 다수의 Sensor/Actuator가 결합되어 있어 단일 Board 기반 프로젝트보다 구축과 유지보수 복잡도가 높다. 이는 저장소의 Multi-Project 구조에 근거한 구조적 평가이다.

HTTP 부분은 Arduino의 동기식 WebServerserver.handleClient()를 Main Loop에서 처리하며 RS485, ESP-NOW 및 제어 Loop와 함께 실행한다.

Wi-Fi 초기 연결 단계에는 최대 여러 차례의 1초 단위 연결 대기가 존재하며, 연결되지 않으면 Fallback AP 경로로 전환된다.

Web Interface는 문서와 코드 기준 Port 80 HTTP로 동작한다.

적용 가치

Aeroponic은 단순한 W5500 연결 예제보다 스마트팜 Edge Controller의 전체 구조를 참고할 수 있는 System-Level 프로젝트에 가깝다.

특히 다음 구조의 Reference 가치가 높다.

ESP32-S3에서 Ethernet + Wi-Fi 동시 운용

Espressif esp_eth 기반 W5500 적용

RS485/Modbus 기반 Field Device 집약

ESP-NOW 기반 무선 Sensor·Actuator 확장

Local Web UI 기반 설정 및 모니터링

MicroSD 기반 장기 Data Logging

관수·조명·CO₂·Fan을 결합한 폐쇄형 재배 환경 제어

WIZnet 관점에서는 TOE 사례보다는 Hybrid Network와 W5500 MACRAW Integration 사례의 성격이 강하다. 특히 W5500 Ethernet, Wi-Fi, ESP-NOW, RS485가 실제 하나의 응용 시스템 안에서 역할을 분담한다는 점이 핵심적인 기술적 특징이다.

저자 정보

저장소의 주요 작성자는 GitHub 계정 JoergSH이다. 확인한 GitHub Profile에는 별도의 실명이 공개되어 있지 않다. 저장소 Commit History는 2026년 7월 18일 초기 등록부터 2026년 7월 31일 업데이트까지 확인되며, License는 GNU GPL v3이다.

Documents
  • Aeroponic

Comments Write