Wiznet makers

irina

Published November 27, 2025 ©

124 UCC

5 WCC

98 VAR

0 Contests

0 Followers

0 Following

Original Link

STM32-Serial-to-Ethernet-Converter

An STM32F103 + W5500–based UART-to-TCP bridge that acts like an open-source USR-TCP232 module, enabling transparent Serial ⇄ Ethernet communication.

COMPONENTS
PROJECT DESCRIPTION

👤AUTHOR

vorun
An embedded systems developer focused on STM32, low-level peripheral programming, bare-metal drivers, and lightweight network stacks.
He builds educational microcontroller projects, custom bootloaders, and minimal network gateways using pure C and open hardware tools.

🔗 GitHub: https://github.com/vorun/STM32-Serial-to-Ethernet-Converter


🎯PROJECT DESCRIPTION

This project implements a Serial-to-Ethernet Converter that bridges RS232, RS485, and CAN communication to Ethernet TCP using:

  • STM32F103C8T6 (Blue Pill)
  • WIZnet W5500 (Hardware TCP/IP Ethernet Controller)

The device works as a transparent Serial ⇄ TCP gateway—similar to industrial devices like USR-TCP232—allowing legacy serial devices to be accessed remotely over a network.

Compared to software-based ENC28J60 designs, the W5500 drastically improves performance, reliability, and reduces MCU load by handling TCP/IP in hardware.


🧩COMPONENTS

🧠 Hardware

  • STM32F103C8T6 development board
  • RS232 (5V level, USART1)
  • RS485 (3.3V, USART2)
  • CAN (5V, CAN peripheral)
  • WIZnet W5500 Ethernet Controller (SPI1)

🧰 SYSTEM OVERVIEW

    [TCP Client: PC / Server / Application]
            ↑       ↓
      Ethernet (TCP/IP)
            ↑
    WIZnet W5500 Ethernet
            ↑  SPI
     STM32F103 MCU
            ↑  UART
      Serial Device (Sensor/MCU)

The STM32 simply reads/writes socket buffers via SPI,
while the W5500 handles TCP/IP packetization and link management.

This ensures:

  • deterministic latency
  • low CPU overhead
  • stable operation under heavy traffic

✔ KEY FEATURES

🔹  Multi-Protocol Serial Support

  • RS232 (DB-9)
  • RS485 (3.3V differential)
  • CAN (5V transceiver)
    All mapped to Ethernet TCP.

🔹  Transparent Serial Bridge

Data passes between TCP client and serial port without modification:

  • TCP → UART
  • UART → TCP

This makes it compatible with:

  • PLCs
  • sensors
  • CNC controllers
  • industrial monitors
  • legacy devices

🧪USE CASES

  • Industrial PLC Ethernet integration
  • Remote serial port server
  • SCADA / HMI communication
  • CNC machine networking
  • CAN-bus monitoring over LAN
  • Legacy equipment modernization

📌  This UCC focuses on the hardware capabilities of the design. The original project provides hardware resources only—no official firmware or ready-to-use software stack is included. Users are expected to build their own S2E firmware or integrate custom communication protocols using STM32 and the W5500.


 

 

Documents
Comments Write