How to Add WIZnet W5500 Ethernet to K210 Camera Nodes on a Raspberry Pi Measurement System?
This robotics and maker project describes a 2021 electronic-design competition camera measurement system built with a Raspberry Pi central terminal and two K210
How to Add WIZnet W5500 Ethernet to K210 Camera Nodes on a Raspberry Pi Measurement System?
Summary
This robotics and maker project describes a 2021 electronic-design competition camera measurement system built with a Raspberry Pi central terminal and two K210 camera nodes. The original project does not use WIZnet hardware; it mentions W5500 as a possible SPI Ethernet option but chooses a transparent serial-to-Ethernet module instead. This project does not currently use WIZnet products. A W5500-based version would place WIZnet W5500 on each K210 camera node as the wired Ethernet controller, providing SPI-based Ethernet, hardware TCP/IP offload, sockets, and buffering for camera-coordinate and control data.
What the Project Does
The project is an internet-connected camera measurement system for an electronic-design competition problem. The system uses a Raspberry Pi as the central processing terminal and two K210 development boards as independent camera nodes. Each K210 node captures the motion of a laser point, identifies and boxes the target, calculates position information, and sends data to the Raspberry Pi for display, control, and final measurement computation.
The original design selected K210 boards because each camera node needed local image processing capability, and the article highlights K210’s compute advantage over simpler vision modules for real-time target detection. The Raspberry Pi was chosen as the terminal because it can run Linux, display video over HDMI, use Python for UI and data handling, and provide built-in Ethernet networking.
For the camera-node network link, the article compares W5500-style SPI Ethernet modules with a USR-K7 serial-to-Ethernet module. It states that W5500 would require the K210 to drive the Ethernet module over SPI and handle TCP/IP software integration, while the transparent serial-to-Ethernet module packages UART data into network packets automatically. The original project therefore favors development speed over lower-level Ethernet control.
Where WIZnet Fits
The exact WIZnet product for an integration approach is W5500. W5500 would sit between each K210 camera node and the wired LAN. The K210 would continue doing image capture and laser-point processing, while W5500 would handle the Ethernet-side transport path through SPI-controlled sockets.
W5500 is technically suitable because it is a hardwired TCP/IP Ethernet controller with SPI access up to 80 MHz, an embedded 10/100 Ethernet MAC and PHY, support for TCP, UDP, ICMP, IPv4, ARP, IGMP, and PPPoE, 8 independent sockets, and 32 KB internal Tx/Rx buffer memory. WIZnet also documents ioLibrary as an MCU-independent driver library for WIZnet W5x00 and W6x00 chips, with protocol services such as DHCP, DNS, MQTT, SNTP, TFTP, and HTTP Server.
For a robotics or maker measurement system, W5500 would be useful when the design needs deterministic wired transport, explicit socket control, and less dependency on transparent converter behavior. The trade-off is firmware complexity: the K210 firmware would need SPI driver integration, W5500 reset and interrupt handling, network configuration, socket state handling, and payload framing.
Implementation Notes
The accessible source article does not provide public project code for a WIZnet implementation, and the original system does not use WIZnet products. Therefore, no project-specific W5500 code can be quoted.
A W5500-based architecture would replace each camera node’s transparent UART-to-Ethernet path with a direct SPI Ethernet path:
K210 camera node → SPI → W5500 → RJ45 Ethernet → LAN switch/router → Raspberry Pi terminal
On the firmware side, each K210 node would need four layers. First, a platform layer would drive SPI, chip select, reset, and interrupt. Second, a W5500 network layer would configure MAC address, IP address, gateway, subnet, socket buffer sizes, and PHY link checks. Third, a transport layer would choose UDP or TCP. UDP is simpler for coordinate streaming and low-latency telemetry; TCP is safer when every control message or measurement packet must arrive in order. Fourth, an application framing layer would define packet fields such as node ID, frame counter, timestamp, laser-point coordinates, confidence, and checksum.
For performance, the practical bottleneck is not only W5500’s SPI capability. The K210 image-processing loop, SPI transaction rate, packet frequency, Raspberry Pi receive loop, and whether the data stream carries full images or only extracted coordinates will determine system behavior. A good W5500 integration should send compact measurement data rather than raw video unless there is a clear bandwidth budget.
Practical Tips / Pitfalls
- Keep the first W5500 version simple: send coordinate packets, not image frames.
- Use one socket per K210 node and keep the packet format fixed during early testing.
- Wire SPI, chip select, reset, and interrupt explicitly; reset and interrupt are important for recovery and event handling.
- Check PHY link before debugging socket code.
- Use sequence numbers so the Raspberry Pi can detect dropped or repeated packets.
- Separate vision timing from network timing; image processing should not block socket servicing.
- Log node IP, socket state, link state, frame count, packet count, and last error on both the K210 side and Raspberry Pi side.
FAQ
Q: Why use WIZnet W5500 for this camera measurement system?
A: W5500 would give each K210 node a wired Ethernet interface with hardware TCP/IP offload, 8 sockets, and internal packet buffers. That is useful when the camera node should send structured measurement data directly over Ethernet instead of relying on a transparent serial-to-Ethernet bridge.
Q: How would W5500 connect to the K210 camera node?
A: W5500 would connect through SPI using SCLK, MOSI, MISO, and chip select. A practical board should also connect W5500 reset and interrupt pins. The Ethernet side would use the W5500 module’s RJ45 or magnetics path, while the K210 firmware would initialize SPI, configure W5500, and open TCP or UDP sockets.
Q: What role would W5500 play in this project?
A: W5500 would handle the wired Ethernet transport for each K210 camera node. The K210 would detect the laser point and generate measurement packets; W5500 would transmit those packets over TCP or UDP to the Raspberry Pi terminal.
Q: Can beginners follow this maker integration?
A: Yes, but it is more difficult than using a transparent serial-to-Ethernet module. Beginners should first verify K210 image processing and Raspberry Pi socket reception separately, then add W5500 SPI communication, then add UDP or TCP packet exchange.
Q: How does W5500 compare with the transparent serial-to-Ethernet module used in the original project?
A: The transparent converter is faster to integrate because the K210 can send UART data and let the module handle the network packaging. W5500 gives more control over sockets, buffers, timing, and network behavior, but it requires firmware integration over SPI. For a competition build with limited time, the transparent module is simpler; for a reusable robotics platform, W5500 gives better architectural control.
Source
Original article: CSDN, “2021年电赛D题:基于树莓派与K210的互联网摄像测量系统(yyds队),” published on 2026-03-11. The accessible page confirms the Raspberry Pi + K210 architecture, the competition context, and the network-connection comparison that mentions W5500 as an option but does not use it in the final design.
WIZnet product reference: W5500 documentation and product information.
Tags
#W5500 #WIZnet #K210 #RaspberryPi #Robotics #Maker #SPIEthernet #CameraMeasurement #NetworkStack #HardwareWiring #Firmware #Performance #TCPIP
Raspberry Pi 측정 시스템의 K210 카메라 노드에 WIZnet W5500 Ethernet을 추가하는 방법은?
요약
이 로보틱스 및 메이커 프로젝트는 Raspberry Pi 중앙 터미널과 두 개의 K210 카메라 노드로 구성된 2021 전자설계대회 카메라 측정 시스템을 설명합니다. 원본 프로젝트는 WIZnet 하드웨어를 사용하지 않습니다. 원문은 W5500을 가능한 SPI Ethernet 옵션으로 언급하지만, 최종 설계에서는 투명 Serial-to-Ethernet 모듈을 선택합니다. This project does not currently use WIZnet products. W5500 기반으로 확장한다면 각 K210 카메라 노드에 WIZnet W5500을 유선 Ethernet 컨트롤러로 배치해, 카메라 좌표 및 제어 데이터를 위한 SPI 기반 Ethernet, 하드웨어 TCP/IP 오프로딩, 소켓, 버퍼링을 제공할 수 있습니다.
프로젝트가 하는 일
이 프로젝트는 전자설계대회 과제를 위한 인터넷 연결형 카메라 측정 시스템입니다. 시스템은 Raspberry Pi를 중앙 처리 터미널로 사용하고, 두 개의 K210 개발 보드를 독립 카메라 노드로 사용합니다. 각 K210 노드는 레이저 포인트의 움직임을 촬영하고, 목표를 인식해 박스로 표시하며, 위치 정보를 계산한 뒤 Raspberry Pi로 데이터를 전송합니다. Raspberry Pi는 표시, 제어, 최종 측정 계산을 담당합니다.
원본 설계는 각 카메라 노드에 로컬 이미지 처리 능력이 필요했기 때문에 K210 보드를 선택했습니다. 원문은 K210이 단순한 비전 모듈보다 실시간 목표 검출에 필요한 연산 성능 측면에서 유리하다고 설명합니다. Raspberry Pi는 Linux 실행, HDMI 영상 출력, Python 기반 UI 및 데이터 처리, 내장 Ethernet 네트워크 기능 때문에 중앙 터미널로 선택되었습니다.
카메라 노드의 네트워크 링크와 관련해서 원문은 W5500 계열 SPI Ethernet 모듈과 USR-K7 Serial-to-Ethernet 모듈을 비교합니다. 원문은 W5500을 사용할 경우 K210이 SPI로 Ethernet 모듈을 직접 구동하고 TCP/IP 소프트웨어 통합을 처리해야 한다고 설명합니다. 반면 투명 Serial-to-Ethernet 모듈은 UART 데이터를 자동으로 네트워크 패킷으로 포장합니다. 따라서 원본 프로젝트는 낮은 수준의 Ethernet 제어보다 개발 속도를 우선해 투명 변환 모듈을 선택합니다.
WIZnet이 들어가는 위치
통합 접근에 사용할 수 있는 WIZnet 제품은 W5500입니다. W5500은 각 K210 카메라 노드와 유선 LAN 사이에 위치할 수 있습니다. K210은 기존처럼 이미지 캡처와 레이저 포인트 처리를 계속 수행하고, W5500은 SPI로 제어되는 소켓을 통해 Ethernet 전송 경로를 담당합니다.
W5500은 이 용도에 기술적으로 적합합니다. W5500은 하드웨어 TCP/IP Ethernet 컨트롤러이며, 최대 80 MHz SPI 접근, 내장 10/100 Ethernet MAC 및 PHY, TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE 지원, 8개 독립 소켓, 32 KB 내부 Tx/Rx 버퍼 메모리를 제공합니다. WIZnet ioLibrary는 W5x00 및 W6x00 칩을 위한 MCU 독립형 드라이버 라이브러리이며 DHCP, DNS, MQTT, SNTP, TFTP, HTTP Server 같은 프로토콜 서비스도 제공합니다.
로보틱스 또는 메이커 측정 시스템에서 W5500은 결정적인 유선 전송, 명시적인 소켓 제어, 투명 변환기 동작에 대한 의존성 감소가 필요할 때 유용합니다. 다만 대가도 있습니다. K210 펌웨어는 SPI 드라이버 통합, W5500 reset 및 interrupt 처리, 네트워크 설정, 소켓 상태 처리, payload framing을 직접 구현해야 합니다.
구현 참고 사항
접근 가능한 원문은 WIZnet 구현용 공개 프로젝트 코드를 제공하지 않으며, 원본 시스템도 WIZnet 제품을 사용하지 않습니다. 따라서 프로젝트별 W5500 코드는 인용할 수 없습니다.
W5500 기반 아키텍처는 각 카메라 노드의 투명 UART-to-Ethernet 경로를 직접 SPI Ethernet 경로로 대체하는 구조입니다.
K210 카메라 노드 → SPI → W5500 → RJ45 Ethernet → LAN switch/router → Raspberry Pi 터미널
펌웨어 측면에서 각 K210 노드는 네 개의 계층을 필요로 합니다. 첫 번째는 SPI, chip select, reset, interrupt를 구동하는 platform layer입니다. 두 번째는 MAC 주소, IP 주소, gateway, subnet, socket buffer size, PHY link check를 설정하는 W5500 network layer입니다. 세 번째는 UDP 또는 TCP를 선택하는 transport layer입니다. UDP는 좌표 스트리밍과 저지연 텔레메트리에 단순하고, TCP는 모든 제어 메시지나 측정 패킷이 순서대로 도착해야 할 때 더 안전합니다. 네 번째는 node ID, frame counter, timestamp, laser-point coordinate, confidence, checksum 같은 필드를 정의하는 application framing layer입니다.
성능 측면에서 병목은 W5500의 SPI 성능만으로 결정되지 않습니다. K210의 이미지 처리 루프, SPI transaction 속도, 패킷 전송 주기, Raspberry Pi 수신 루프, 그리고 전송 데이터가 전체 이미지인지 추출된 좌표뿐인지가 시스템 동작을 좌우합니다. 좋은 W5500 통합은 명확한 대역폭 예산이 없는 한 raw video가 아니라 compact measurement data를 전송해야 합니다.
실무 팁 / 주의점
- 첫 번째 W5500 버전은 단순하게 구성해야 합니다. 이미지 프레임이 아니라 좌표 패킷부터 보내는 것이 좋습니다.
- K210 노드 하나당 하나의 소켓을 사용하고, 초기 테스트 중에는 패킷 형식을 고정해야 합니다.
- SPI, chip select, reset, interrupt를 명확히 배선해야 합니다. reset과 interrupt는 복구와 이벤트 처리에 중요합니다.
- 소켓 코드를 디버깅하기 전에 PHY link를 먼저 확인해야 합니다.
- Raspberry Pi가 누락되거나 중복된 패킷을 감지할 수 있도록 sequence number를 넣어야 합니다.
- 비전 타이밍과 네트워크 타이밍을 분리해야 합니다. 이미지 처리가 소켓 서비스를 막으면 안 됩니다.
- K210 측과 Raspberry Pi 측 모두에서 node IP, socket state, link state, frame count, packet count, last error를 기록하는 것이 좋습니다.
FAQ
Q: 이 카메라 측정 시스템에서 왜 WIZnet W5500을 사용할 수 있나요?
A: W5500은 각 K210 노드에 하드웨어 TCP/IP 오프로딩, 8개 소켓, 내부 패킷 버퍼를 갖춘 유선 Ethernet 인터페이스를 제공합니다. 이는 카메라 노드가 투명 Serial-to-Ethernet bridge에 의존하지 않고 구조화된 측정 데이터를 직접 Ethernet으로 보내야 할 때 유용합니다.
Q: W5500은 K210 카메라 노드에 어떻게 연결하나요?
A: W5500은 SCLK, MOSI, MISO, chip select를 사용하는 SPI로 연결합니다. 실제 보드에서는 W5500 reset과 interrupt 핀도 연결하는 것이 좋습니다. Ethernet 측은 W5500 모듈의 RJ45 또는 magnetics 경로를 사용하고, K210 펌웨어는 SPI 초기화, W5500 설정, TCP 또는 UDP 소켓 열기를 수행합니다.
Q: 이 프로젝트에서 W5500은 어떤 역할을 하게 되나요?
A: W5500은 각 K210 카메라 노드의 유선 Ethernet 전송을 담당합니다. K210은 레이저 포인트를 검출하고 측정 패킷을 생성하며, W5500은 그 패킷을 TCP 또는 UDP로 Raspberry Pi 터미널에 전송합니다.
Q: 초보자도 이 메이커 통합을 따라갈 수 있나요?
A: 가능합니다. 하지만 투명 Serial-to-Ethernet 모듈을 사용하는 것보다 어렵습니다. 초보자는 먼저 K210 이미지 처리와 Raspberry Pi 소켓 수신을 각각 검증한 뒤, W5500 SPI 통신을 추가하고, 마지막으로 UDP 또는 TCP 패킷 교환을 추가하는 순서가 좋습니다.
Q: W5500은 원본 프로젝트의 투명 Serial-to-Ethernet 모듈과 어떻게 다른가요?
A: 투명 변환기는 K210이 UART 데이터를 보내면 모듈이 네트워크 포장을 처리하므로 더 빠르게 통합할 수 있습니다. W5500은 소켓, 버퍼, 타이밍, 네트워크 동작에 대한 제어권을 더 많이 제공하지만 SPI 기반 펌웨어 통합이 필요합니다. 제한된 시간의 대회 제작에는 투명 모듈이 단순하고, 재사용 가능한 로보틱스 플랫폼에는 W5500이 더 나은 아키텍처 제어권을 제공합니다.
출처
Original article: CSDN, “2021年电赛D题:基于树莓派与K210的互联网摄像测量系统(yyds队),” 2026-03-11 게시. 접근 가능한 페이지에서는 Raspberry Pi + K210 아키텍처, 대회 맥락, W5500을 옵션으로 언급하지만 최종 설계에서는 사용하지 않는 네트워크 연결 비교를 확인할 수 있습니다.
https://blog.csdn.net/weixin_42355400/article/details/158903434
WIZnet product reference: W5500 documentation and product information.
https://docs.wiznet.io/Product/Chip/Ethernet/W5500
태그
#W5500 #WIZnet #K210 #RaspberryPi #Robotics #Maker #SPIEthernet #CameraMeasurement #NetworkStack #HardwareWiring #Firmware #Performance #TCPIP
