Wiznet makers

matthew

Published January 26, 2026 ©

128 UCC

9 WCC

38 VAR

0 Contests

0 Followers

1 Following

Original Link

EtherCAT Meets Wi-Fi: An ESP32 + W5500 Dual-Network Control Demo (ESP32でEtherCAT-WiFiゲートウェイ)

ESP32 runs an EtherCAT master (SOEM) over W5500 Ethernet while using Wi-Fi UDP/IP for monitoring—demoed on DevKitC+WIZ850io and M5Stack LAN Module.

COMPONENTS
PROJECT DESCRIPTION

Thumbnail Image Source:  https://www.youtube.com/watch?v=DekmujVqQkw

Github Source: https://github.com/lipoyang/ESP32_EtherCAT_WiFi 

ESP32_EtherCAT_WiFi

An “EtherCAT + Wi-Fi gateway” demo: run an EtherCAT master (SOEM) over W5500 Ethernet while serving UDP/IP over ESP32 Wi-Fi

 

Introduction

This project demonstrates a practical pattern seen in real automation systems: keep real-time motion/control on a deterministic wired network (EtherCAT), while exposing monitoring and control UI over a more flexible IP channel (Wi-Fi).
ESP32_EtherCAT_WiFi runs an EtherCAT master (SOEM) on an ESP32 using a WIZnet W5500-based Ethernet interface, and simultaneously handles UDP/IP over ESP32 Wi-Fi. (GitHub: lipoyang/ESP32_EtherCAT_WiFi)


Quick background (one paragraph)

EtherCAT is a real-time Industrial Ethernet technology designed for low jitter and short cycle times by avoiding the conventional TCP/IP stack on the control network. SOEM (Simple Open EtherCAT Master) is a lightweight open-source EtherCAT master library often used for embedded and experimental implementations.


What this project is

From the repository structure and README:

  • ESP32 acts as an EtherCAT master using SOEM (via SOEM4Arduino).
  • EtherCAT traffic runs through W5500 Ethernet (wired control network).
  • In parallel, ESP32 runs Wi-Fi UDP/IP for operational traffic (monitoring/control).
  • A Windows-side tool (RobotArmMonitor) is included for monitoring/control use cases.
  • Source is split by intent:
    • ethercat.cpp for EtherCAT-side real-time handling and robot arm control
    • udpip.cpp for UDP/IP communication

Hardware (README + demo confirmation)

全体図

Image Source: https://github.com/lipoyang/ESP32_EtherCAT_WiFi 

This project can be built in two common ESP32 + W5500 form factors:

README reference setup: ESP32-DevKitC + WIZ850io (W5500) over SPI

  • Uses the ESP32 VSPI pins (MOSI/MISO/SCK/CS) to drive W5500 for Ethernet/EtherCAT.

Demo setup (confirmed from the shared demo image): M5Stack (Core) + LAN Module (RJ45, W5500-based)

  • The demo shows an M5Stack unit with an RJ45 LAN module connected into an EtherCAT network (yellow cables), demonstrating the same concept in an M5Stack form factor.

Key point: the essential requirement is ESP32 + W5500 Ethernet—whether it’s a DevKitC + WIZ850io or an M5Stack + LAN Module.


How it works (W5500 role & data flow)

This project cleanly separates the network roles:

1) Real-time control network: EtherCAT over W5500 (wired Ethernet)

  • ESP32 runs SOEM as the EtherCAT master.
  • EtherCAT frames are sent/received via the W5500 Ethernet port.

2) Operations/monitoring network: Wi-Fi UDP/IP (wireless)

  • In parallel, ESP32 uses Wi-Fi to exchange UDP/IP messages for monitoring, remote UI, or operator commands.

One-line flow:

  • EtherCAT (wired/W5500) = real-time motion/control
  • Wi-Fi (UDP/IP) = monitoring/control-plane communications

Author & community context

The author (lipoyang) maintains multiple SOEM-related ports and tooling (e.g., SOEM4Arduino, SOEM4Mbed, SOEM.NET), so this repo fits into a broader effort to bring SOEM/EtherCAT concepts into MCU environments.


Why it matters

  1. A concrete reference for “EtherCAT control + Wi-Fi UI” architectures
    Many real systems keep deterministic control wired, while exposing dashboards and command channels over IP. This project demonstrates that split cleanly.
  2. Lower-barrier EtherCAT experimentation
    EtherCAT is typically associated with industrial PCs and specialized setups. An ESP32 + W5500 demo makes it easier for students, labs, and makers to learn the concepts.
  3. Clear W5500 positioning
    Here, W5500 is not just “Ethernet for TCP/IP”—it is the wired Industrial Ethernet interface used for EtherCAT frame transport, while Wi-Fi handles the separate operations channel.

ESP32_EtherCAT_WiFi Project FAQ

Q. What is the ESP32_EtherCAT_WiFi project?

A. ESP32_EtherCAT_WiFi is a demonstration project that enables an ESP32 microcontroller to function simultaneously as an EtherCAT Master and a Wi-Fi Gateway. It utilizes a WIZnet W5500 Ethernet chip for deterministic, real-time control (EtherCAT) and the ESP32’s built-in Wi-Fi for UDP/IP operational traffic (monitoring and UI control).

Q. How does the architecture work?

A. The project creates a clean separation of network roles to ensure stability:

  • Real-Time Control (Wired): The W5500 Ethernet interface handles EtherCAT frames using the SOEM (Simple Open EtherCAT Master) library. This ensures low-latency control for motors or sensors.
  • Monitoring & Operations (Wireless): The ESP32's Wi-Fi handles UDP/IP communication, allowing users to monitor data or send high-level commands via a remote UI (such as the included RobotArmMonitor tool).

Q. What hardware is required to build this?

A. You need an ESP32 combined with a W5500 Ethernet interface. The project supports two common form factors:

  • Standard Setup: An ESP32-DevKitC connected to a WIZ850io (W5500) module via SPI (MOSI/MISO/SCK/CS).
  • M5Stack Setup: An M5Stack Core unit equipped with an M5Stack LAN Module (W5500-based) for an all-in-one solution.

Q. What is the specific role of the W5500 chip?

A. In this project, the W5500 is not used for standard TCP/IP internet access. Instead, it serves as the physical transport layer for EtherCAT frames. The ESP32 sends raw EtherCAT packets through the W5500 to control downstream slave devices, bypassing the standard TCP/IP stack to maintain real-time performance.

Q. Why is this project significant?

A. This project serves as an important reference for three main reasons:

  1. Network Segregation: It demonstrates a practical architecture where critical control is wired (EtherCAT) and the user interface is wireless (Wi-Fi).
  2. Low-Barrier Entry: It allows students and makers to experiment with EtherCAT Master concepts using affordable hardware (ESP32 + W5500) rather than expensive industrial PCs.
  3. Embedded Implementation: It proves that lightweight MCUs can effectively handle EtherCAT Master duties using the SOEM library.

 

Documents
Comments Write