Wiznet makers

Grace_Koo

Published July 22, 2026 ©

114 UCC

25 WCC

11 VAR

0 Contests

0 Followers

0 Following

Original Link

stm32_artnet_dmx

An Art-Net → DMX512 lighting gateway on STM32F411 + W5500, driving the W5500's hardware UDP socket directly and optimized for low latency with SPI/TIM DMA.

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

How a Bare-Metal STM32 Art-Net Gateway Uses the WIZnet W5500 Hardware UDP Socket for Low-Latency DMX512 Output


Overview

Stage and performance lighting needs a gateway that converts the Art-Net commands a console sends over Ethernet into the DMX512 signal that fixtures receive directly. This project is an Art-Net → DMX512 gateway built on an STM32F411 (Black Pill) microcontroller.

Its defining trait is bare-metal optimization. Instead of relying on an off-the-shelf network library, it controls the chip at the register level with a hand-written W5500 driver. Here the WIZnet W5500 is the Ethernet gateway that receives Art-Net (UDP) data, and this project uses the W5500's hardware UDP socket directly — that is, it handles UDP through the chip's built-in hardware socket, with no software TCP/IP stack.

(Confirmed facts: the source sets the W5500 socket to UDP mode and drives it via SPI DMA. A custom KiCad PCB and schematic are included in the repository.)


Key Features

  • Direct use of the W5500 hardware UDP socket: It sets the socket mode register (Sn_MR) to UDP and receives Art-Net packets through the W5500's built-in hardware socket. There's no need to run a software TCP/IP stack (like lwIP) on the STM32, saving MCU resources and latency — the very benefit of using a hardware TCP/IP chip.
  • Low-latency reception with SPI DMA + interrupts: SPI communication with the W5500 is handled by DMA and completion callbacks. The CPU doesn't stall waiting on data transfer, so lighting commands are received and processed with low latency. Since delay is an immediately visible failure in lighting, this matters.
  • Precise DMX512 generation (TIM + DMA): It generates DMX512's exacting timing (Break, MAB, slots) with a timer and DMA, emitting an accurate waveform without CPU intervention — more stable than software bit-banging.
  • Auto-discovered as a standard Art-Net node: It replies to ArtPoll with ArtPollReply, so a lighting console finds the device automatically on the network. The device returns a reply packet to the discovery packet the W5500 received.
  • A complete hardware + UI package: It includes a custom KiCad PCB, OLED (SSD1306) status display, TM1637 4-digit display, RS485 DMX output, and CLI configuration. It's finished as a real gateway, not a breadboard experiment.

System Architecture

The W5500's role in the data path: The W5500 is the entrance linking the lighting console to the gateway. It receives Art-Net UDP packets through a hardware socket and hands them to the STM32. Notably, this project uses the W5500's hardware UDP socket directly, letting the STM32 focus solely on parsing lighting data and generating DMX, free of any network-stack burden.


Role and Application of the WIZnet Chip

  • Chip used: WIZnet W5500 (a W5500_Lite module in the schematic)
  • Connection: Wired to the STM32F411 via SPI + DMA, controlled with dedicated CS/RST GPIOs.
  • Its role: Wired-Ethernet reception of Art-Net (UDP 6454) data, and replies to ArtPoll (auto-discovery).
  • Uses hardware TCP/IP (UDP socket) directly:
    • This project sets the W5500 socket mode register to UDP and exchanges UDP through the W5500's built-in hardware socket. (It uses neither MACRAW mode nor an external software TCP/IP stack.)
    • In other words, it uses the W5500's hardwired network-processing capability for its intended purpose.
  • Why wired Ethernet + hardware socket:
    • Latency/reliability: Lighting control makes delay or dropouts an instant failure. Wired + hardware socket + DMA secures low-latency, deterministic reception.
    • MCU resource savings: Since the W5500 handles TCP/IP in hardware, the STM32F411's limited resources go to real-time work like DMX generation.
  • What weakens without the W5500: The STM32 would need a software Ethernet stack (lwIP) plus a separate MAC/PHY. That eats into MCU resources and increases latency and complexity — a heavy burden on a small F411 in particular.

Related Existing Contents

Compared here with cases whose content we verified directly on WIZnet Makers / GitHub.

M5AtomPoeArtnet2DMX

(same-lineage Art-Net↔DMX bridge) A tiny bridge that converts Art-Net and DMX512 bidirectionally with an M5Stack Atom (ESP32) + W5500 PoE base.

  • Similarities: The purpose of "receiving Art-Net over W5500 wired and converting to DMX512" is identical, as is implementing ArtPoll auto-discovery.
  • Differences: M5Atom uses the W5500 via ESP32 + the Arduino Ethernet_Generic socket library, with strengths in PoE, bidirectionality, and a web UI. This project does low-level control of the hardware UDP socket with a hand-written driver on STM32, with weight on performance optimization like SPI DMA and TIM-based DMX generation. The same goal, solved as "high-level convenience" vs "low-level optimization."

2040-ArtNode: RP2040 + W5500 ArtNet LED Controller Board (Benjamin)

A custom PCB that receives Art-Net with RP2040 + W5500 to drive WS2812 pixel LEDs.

  • Similarities: A lighting node that receives Art-Net over W5500 wired, and it too designed a custom PCB.
  • Differences: 2040-ArtNode's output is digital pixel LEDs (WS2812). This project's output is standard DMX512 (RS485), and it drives the W5500 hardware socket directly on an STM32.

In short, lighting nodes that "receive Art-Net over W5500 wired" are common on Makers. What sets this project apart is directly controlling the W5500's hardware UDP socket in a bare-metal STM32 environment, and optimizing the whole path from reception to DMX output for low latency with SPI DMA and TIM DMA.


Market & Application Value

  • Performance/stage lighting (B2C/B2B): A gateway connecting a console's Art-Net to standard DMX512 fixtures. Suited to small venues, clubs, and events.
  • Architectural/exhibition lighting: Centrally control DMX fixtures scattered over Ethernet from a console.
  • DMX-based equipment in general: A network gateway for any equipment that takes DMX512 — movers, dimmers, fog machines, etc.
  • A reference for embedded lighting-product development: The STM32 + W5500 hardware-socket combination is a starting point for low-cost, low-latency lighting nodes.
  • System-integration angle: Following the Art-Net and DMX512 standards, it slots directly into existing lighting workflows. Thanks to low-level optimization, it delivers stable performance even on a small MCU.

Why it's advantageous in real operation: a lighting gateway is asked for low latency/stability and low cost at once. The W5500 hardware-socket + small STM32 combination satisfies both without a software stack.


WIZnet Strategic Value

  • A case that shows the essence of hardware TCP/IP: Unlike many lighting projects that go through a socket library, this one uses the W5500's hardware UDP socket directly at the register level. It squarely leverages the core strength of WIZnet chips — offloading the network without burdening the MCU.
  • A small-MCU + W5500 reference: A practical example of attaching Ethernet to a low-cost, small MCU like the STM32F411 with no software stack. A reference for low-cost embedded network design.
  • A published low-level driver: The hand-written W5500 driver (including SPI DMA) is open-source, a useful reference for developers who want to use the W5500 optimally in custom firmware.
  • Addressing the lighting/entertainment market: As a case handling the Art-Net and DMX512 standards, it broadens WIZnet's applicability in the stage and architectural lighting markets.
  • Reference-design potential: The "W5500 hardware-socket reception → MCU parsing → real-time signal output via TIM/DMA" pipeline is a pattern portable to other real-time control equipment.

FAQ

Q. How are Art-Net and DMX512 different? DMX512 is the serial control signal (RS485/XLR) that fixtures receive directly, while Art-Net is the protocol that carries that DMX data over Ethernet (UDP). A console sends commands onto the network as Art-Net; fixtures only understand DMX512. This gateway translates between the two.

Q. What role does the W5500 play? The W5500 is the wired-Ethernet gateway through which Art-Net (UDP 6454) data arrives. Connected to the STM32 over SPI, it receives packets and, by responding to ArtPoll, also acts as an Art-Net node auto-discovered on the network.

Q. What does "using the hardware socket directly" mean, unlike other lighting projects? Many projects use the W5500 through an Arduino/CircuitPython socket library. This project skips such a library — it sets the W5500 socket to UDP mode directly and handles UDP through the chip's built-in hardware socket. That removes the need for a software TCP/IP stack on the MCU, saving latency and resources.

Q. Why wired Ethernet? Is WiFi not possible? In lighting control, delay or dropouts lead to immediately visible failures. Wired Ethernet gives a deterministic connection free of the interference and congestion risks of wireless, which is why the lighting industry traditionally prefers it. This project is designed around wired (W5500).

Q. Why does it work well even on a small MCU like the STM32? The W5500 handles networking (TCP/IP) in hardware, and DMX waveform generation is handled by a timer + DMA. The CPU only needs to parse data, so even a small, low-cost MCU like the STM32F411 delivers low-latency performance.


Limitations / Notes

  • The chip used is the W5500 (a W5500_Lite module in the schematic). It's the gateway's wired-Ethernet entrance.
  • Hardware TCP/IP usage: The source was confirmed to set the W5500 socket to UDP mode and receive via a hardware socket. Unlike some earlier lighting projects (via socket library / MACRAW), this is judged to be a case that uses the hardware UDP socket directly.
  • What the W5500 does not do: DMX512 waveform generation (TIM/DMA), RS485 output, and OLED/TM1637 display are not the W5500's roles. The W5500 is limited to receiving Art-Net UDP.
  • Completeness: The README itself is brief and photo-centric, but the firmware source, KiCad PCB, and schematic are in the repository, so it's judged to be a working gateway. That said, documentation is sparse relative to the code.
  • sACN support: The repository includes sACN (E1.31) documentation, but whether the firmware currently handles sACN is seen as Art-Net-centric in the code; an actual sACN implementation is unconfirmed.
  • This article introduces an open-source project; it describes a self-made, published system, not a commercial product.

Source / Reference Links

Related Projects on WIZnet Makers

Documents
Comments Write