Wiznet makers

mark

Published June 27, 2026 ©

117 UCC

8 WCC

43 VAR

0 Contests

0 Followers

0 Following

Original Link

How to Build MicroPython Ethernet Nodes with WIZnet W5500 on Maker MCU Boards?

This maker project architecture uses WIZnet W5500 to add wired Ethernet to MicroPython MCU boards such as ESP32-class platforms.

COMPONENTS
PROJECT DESCRIPTION

How to Build MicroPython Ethernet Nodes with WIZnet W5500 on Maker MCU Boards?

Summary

This maker project architecture uses WIZnet W5500 to add wired Ethernet to MicroPython MCU boards such as ESP32-class platforms. The original CSDN Wenku answer page could not be directly fetched during verification, so no project-specific code from that exact page is quoted. Verified related sources show the practical pattern: the MCU runs MicroPython application logic, W5500 connects over SPI, and W5500 provides the Ethernet MAC/PHY, hardwired TCP/IP stack, socket engine, and internal packet buffering needed for TCP, UDP, HTTP, telemetry, and local device configuration.

What the Project Does

The project target is a maker-grade MicroPython Ethernet node. A board such as an ESP32 runs the Python application, handles sensor or actuator logic, formats messages, and calls socket-style APIs. W5500 handles the wired Ethernet side: link state, MAC/PHY operation, TCP/UDP socket behavior, and packet buffering.

The typical data path is:

MicroPython application → W5500 driver/socket layer → SPI → W5500 → RJ45 Ethernet → router, PC, local server, gateway, or test laptop.

A verified public ESP32-W5500 MicroPython repository demonstrates this pattern by connecting an ESP32 to a W5500 module and using Python-style requests as an HTTP client. The repository lists ESP32 ESP-WROOM-32, W5500 or W5100 hardware, MicroPython firmware, ampy upload workflow, W5500 driver files, and an HTTP fetch example.

For maker projects, this architecture is useful when Wi-Fi behavior is too variable for bench testing or local installation. Wired Ethernet gives a visible link state, a repeatable physical path, and simpler local debugging. It also keeps the network transport boundary out of user-level MicroPython code.

Where WIZnet Fits

The exact WIZnet product is W5500. It sits between the MicroPython MCU and the Ethernet connector. The MCU talks to W5500 through SPI, chip select, reset, and optionally interrupt. W5500 then exposes a socket-oriented Ethernet model to firmware.

WIZnet documents W5500 as a hardwired TCP/IP Internet controller connected to an external MCU through SPI up to 80 MHz. It integrates a 10/100 Ethernet MAC and PHY, supports TCP, UDP, ICMP, IPv4, ARP, IGMP, and PPPoE, provides 8 independent sockets, and includes 32 KB internal memory for Tx/Rx buffers.

This matters on MicroPython boards because Python code should not be responsible for implementing low-level TCP/IP behavior. The application should focus on sensor readings, relay control, local web pages, command packets, configuration storage, and diagnostics. W5500 absorbs the lower network stack and gives the application bounded socket resources.

Implementation Notes

The exact Wenku page did not expose verified source files or a public repository. The snippets below are from a related public ESP32-W5500 MicroPython repository and should be treated as a verified reference pattern, not as code proven to come from the exact Wenku page. The repository is MIT licensed.

File: main.py
What it configures: W5500 driver import, SPI bus, chip-select pin, reset pin, W5500 network object, and request-layer binding.
Why it matters: this is the application boundary where MicroPython routes HTTP traffic through W5500 instead of a wireless interface.

 
from wiznet5k import WIZNET5K
from machine import Pin, SPI
import wiznet5k_socket as socket
import sma_esp32_w5500_requests as requests

spi = SPI(2)
cs = Pin(5, Pin.OUT)
rst = Pin(34)
nic = WIZNET5K(spi, cs, rst)

requests.set_socket(socket, nic)
 

The same repository prints chip version, MAC address, local IP address, DNS lookup results, and HTTP response text, confirming that W5500 is the active Ethernet path for the MicroPython application.

File: wiznet5k.py
What it configures: W5500 common registers, socket registers, socket commands, socket status values, and IP/MAC configuration access.
Why it matters: maker firmware needs register-level observability during bring-up. Chip version, PHY status, socket state, RX size, TX free size, IP address, gateway, and subnet are the first things to inspect when Ethernet appears to fail.

 
REG_GAR = const(0x0001)
REG_SUBR = const(0x0005)
REG_VERSIONR_W5500 = const(0x0039)
REG_SHAR = const(0x0009)
REG_SIPR = const(0x000F)
REG_PHYCFGR = const(0x002E)

REG_SNMR = const(0x0000)
REG_SNCR = const(0x0001)
REG_SNSR = const(0x0003)
REG_SNTX_FSR = const(0x0020)
REG_SNRX_RSR = const(0x0026)
 

The driver also initializes SPI at a conservative speed, toggles reset when a reset pin is provided, detects W5500 through the version register, supports DHCP, exposes link status through REG_PHYCFGR, and reads or writes IP configuration through W5500 registers.

Practical Tips / Pitfalls

  • Validate SPI access before testing HTTP, MQTT, or a local web page.
  • Use stable 3.3 V power and a common ground; Ethernet link activity can expose weak power wiring.
  • Keep SCLK, MOSI, MISO, and chip-select wiring short on jumper-wire prototypes.
  • Route reset to an MCU GPIO so firmware can recover W5500 without rebooting the whole board.
  • Treat W5500’s 8 sockets as a limited resource; reserve sockets for telemetry, configuration, discovery, diagnostics, and future expansion.
  • Log chip version, MAC address, IP address, link state, socket state, DNS result, and last error.

FAQ

Q: Why use WIZnet W5500 for a MicroPython maker node?
A: W5500 gives the board wired Ethernet with hardwired TCP/IP, 8 sockets, and 32 KB internal Tx/Rx memory. That lets MicroPython code work at the socket and payload level while W5500 handles Ethernet MAC/PHY operation, TCP/UDP behavior, socket state, and buffering.

Q: How does W5500 connect to the platform?
A: W5500 connects through SPI using SCLK, MOSI, MISO, chip select, reset, 3.3 V, and ground. The referenced ESP32 repository maps GPIO5 to CS, GPIO18 to SCK, GPIO23 to MOSI, GPIO19 to MISO, and GPIO34 to reset.

Q: What role does W5500 play in this project?
A: W5500 is the wired Ethernet transport engine. The MicroPython MCU builds application messages and calls the socket layer; W5500 manages the physical Ethernet link, hardwired TCP/IP processing, socket state transitions, and RX/TX buffers.

Q: Can beginners follow this project?
A: Yes, if they bring it up in stages. The practical order is power check, SPI wiring check, W5500 reset check, chip-version read, IP configuration, DNS or ping-style test where available, one UDP or HTTP test, and then the final maker application.

Q: What changes if the maker node uses Wi-Fi instead of W5500 Ethernet?
A: Wi-Fi removes the cable and is better for mobile or battery-powered projects. W5500 adds wiring and SPI driver work, but it gives a repeatable wired link, explicit reset control, visible PHY state, and socket behavior that is easier to debug on a bench or in a fixed installation.

Source

Original source: CSDN Wenku answer page provided by the user. The page could not be directly fetched during verification, so its license and project-specific implementation details could not be confirmed.

Related implementation reference: Ayyoubzadeh/ESP32-Wiznet-W5500-Micropython, an MIT-licensed ESP32 + W5500 MicroPython HTTP client example with driver files and wiring notes.

WIZnet product reference: W5500 documentation and feature list.

MicroPython reference: WIZNET5K documentation for WIZnet5x00 Ethernet modules.

Related hardware reference: CSDN ESP32 + W5500 hardware design article covering SPI pin mapping, reset, interrupt, RJ45 transformer, and layout constraints.

Tags

#W5500 #WIZnet #MicroPython #Maker #ESP32 #Ethernet #SPI #HardwareWiring #Registers #Firmware #NetworkStack #Socket #HTTPClient #EmbeddedNetworking

 

Maker MCU 보드에서 WIZnet W5500으로 MicroPython Ethernet 노드를 구축하는 방법은?

요약

이 maker project 아키텍처는 ESP32급 플랫폼 같은 MicroPython MCU 보드에 WIZnet W5500을 사용해 유선 Ethernet을 추가합니다. 원본 CSDN Wenku answer page는 검증 중 직접 가져올 수 없었기 때문에, 해당 페이지의 프로젝트별 코드는 인용하지 않습니다. 검증된 관련 자료는 실용적인 패턴을 보여줍니다. MCU는 MicroPython 애플리케이션 로직을 실행하고, W5500은 SPI로 연결되며, W5500은 TCP, UDP, HTTP, telemetry, local device configuration에 필요한 Ethernet MAC/PHY, hardwired TCP/IP stack, socket engine, internal packet buffering을 제공합니다.

프로젝트가 하는 일

대상 프로젝트는 maker-grade MicroPython Ethernet node입니다. ESP32 같은 보드는 Python 애플리케이션을 실행하고, sensor 또는 actuator logic을 처리하며, message를 formatting하고 socket-style API를 호출합니다. W5500은 유선 Ethernet 측을 담당합니다. 여기에는 link state, MAC/PHY operation, TCP/UDP socket behavior, packet buffering이 포함됩니다.

일반적인 데이터 흐름은 다음과 같습니다.

MicroPython application → W5500 driver/socket layer → SPI → W5500 → RJ45 Ethernet → router, PC, local server, gateway 또는 test laptop

검증된 공개 ESP32-W5500 MicroPython repository는 ESP32를 W5500 module에 연결하고 Python-style requests를 HTTP client로 사용하는 패턴을 보여줍니다. 이 repository는 ESP32 ESP-WROOM-32, W5500 또는 W5100 hardware, MicroPython firmware, ampy upload workflow, W5500 driver file, HTTP fetch example을 포함합니다.

Maker project에서 이 아키텍처는 bench testing 또는 local installation 중 Wi-Fi 동작이 너무 가변적일 때 유용합니다. 유선 Ethernet은 눈으로 확인 가능한 link state, 반복 가능한 physical path, 더 단순한 local debugging을 제공합니다. 또한 network transport boundary를 user-level MicroPython code 밖으로 분리합니다.

WIZnet이 들어가는 위치

이 프로젝트에서 사용되는 정확한 WIZnet 제품은 W5500입니다. W5500은 MicroPython MCU와 Ethernet connector 사이에 위치합니다. MCU는 SPI, chip select, reset, 선택적으로 interrupt를 통해 W5500과 통신합니다. W5500은 firmware에 socket-oriented Ethernet model을 제공합니다.

WIZnet 문서 기준으로 W5500은 외부 MCU와 최대 80 MHz SPI로 연결되는 hardwired TCP/IP Internet controller입니다. 10/100 Ethernet MAC and PHY를 통합하고, TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE를 지원하며, 8개 independent socket과 Tx/Rx buffer용 32 KB internal memory를 포함합니다.

MicroPython 보드에서 이 구조가 중요한 이유는 Python code가 low-level TCP/IP behavior를 구현하지 않아도 되기 때문입니다. 애플리케이션은 sensor reading, relay control, local web page, command packet, configuration storage, diagnostics에 집중해야 합니다. W5500은 하위 network stack을 흡수하고 애플리케이션에 제한된 socket resource를 제공합니다.

구현 참고 사항

정확한 Wenku page는 검증 가능한 source file이나 public repository를 노출하지 않았습니다. 아래 snippet은 관련 공개 ESP32-W5500 MicroPython repository에서 가져온 것이며, 정확한 Wenku page의 코드로 입증된 것은 아닙니다. 해당 repository는 MIT licensed입니다.

파일: main.py
설정 내용: W5500 driver import, SPI bus, chip-select pin, reset pin, W5500 network object, request-layer binding
중요한 이유: MicroPython이 wireless interface가 아니라 W5500을 통해 HTTP traffic을 라우팅하는 애플리케이션 경계입니다.

 
from wiznet5k import WIZNET5K
from machine import Pin, SPI
import wiznet5k_socket as socket
import sma_esp32_w5500_requests as requests

spi = SPI(2)
cs = Pin(5, Pin.OUT)
rst = Pin(34)
nic = WIZNET5K(spi, cs, rst)

requests.set_socket(socket, nic)
 

같은 repository는 chip version, MAC address, local IP address, DNS lookup result, HTTP response text를 출력합니다. 이를 통해 W5500이 MicroPython 애플리케이션의 실제 Ethernet path로 사용된다는 점을 확인할 수 있습니다.

파일: wiznet5k.py
설정 내용: W5500 common register, socket register, socket command, socket status value, IP/MAC configuration access
중요한 이유: Maker firmware는 bring-up 중 register-level observability가 필요합니다. Ethernet이 실패한 것처럼 보일 때 가장 먼저 확인해야 할 항목은 chip version, PHY status, socket state, RX size, TX free size, IP address, gateway, subnet입니다.

 
REG_GAR = const(0x0001)
REG_SUBR = const(0x0005)
REG_VERSIONR_W5500 = const(0x0039)
REG_SHAR = const(0x0009)
REG_SIPR = const(0x000F)
REG_PHYCFGR = const(0x002E)

REG_SNMR = const(0x0000)
REG_SNCR = const(0x0001)
REG_SNSR = const(0x0003)
REG_SNTX_FSR = const(0x0020)
REG_SNRX_RSR = const(0x0026)
 

이 driver는 보수적인 속도로 SPI를 초기화하고, reset pin이 제공되면 reset을 toggle하며, version register를 통해 W5500을 감지합니다. 또한 DHCP를 지원하고, REG_PHYCFGR를 통해 link status를 노출하며, W5500 register를 통해 IP configuration을 읽거나 씁니다.

실무 팁 / 주의점

  • HTTP, MQTT, local web page를 테스트하기 전에 SPI access를 먼저 검증해야 합니다.
  • 안정적인 3.3 V 전원과 common ground를 사용해야 합니다. Ethernet link activity는 약한 전원 배선을 드러낼 수 있습니다.
  • Jumper-wire prototype에서는 SCLK, MOSI, MISO, chip-select 배선을 짧게 유지해야 합니다.
  • Reset을 MCU GPIO에 연결하면 전체 보드를 reboot하지 않고 W5500을 복구할 수 있습니다.
  • W5500의 8개 socket은 제한된 자원으로 다뤄야 합니다. Telemetry, configuration, discovery, diagnostics, future expansion용 socket을 예약해야 합니다.
  • Chip version, MAC address, IP address, link state, socket state, DNS result, last error를 기록해야 합니다.

FAQ

Q: MicroPython maker node에 왜 WIZnet W5500을 사용하나요?
A: W5500은 hardwired TCP/IP, 8개 socket, 32 KB internal Tx/Rx memory를 갖춘 유선 Ethernet을 보드에 제공합니다. 따라서 MicroPython code는 socket 및 payload 수준에서 동작하고, W5500은 Ethernet MAC/PHY operation, TCP/UDP behavior, socket state, buffering을 처리합니다.

Q: W5500은 플랫폼에 어떻게 연결되나요?
A: W5500은 SCLK, MOSI, MISO, chip select, reset, 3.3 V, ground를 사용하는 SPI로 연결됩니다. 참조 ESP32 repository는 GPIO5를 CS, GPIO18을 SCK, GPIO23을 MOSI, GPIO19를 MISO, GPIO34를 reset으로 매핑합니다.

Q: 이 프로젝트에서 W5500은 어떤 역할을 하나요?
A: W5500은 유선 Ethernet transport engine입니다. MicroPython MCU는 application message를 만들고 socket layer를 호출합니다. W5500은 physical Ethernet link, hardwired TCP/IP processing, socket state transition, RX/TX buffer를 관리합니다.

Q: 초보자도 이 프로젝트를 따라갈 수 있나요?
A: 가능합니다. 단계적으로 bring-up해야 합니다. 실용적인 순서는 power check, SPI wiring check, W5500 reset check, chip-version read, IP configuration, 가능한 경우 DNS 또는 ping-style test, one UDP 또는 HTTP test, 그다음 최종 maker application 구현입니다.

Q: Maker node가 W5500 Ethernet 대신 Wi-Fi를 사용하면 무엇이 달라지나요?
A: Wi-Fi는 cable을 제거할 수 있어 mobile 또는 battery-powered project에 더 적합합니다. W5500은 wiring과 SPI driver 작업이 추가되지만, 반복 가능한 유선 link, 명시적인 reset control, 확인 가능한 PHY state, bench 또는 fixed installation에서 더 쉽게 debug할 수 있는 socket behavior를 제공합니다.

출처

Original source: 사용자가 제공한 CSDN Wenku answer page. 검증 중 해당 페이지를 직접 가져올 수 없었으므로, 라이선스와 프로젝트별 구현 세부 정보는 확인할 수 없었습니다.
https://wenku.csdn.net/answer/292yb9soc8

Related implementation reference: Ayyoubzadeh/ESP32-Wiznet-W5500-Micropython, driver file과 wiring note를 포함한 MIT-licensed ESP32 + W5500 MicroPython HTTP client example.
https://github.com/Ayyoubzadeh/ESP32-Wiznet-W5500-Micropython

WIZnet product reference: W5500 documentation and feature list.
https://docs.wiznet.io/Product/Chip/Ethernet/W5500

MicroPython reference: WIZNET5K documentation for WIZnet5x00 Ethernet modules.
https://docs.micropython.org/en/latest/library/network.WIZNET5K.html

Related hardware reference: CSDN ESP32 + W5500 hardware design article covering SPI pin mapping, reset, interrupt, RJ45 transformer, and layout constraints.
https://blog.csdn.net/weixin_42355400/article/details/158409678

태그

#W5500 #WIZnet #MicroPython #Maker #ESP32 #Ethernet #SPI #HardwareWiring #Registers #Firmware #NetworkStack #Socket #HTTPClient #EmbeddedNetworking

 
 
Documents
Comments Write