Wiznet makers

jaden

Published May 17, 2026 ©

126 UCC

18 WCC

59 VAR

0 Contests

0 Followers

0 Following

Original Link

openPLC with W5500

openPLC with W5500

COMPONENTS
PROJECT DESCRIPTION

How to Build Modbus TCP PLC Control with W5500 and OpenPLC on Arduino?

Summary

이 프로젝트는 Arduino와 WIZnet W5500/W5100 Ethernet 모듈을 사용해 Modbus TCP 기반 PLC 제어 시스템을 구현하는 방법을 설명합니다. OpenPLC를 활용해 Ladder Logic으로 제어 로직을 구성하고, W5500은 유선 Ethernet 기반 Modbus TCP 통신 계층 역할을 담당합니다. 특히 Wi-Fi 대신 RJ45 유선 네트워크를 사용하여 더 안정적이고 예측 가능한 PLC 통신 환경을 구성하는 점이 핵심입니다.


What the Project Does

프로젝트는 Arduino 기반 OpenPLC 시스템을 Modbus TCP 네트워크에 연결하여 PLC 입출력을 원격으로 제어하는 구조입니다.

구성 요소는 다음과 같습니다.

  • Arduino UNO / Arduino R4
  • W5100 Shield 또는 W5500 Ethernet 모듈
  • OpenPLC Runtime
  • Modbus TCP Poll 툴
  • 아날로그 입력(A0 Potentiometer)
  • PWM 출력(LED 밝기 제어)
  • 디지털 출력(LED ON/OFF)

데이터 흐름은 다음과 같습니다.

  1. OpenPLC에서 Ladder Logic 작성
  2. Arduino에 PLC Runtime 업로드
  3. W5500/W5100이 Ethernet 네트워크 연결 담당
  4. Modbus TCP Master가 Holding Register / Coil 접근
  5. Arduino 입출력을 네트워크로 원격 제어

영상에서는 다음 기능을 실제로 시연합니다.

  • Potentiometer 값을 Input Register로 읽기
  • Coil 쓰기로 LED ON/OFF 제어
  • Holding Register로 PWM 밝기 제어
  • Arduino R3 → R4 프로젝트 마이그레이션
  • W5100 Shield와 W5500 모듈 모두 테스트

Who is the Author?

이 프로젝트의 제작자는 스페인어권 메이커·산업 자동화 교육 콘텐츠 제작자인 El Profe Zurco이며, 실제 이름은 Romer Zurco Limachi로 확인됩니다.

그는 OpenPLC 기반 DIY PLC 개발과 산업 자동화 교육 콘텐츠를 지속적으로 제작하고 있으며, 다음 분야를 중심으로 활동합니다.

  • OpenPLC 기반 Micro PLC 개발
  • Arduino / ESP32 산업 제어
  • Modbus TCP / Modbus RTU
  • RS485 통신
  • Ethernet 기반 PLC 네트워크
  • 산업용 I/O 인터페이스
  • Raspberry Pi Pico 및 임베디드 시스템

특히 단순 Arduino 튜토리얼이 아니라 실제 PLC 구조에 가까운 실습 환경 제작에 집중하는 특징이 있습니다.

예를 들어 그의 프로젝트에는 다음 요소들이 반복적으로 등장합니다.

  • DIN Rail 기반 PLC
  • Relay 출력
  • Optocoupler 입력
  • RS485
  • Ethernet
  • Industrial Power Design
  • HMI 연동
  • OpenPLC Runtime

영상에서도 단순 센서 제어가 아니라:

  • Ladder Logic
  • Modbus Register 구조
  • PLC Memory Mapping
  • Industrial Ethernet

같은 실제 산업 자동화 개념을 설명하는 점이 특징입니다.

또한 그는 Wi-Fi 기반 ESP32 프로젝트와 Ethernet 기반 Arduino PLC 프로젝트를 구분해서 설명하며, PLC 환경에서는 유선 Ethernet이 더 안정적이라는 점을 강조합니다.

이는 W5500 기반 하드웨어 TCP/IP Ethernet 구조와 잘 맞는 접근입니다.


Where WIZnet Fits

이 프로젝트에서 WIZnet W5500과 W5100은 Modbus TCP Ethernet 인터페이스 역할을 수행합니다.

특히 W5500은 다음 이유 때문에 PLC 네트워크에 적합합니다.

  • 하드웨어 TCP/IP 오프로드 지원
  • MCU가 TCP/IP 스택 처리 부담 없이 PLC 로직 실행 가능
  • SPI 기반 단순 연결 구조
  • 유선 Ethernet 기반 안정적인 지연시간
  • 최대 8개 소켓 지원
  • 32KB 내부 버퍼 제공

영상에서도 제작자는 Wi-Fi 대신 Ethernet 사용 이유를 직접 설명합니다.

Wi-Fi 기반 Modbus TCP는 무선 간섭이나 연결 품질에 영향을 받을 수 있지만, 유선 Ethernet은 PLC 환경에서 더 안정적인 통신을 제공합니다. 특히 산업 자동화나 실시간 제어에서는 결정론적 네트워크 응답이 중요하기 때문에 W5500 같은 하드웨어 Ethernet 컨트롤러가 더 적합합니다.

또한 영상에서는 8bit Arduino보다 Arduino R4 같은 32bit MCU 사용을 권장합니다. 이유는 다음과 같습니다.

  • 더 큰 메모리 공간
  • 더 많은 Modbus Register 처리 가능
  • OpenPLC 확장성 증가
  • 향후 Ethernet + Industrial Protocol 확장에 유리

Implementation Notes

영상에서는 실제로 OpenPLC와 Ethernet 모듈을 함께 사용하는 구조를 보여줍니다.

OpenPLC Modbus TCP 설정

다음과 같이 Ethernet 기반 Modbus TCP를 활성화합니다.

  • IP Address 설정
  • Gateway 설정
  • Network Mask 설정
  • Modbus TCP 활성화

프로젝트에서는 다음 IP를 사용합니다.

 
192.168.0.40
 

이후 Modbus TCP Poll 프로그램에서 동일 IP로 접근하여:

  • Coil
  • Input Register
  • Holding Register

를 읽고 씁니다.


Ladder Logic 구성

영상의 PLC 로직은 Set/Reset 기반 구조입니다.

  • M0 → LED ON
  • M1 → LED OFF
  • Q0 → 실제 출력 핀

Modbus Coil을 직접 메모리 비트에 연결하여 네트워크로 PLC 출력을 제어합니다.

특히 다음 개념이 중요합니다.

  • QX0.x → 실제 Arduino 핀
  • QX1.x → 내부 메모리 비트

즉, 모든 Modbus 데이터를 실제 GPIO에 직접 연결하지 않고 내부 PLC 메모리를 통해 제어합니다.

이는 실제 산업 PLC 구조와 유사한 방식입니다.


W5500 SPI 연결 구조

영상에서 설명된 W5500 연결은 다음과 같습니다.

W5500Arduino
MISOMISO
MOSIMOSI
SCKSCK
CSD10
GNDGND
5V5V

추가로 Reset 핀 연결도 가능하지만 필수는 아닙니다.

영상에서는 Arduino Ethernet Library 기반으로 동작하며, SPI CS 핀은 기본적으로 D10을 사용한다고 설명합니다.


Arduino R3 → R4 마이그레이션

영상의 중요한 포인트 중 하나는 OpenPLC 프로젝트 마이그레이션입니다.

OpenPLC 프로젝트 구조를 유지한 상태에서:

  • 보드만 Arduino R4로 변경
  • 핀 재할당
  • IP 수정

만으로 동일 Ladder Logic을 그대로 재사용합니다.

이는 OpenPLC가 하드웨어 추상화 구조를 제공하기 때문입니다.


Practical Tips / Pitfalls

  • W5500 사용 시 SPI CS 핀(D10) 충돌 여부 확인 필요
  • Arduino UNO 계열에서는 SPI 핀(10~13) 사용 제한 발생
  • Leonardo는 ISP SPI 분리 구조라 GPIO 손실이 적음
  • PWM 출력은 반드시 PWM 지원 핀 사용 필요
  • Modbus Register 주소와 PLC 메모리 주소 혼동 주의
  • Wi-Fi 기반 PLC보다 Ethernet 기반 PLC가 산업 환경에서 안정적
  • 8bit MCU보다 32bit MCU가 OpenPLC 확장성 측면에서 유리

FAQ

Q: 왜 W5500을 사용하나요?

A: W5500은 하드웨어 TCP/IP 스택을 내장하고 있어 Arduino가 네트워크 프로토콜 처리 대신 PLC 로직 실행에 집중할 수 있습니다. 또한 유선 Ethernet 기반이라 Modbus TCP 통신의 안정성과 예측 가능한 응답시간 확보에 유리합니다.


Q: Arduino에 W5500은 어떻게 연결하나요?

A: SPI 인터페이스를 사용합니다. MISO, MOSI, SCK, CS(D10) 핀을 연결하며 일반적으로 5V와 GND도 함께 연결합니다. 대부분 Arduino Ethernet Library와 호환됩니다.


Q: 이 프로젝트에서 W5500은 어떤 역할을 하나요?

A: OpenPLC Runtime이 생성한 Modbus TCP 데이터를 실제 Ethernet 네트워크로 송수신하는 역할을 합니다. Coil, Holding Register, Input Register 접근을 Ethernet 기반으로 처리합니다.


Q: 초보자도 따라할 수 있나요?

A: 기본적인 Arduino 업로드 경험과 IP 네트워크 개념을 알고 있다면 가능합니다. 다만 OpenPLC 메모리 구조와 Modbus Address 개념은 사전에 이해하는 것이 좋습니다.


Q: Wi-Fi 대신 Ethernet을 사용하는 이유는 무엇인가요?

A: PLC 제어에서는 안정성과 지연시간 예측 가능성이 중요합니다. Wi-Fi는 무선 간섭이나 신호 품질 영향을 받을 수 있지만 Ethernet은 더 안정적인 Modbus TCP 통신 환경을 제공합니다. 특히 산업 자동화에서는 유선 네트워크가 일반적으로 선호됩니다.


Source


Tags

#W5500 #W5100 #OpenPLC #ModbusTCP #Arduino #Ethernet #IndustrialIoT #PLC #RJ45 #ArduinoR4 #WIZnet

 
 
 
 

How to Build Modbus TCP PLC Control with W5500 and OpenPLC on Arduino?

Summary

This project demonstrates how to build a Modbus TCP-based PLC control system using Arduino and WIZnet W5500/W5100 Ethernet modules. OpenPLC is used to create Ladder Logic control flows, while the W5500 handles wired Ethernet communication for Modbus TCP networking. A key focus of the project is using RJ45 Ethernet instead of Wi-Fi to achieve more stable and predictable PLC communication.


What the Project Does

The project connects an Arduino-based OpenPLC system to a Modbus TCP network for remote PLC I/O control.

The hardware and software stack includes:

  • Arduino UNO / Arduino R4
  • W5100 Ethernet Shield or W5500 Ethernet module
  • OpenPLC Runtime
  • Modbus TCP Poll tool
  • Analog input (A0 potentiometer)
  • PWM output for LED brightness control
  • Digital output for LED ON/OFF control

The data flow works as follows:

  1. Ladder Logic is created in OpenPLC
  2. The PLC Runtime is uploaded to Arduino
  3. W5500/W5100 provides Ethernet network connectivity
  4. A Modbus TCP master accesses Holding Registers and Coils
  5. Arduino I/O is controlled remotely over Ethernet

The video demonstrates several practical functions:

  • Reading potentiometer values through Input Registers
  • Controlling LEDs through Modbus Coil writes
  • Adjusting PWM brightness through Holding Registers
  • Migrating the same project from Arduino R3 to Arduino R4
  • Testing both W5100 Shield and W5500 module configurations

Who is the Author?

The project creator is a Spanish-speaking maker and industrial automation educator known as El Profe Zurco, whose real name is identified as Romer Zurco Limachi.

He focuses on educational and practical industrial automation projects based on:

  • OpenPLC-based DIY PLC systems
  • Arduino and ESP32 industrial control
  • Modbus TCP and Modbus RTU
  • RS485 communication
  • Ethernet-based PLC networking
  • Industrial I/O interfaces
  • Raspberry Pi Pico and embedded systems

Rather than creating simple Arduino tutorials, his projects are structured more like real industrial automation platforms.

His projects frequently include:

  • DIN rail PLC systems
  • Relay outputs
  • Optocoupler inputs
  • RS485 communication
  • Ethernet networking
  • Industrial power design
  • HMI integration
  • OpenPLC Runtime environments

The video itself also focuses heavily on industrial automation concepts such as:

  • Ladder Logic
  • PLC memory mapping
  • Modbus Register structures
  • Industrial Ethernet networking

Another important point is that he clearly distinguishes between:

  • ESP32 for Wi-Fi-based projects
  • Arduino + W5500 for wired PLC applications

This aligns closely with real industrial automation practices where wired Ethernet is preferred for deterministic and stable communication.


Where WIZnet Fits

In this project, the WIZnet W5500 and W5100 act as Ethernet interfaces for Modbus TCP communication.

The W5500 is particularly well suited for PLC networking because it provides:

  • Hardware TCP/IP offloading
  • Reduced MCU overhead for networking tasks
  • Simple SPI-based integration
  • Stable wired Ethernet communication
  • Support for up to 8 sockets
  • 32 KB internal buffer memory

The author also directly explains why Ethernet is preferred over Wi-Fi in PLC environments.

Wi-Fi-based Modbus TCP systems can be affected by wireless interference and unstable latency, while wired Ethernet provides more predictable and reliable communication. In industrial automation and real-time control systems, deterministic response timing is often more important than wireless flexibility.

The video also recommends moving away from 8-bit Arduino platforms toward 32-bit boards such as Arduino R4 because of:

  • Larger memory capacity
  • Better Modbus Register handling
  • Improved OpenPLC scalability
  • Easier expansion toward industrial Ethernet systems

Implementation Notes

The project demonstrates a practical OpenPLC and Ethernet integration workflow.

OpenPLC Modbus TCP Configuration

The Ethernet-based Modbus TCP interface is configured using:

  • IP Address
  • Gateway
  • Network Mask
  • Modbus TCP Enable

The project uses the following IP address:

 
192.168.0.40
 

The Modbus TCP Poll software then connects to the same IP to access:

  • Coils
  • Input Registers
  • Holding Registers

Ladder Logic Structure

The PLC logic shown in the project uses a Set/Reset structure.

  • M0 → LED ON
  • M1 → LED OFF
  • Q0 → Physical output pin

The project maps Modbus Coils directly to internal PLC memory bits for remote output control.

An important distinction is:

  • QX0.x → Physical Arduino outputs
  • QX1.x → Internal memory bits

This means not every Modbus variable is directly tied to hardware GPIO pins. Internal PLC memory is used as an abstraction layer, similar to real industrial PLC systems.


W5500 SPI Wiring

The W5500 module is connected through SPI.

W5500Arduino
MISOMISO
MOSIMOSI
SCKSCK
CSD10
GNDGND
5V5V

The reset pin can also be connected, although it is not strictly required.

The project uses the Arduino Ethernet Library, where SPI CS defaults to pin D10.


Arduino R3 to R4 Migration

One of the most interesting parts of the project is the migration process from Arduino R3 to Arduino R4.

The author keeps the same OpenPLC project structure and only changes:

  • The board selection
  • Pin assignments
  • IP configuration

The same Ladder Logic remains unchanged.

This demonstrates how OpenPLC abstracts hardware configuration from PLC logic.


Practical Tips / Pitfalls

  • Verify SPI CS pin conflicts when using W5500
  • Arduino UNO boards lose access to SPI-related GPIO pins
  • Arduino Leonardo preserves more GPIOs due to separated ISP SPI routing
  • PWM outputs must use PWM-capable pins
  • Avoid confusion between Modbus Register addresses and PLC memory addresses
  • Wired Ethernet is generally more stable than Wi-Fi for PLC communication
  • 32-bit MCUs are better suited for scalable OpenPLC projects

FAQ

Q: Why use the W5500 for this project?

A: The W5500 includes a hardware TCP/IP stack, allowing the Arduino to focus on PLC logic rather than network protocol processing. It also provides stable wired Ethernet communication suitable for industrial Modbus TCP systems.


Q: How is the W5500 connected to Arduino?

A: The module connects through SPI using MISO, MOSI, SCK, and CS (D10). Power and GND connections are also required. Most Arduino Ethernet Library examples work directly with this setup.


Q: What role does the W5500 play in this project?

A: The W5500 handles Ethernet communication for OpenPLC Modbus TCP traffic. It manages network-level transmission of Coils, Holding Registers, and Input Registers.


Q: Can beginners follow this project?

A: Yes, if they already have basic Arduino upload experience and understand basic IP networking concepts. However, understanding OpenPLC memory mapping and Modbus addressing is recommended.


Q: Why use Ethernet instead of Wi-Fi for PLC systems?

A: PLC systems require stable and predictable communication timing. Wi-Fi can suffer from interference and inconsistent latency, while wired Ethernet provides more reliable Modbus TCP communication, especially in industrial automation environments.


Source


Tags

#W5500 #W5100 #OpenPLC #ModbusTCP #Arduino #Ethernet #IndustrialIoT #PLC #RJ45 #ArduinoR4

Documents
Comments Write