Skip to content

WIZnet Pico OPC UA Server

An embedded OPC UA server that exposes UART sensor data directly to SCADA systems over Ethernet, without an external gateway or PC.

TheoIm

Published December 01, 2026

WIZnet Pico OPC UA Server

Components

Hardware components

Project description

Overview

A sensor or an old machine prints numbers on a UART. Your SCADA only speaks OPC UA. This firmware turns a WIZnet Pico board into the OPC UA server that sits between them.

Send the board one line, and the three numbers appear as OPC UA variables Channel_1 to Channel_3. Any OPC UA client can browse them, read them and subscribe to them. There is no PC or gateway box in between.

sensor / PLC / MCU --UART--> WIZnet Pico board --Ethernet--> OPC UA client
                             (OPC UA server)    opc.tcp://192.168.11.2:4840
WIZnet Pico OPC UA Server, Overview
ItemValue
OPC UA endpointopc.tcp://192.168.11.2:4840
Board IP192.168.11.2 (fixed, no DHCP)
UART inputUART0, GP0 = TX, GP1 = RX, 115200 bps, 8N1
Data line$DATA:<ch1>,<ch2>,<ch3> followed by CR or LF
Clients at once4

The WIZnet chip handles TCP/IP in hardware. The MCU does not run a software network stack. It only passes data to the chip's sockets.


How It Compares

We looked for other OPC UA servers that run on a microcontroller and compared what each one has published. Names are withheld.

 EncryptionClients at onceLongest published testWhere the numbers come from
This projectBasic256Sha256 (RP2350 board)424 hours, 0 rebootsMeasured, raw results in the repository
Open-source server A (same MCU family, software TCP/IP, 8 MB external RAM)Basic256Sha2561 tested with encryption (4 configured)About 10 minutesMeasured by its author
Research implementation B (Cortex-M7 class)Not statedUp to 5Not statedConference paper
Commercial module CBasic256Sha2562 (documented limit)Not publishedProduct manual

Note: The test conditions differ, so this table is not a speed ranking. It shows what each source has tested and published. Based on public documents as of 2026-12-01.


Required Hardware and Software

Hardware

  • W55RP20-EVB-Pico or W6300-EVB-Pico2
  • USB cable and Ethernet cable
  • USB-to-TTL adapter, 3.3 V (optional, it stands in for a sensor)

Choose the board by the security policy you need:

MCUBoardPolicy
RP2350W6300-EVB-Pico2Basic256Sha256 (encrypted)
RP2040W55RP20-EVB-PicoNone

Note: An encrypted OPC UA connection starts with an RSA-2048 handshake. It takes 1.2 s on the RP2350 and 5.1 s on the RP2040, which is where many clients time out. Use RP2040 boards with the None policy on a network you control.

Software

  • UaExpert, the free OPC UA client from Unified Automation
  • A serial terminal such as Tera Term

How to Run the OPC UA Node

Step 1: Flash the firmware

  1. Download the .uf2 file for your board from the v1.0.1 release.
  2. Hold BOOTSEL and plug in the USB cable. A drive appears.
  3. Copy the .uf2 file to the drive. The board restarts.
  4. Open the board's COM port in the terminal and type OPCUA.
[OPC UA] state=RUNNING network=on endpoint=opc.tcp://192.168.11.2:4840 channels=3

Note: The board does not echo what you type. In Tera Term, set Transmit to CR+LF and turn on Local echo.

Step 2: Set the PC address

  1. Connect the board to the PC with the Ethernet cable.
  2. Set the PC's Ethernet adapter to 192.168.11.100, subnet mask 255.255.255.0.
  3. Run ping 192.168.11.2 and check that the board answers.

Step 3: Connect with UaExpert

  1. Select Server > Add.
  2. Under Custom Discovery, double-click the add-server line and enter opc.tcp://192.168.11.2:4840.
  3. Expand WIZnet OPC UA Node, select None - None (uatcp-uasc-uabinary), click OK and connect.

Step 3: Connect with UaExpert

The address space looks like this:

Objects
└── WIZnet-OPCUA-Node
    ├── Device        FwVersion, IPAddress, Uptime_s, FreeHeap, LinkStatus, ...
    └── Channels
        ├── Channel_1
        ├── Channel_2
        └── Channel_3

Step 4: Send a value and watch it change

  1. Drag Channel_1 to Channel_3 into the Data Access View.
  2. Type this line in the terminal:
$DATA:23.50,101.32,65.20

The board answers [DATA] ok ch1=23.500 ch2=101.320 ch3=65.200 and UaExpert shows the new values.

Step 4: Send a value and watch it change


How to Connect a Real Sensor

Any device with a UART can feed the node. It only has to print one line.

ItemValue
PortUART0, GP0 = TX, GP1 = RX (3.3 V logic)
Format115200 bps, 8N1, no flow control
Line$DATA:<ch1>,<ch2>,<ch3> followed by CR or LF
  1. Connect the sender's TX to GP1 and its RX to GP0.
  2. Connect the grounds together.
  3. Send the $DATA: line at the rate you need.

[ IMAGE: photo/small/OPC_UA_W55RP20_TTL_connection.jpg ]

An Arduino sketch that sends three analog readings once a second:

void setup() { Serial1.begin(115200); }

void loop() {
  float level    = analogRead(A0) * 100.0 / 1023;  // tank level, %
  float pressure = analogRead(A1) * 10.0 / 1023;   // line pressure, bar
  float flow     = analogRead(A2) * 50.0 / 1023;   // flow, L/min
  Serial1.print("$DATA:");
  Serial1.print(level, 2);    Serial1.print(',');
  Serial1.print(pressure, 2); Serial1.print(',');
  Serial1.println(flow, 2);   // println ends the line with CR+LF
  delay(1000);
}

Note: Use a 3.3 V sender, or put a level shifter on a 5 V sender's TX line.


Testing

TestBoardResult
24 hours: two clients (one encrypted), 10 UART lines per second, cable down for 20 s every 2 hoursW6300-EVB-Pico20 reboots, 864,002 / 864,002 lines, 0 unexpected client losses, 12 / 12 link recoveries
Read response time (None)W55RP20-EVB-Picop50 1.9 ms, p99 3 to 5 ms
100 monitored items (None)W55RP20-EVB-Pico1,000 notifications per second, all received
CapacityW6300-EVB-Pico24 clients x 100 monitored items
Opening one encrypted channelW6300-EVB-Pico21,233 ms
9,000 connect and disconnect cyclesW6300-EVB-Pico20 resets

Free heap fell by 5,764 bytes over the 24 hours. A follow-up test showed that this is a bounded resend queue and not a leak: the drop stopped after the queue filled.

Conditions, tools and raw numbers are in the test results.


Troubleshooting

UaExpert does not find the server

Run ping 192.168.11.2 from the PC. No answer means the PC is not on the 192.168.11.x network or the cable is not connected. Type NET in the terminal and check that the link is up.

A fifth client cannot connect

The board accepts 4 clients at once, one per hardware socket. UaExpert counts as one. Close the clients you are not using. A client that disappeared without closing its session frees its place within about 35 s.

Channel values read Bad_WaitingForInitialData

No value has arrived since the board started. Send a $DATA: line. The node reports "no data yet" instead of a 0 that a SCADA could log as a real value.

UART values do not arrive

Type UART in the terminal. A rising error count means the board receives lines it cannot read. Check that the sender uses 115200 bps, 8N1, and that each line starts with $DATA: and ends with CR or LF.

An encrypted connect is refused with Bad_TcpServerTooBusy

Encrypted connections are set up one at a time. When several arrive together, the server refuses a late one at once instead of letting it time out. Connect again after a moment, and start clients a few seconds apart.


Before You Deploy

  • Anonymous access only. User name and password login is not implemented, and the server accepts any client certificate. Keep the node on a network you control.
  • Security builds embed a test key. Generate your own certificate for each installation. See Build and security.
  • Opening an encrypted connection pauses the server for about 1.2 s. Other clients' reads wait and their connections stay up. Give clients a timeout of 5 s or more.
  • Reduced OPC UA feature set. Reading values and subscriptions are supported. PubSub, history, events and alarms are not.
  • Tested with UaExpert and the Python asyncua library only. Test with your own SCADA or PLC client before you rely on it.
  • Not certified. The server has not been through the OPC Foundation Compliance Test Tool. Treat it as a reference design.

Extending

Project code is Apache-2.0. open62541 is MPL-2.0, Mbed TLS is Apache-2.0, the Raspberry Pi Pico SDK is BSD-3-Clause and the WIZnet ioLibrary is MIT.

Comments

Similar projects you might like

Comments