---
title: "RP2040_OPCUA_Server"
url: "https://maker.wiznet.io/Hannah/projects/rp2040-opcua-server/"
markdown_url: "https://maker.wiznet.io/Hannah/projects/rp2040-opcua-server/md"
type: "UCC: User Created Content"
author: "Maronari"
author_url: "https://github.com/Maronari/RP2040_OPCUA_Server"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Maronari"
original_url: "https://github.com/Maronari/RP2040_OPCUA_Server"
published: "2025-07-09"
language: "en"
likes: 0
views: 1354
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# RP2040_OPCUA_Server

> Implementation of an IIoT temperature sensor based on OPC UA

Original author: Maronari (source: https://github.com/Maronari/RP2040_OPCUA_Server)

## Article

### Project Description

**Embedded network system development** utilizing the RP2040 MCU and WIZnet W5500 Ethernet module

**Implementation of an OPC UA server on FreeRTOS**, enabling industrial-standard communication in embedded environments

**Supports DHCP automatic IP assignment** for seamless network configuration

**Real-time temperature sensor data acquisition** using onboard ADC for live monitoring

Designed for **Industrial IoT (IIoT) and smart factory applications**

---

### Key Technology Overview: What is OPC UA?

**OPC UA (Open Platform Communications Unified Architecture)** is an open communication standard for industrial automation

Built on **TCP/IP with platform-independent architecture**, supporting various operating systems and hardware

Ensures **secure and reliable data exchange** with built-in authentication, encryption, and access control

Supports complex data modeling, real-time event notifications, and historical data management

Developed to overcome the limitations of the legacy OPC Classic protocol

---

### Key Features

| Feature | Description |
| --- | --- |
| DHCP-based IP Allocation | Flexible network setup with automatic IP addressing |
| OPC UA Server & Variable Registration | Provides real-time data such as temperature and task status |
| Onboard Temperature Sensor | ADC-driven temperature monitoring with live data sharing |
| FreeRTOS Multitasking | Independent tasks for SPI communication, OPC UA server, and sensor data |
| Reliable TCP/IP Communication | W5500 + lwIP stack ensure stable Ethernet connectivity |

---

### System Architecture

| Component | Role |
| --- | --- |
| RP2040 MCU + W5500 Ethernet | Hardware platform with SPI interface for network communication |
| FreeRTOS | Multitasking OS managing independent SPI, OPC UA server, and sensor tasks |
| lwIP TCP/IP Stack | Network stack with DHCP client for dynamic IP management |
| OPC UA Server | Handles client connections and exposes address space data nodes |
| SNTP Synchronization | Provides accurate time for OPC UA event logging and history support |

---

### Application Areas

**Factory automation**: Real-time data exchange and control between PLCs, sensors, and HMIs

**Smart factories and IIoT**: Data collection and analytics in industrial IoT environments

**Energy management**: Monitoring and control of power plants and substations

**Building automation**: Integrated control of HVAC, lighting, and security systems

**Cloud integration**: Seamless connectivity with MES, SCADA, and cloud platforms

---

Source: https://maker.wiznet.io/Hannah/projects/rp2040-opcua-server/
