---
title: "EtherCAT #4 Master – STM32 + W5500 with SOEM RAW Communication"
url: "https://maker.wiznet.io/sophia/projects/ethercat-4-master--stm32-w5500-with-soem-raw-communication/"
markdown_url: "https://maker.wiznet.io/sophia/projects/ethercat-4-master--stm32-w5500-with-soem-raw-communication/md"
type: "UCC: User Created Content"
author: "EMInfo Tech"
author_url: "https://www.youtube.com/watch?v=ZJ4zXWIg4OU"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "EMInfo Tech"
original_url: "https://www.youtube.com/watch?v=ZJ4zXWIg4OU"
published: "2025-08-22"
language: "en"
hardware: ["WIZnet W5500"]
likes: 0
views: 3025
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# EtherCAT #4 Master – STM32 + W5500 with SOEM RAW Communication

> Build an EtherCAT Master with STM32F407 and WIZnet W5500 using the SOEM library. Achieve real-time raw packet communication for industrial automation.

Original author: EMInfo Tech (source: https://www.youtube.com/watch?v=ZJ4zXWIg4OU)

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Article

## 📌 Project Overview

This project demonstrates how to build an **EtherCAT Master** using an **STM32F407VET6 microcontroller** and the **WIZnet W5500 Ethernet controller**. By integrating the **SOEM (Simple Open EtherCAT Master) library**, the system communicates directly with EtherCAT slaves using **raw Ethernet packet transmission**, enabling **real-time industrial networking**.

## 🔧 Key Components

- **MCU**: STM32F407VET6

- **Ethernet Chip**: WIZnet W5500

- **Library**: SOEM (Simple Open EtherCAT Master)

- **Communication**: Raw Ethernet frame transmission to EtherCAT slaves

## ⚙️ Implementation Details

### 1. Hardware Setup

- STM32F407VET6 MCU connected to W5500 via SPI

- W5500 module linked to EtherCAT slave devices through Ethernet

### 2. SOEM Library Integration

- The **SOEM library** provides EtherCAT Master functionality on STM32

- Handles discovery and communication with EtherCAT slaves

### 3. Raw Packet Transmission

- Instead of TCP/IP stack, **raw Ethernet frames** are sent directly

- Enables low-latency and deterministic EtherCAT communication

## 🌍 Applications & Benefits

- **Industrial Automation**: Real-time machine and PLC control with EtherCAT

- **High Performance**: Low-latency packet handling via W5500 hardware offload

- **Open Source & Flexible**: Based on SOEM, highly customizable for robotics and embedded control systems

- **Cost-Effective**: Combines affordable STM32 + WIZnet hardware with free open-source EtherCAT stack

## 📂 References & Resources

- **SOEM (Simple Open EtherCAT Master Library)**: [GitHub](https://github.com/OpenEtherCATsociety/SOEM)

- **SOEM4Arduino**: [GitHub](https://github.com/lipoyang/SOEM4Arduino)

- **AB&T**: [Website](https://www.bausano.net/en/)

- **Simple Robot**: [Website](https://www.simplerobot.net/)

## 📑 Project Summary Table

| Category | Details |
| --- | --- |
| **Project** | EtherCAT #4 Master – SOEM RAW |
| **MCU** | STM32F407VET6 |
| **Ethernet** | WIZnet W5500 |
| **Library** | SOEM (Simple Open EtherCAT Master) |
| **Feature** | Raw packet-based EtherCAT Master |
| **Use Cases** | Industrial automation, robotics, real-time embedded networking |

This project shows how **WIZnet W5500** can be integrated with **STM32** to implement a **raw EtherCAT Master** using the **SOEM library**. By sharing such examples, more makers and engineers can explore how to bring **real-time industrial Ethernet** into their embedded projects.

🚀 Try building your own EtherCAT Master with **WIZnet W5500** and join the growing maker community pushing the limits of IoT and automation!

---

Source: https://maker.wiznet.io/sophia/projects/ethercat-4-master--stm32-w5500-with-soem-raw-communication/
