Wiznet makers

Benjamin

Published February 28, 2026 ©

98 UCC

11 WCC

8 VAR

0 Contests

0 Followers

1 Following

Original Link

Rover Power Control — W5500 EVB Pico

UDP-based relay controller for METU ROVER — Raspberry Pi Pico + WIZnet W5500

COMPONENTS
PROJECT DESCRIPTION

Rover Power Control — W5500 EVB Pico

Over the past year I've been working on a large-scale autonomous rover project as part of a team. The full system — central navigation, sensor fusion, communication stack, everything — lives in a private team repository that I can't share publicly. This is one module from that system. I extracted it, cleaned it up, and put it here as a standalone piece because it represents a real engineering problem I had to think through and solve, not just code I wrote following a spec.


UDP-based relay controller for a university rover. Runs on Raspberry Pi Pico with a WIZnet W5500 Ethernet module, receives JSON commands over the network, and switches power to rover subsystems via relays.

Built as part of the embedded software stack for METU ROVER during university rover competitions.

What it does

The board sits between the rover's onboard computer and its power distribution system. A ground station (or any UDP client) sends JSON commands to 10.42.0.50:5050, and the Pico toggles the corresponding relay.

Two relay modes are implemented:

  • Normal relay — stays HIGH or LOW until told otherwise (robot arm, science system, wheels)
  • Pulse relay — sends a 100ms pulse on state change, used for latching relays that hold their state without continuous power (main power bus, bulk power)

The wheel subsystem also supports a restart sequence: cuts power, waits 1 second, restores power — useful for recovering motor drivers after a fault.

Hardware

ComponentDetail
MCURaspberry Pi Pico (RP2040)
EthernetWIZnet W5500 EVB Pico
Relays6x (robot arm, science, 4x wheels, all power, bulk power)
Clock133 MHz

GPIO Map

SubsystemGPIORelay Type
Bulk Power3Pulse
All Power4Pulse
Wheel Front Left5Normal
Wheel Front Right6Normal
Science System7Normal
Robot Arm8Normal
Wheel Rear Left10Normal
Wheel Rear Right11Normal

Command Format

Send a JSON string over UDP to port 5050:

{"robot_arm": 1, "science_system": 0, "wheels": 1, "all_power": 1, "bulk_power": 0}

To trigger a wheel restart:

{"wheels_restart": 1}

The board responds with current relay states and a timestamp:

{"counter": 42, "robot_arm": 1, "science_system": 0, "wheels": 1, "all_power": 1, "bulk_power": 0, "timestamp": 1234567}

Build

This project is part of the WIZnet Pico C SDK examples. Clone that repo and drop this into examples/relay_control/, then build normally:

mkdir build && cd build
cmake .. -DBOARD_NAME=W5500_EVB_PICO
make relay_control

Flash the .uf2 to the board by holding BOOTSEL while plugging in.

Notes

The JSON parser uses strstr — lightweight and sufficient for this use case on a constrained microcontroller. No dynamic allocation anywhere in the codebase.

Documents
Comments Write