GatePi-Ethernet-Software
A 6-channel relay board by SB Components combining RP2040, WIZnet W5100S Ethernet, and RS485 for wired remote IO control in industrial environments.
Wired Ethernet for RP2040 Relay Control — GatePi 6CH with WIZnet W5100S

A 6-channel relay control board built on the RP2040 by UK-based SB Components. Equipped with WIZnet W5100S for wired Ethernet, RS485 for industrial device communication, and MicroPython for rapid development — designed for remote IO control in industrial and building automation environments.
Background: When a Relay Board Gets a Network
Relay control boards are everywhere — industrial automation, building management, smart agriculture. But most operate locally. The moment you add network connectivity, the board transforms from something you physically toggle to something you monitor and control remotely, from anywhere on the network.
GatePi 6CH - RP2040 Ethernet is a compact controller board from SB Components, a UK-based embedded hardware company. It combines a 6-channel relay unit and RS485 interface with the RP2040 microcontroller, and adds WIZnet W5100S for stable wired Ethernet connectivity. The full hardware design and MicroPython software are published under the MIT license.
SB Components: A Company That Keeps Choosing WIZnet
SB Components develops and sells embedded hardware for Raspberry Pi, RP2040/Pico, Arduino, and ESP32 platforms. GatePi is not a one-off personal project — it is part of a commercial product lineup where WIZnet chips appear repeatedly.
Other WIZnet-based products from SB Components include:
- NetPi — A W5100S-based Ethernet HAT for Raspberry Pi Pico/Pico W. Featured on maker.wiznet.io.
- ESPi — An ESP32-WROOM-32 development board with Ethernet, TFT display, and joystick. W5100S documentation is included in the repository.
This makes SB Components a recurring WIZnet adopter — not a single use case, but a consistent design choice across their network product family.
WIZnet's Role: W5100S Turns a Local Controller into a Networked Device

In this project, W5100S is not a peripheral feature — it is the component that defines what the product can do.
Without W5100S, GatePi would be a capable local relay controller. With W5100S, it becomes a wired Ethernet-connected remote IO device that can be reached, controlled, and monitored over a network.
Why Hardwired TCP/IP Matters Here
W5100S integrates a complete TCP/IP stack in hardware. The RP2040 does not implement any networking protocol in software — it simply reads and writes W5100S socket registers over SPI, and W5100S handles all Ethernet and TCP/IP processing internally. This keeps the RP2040 free for relay control, RS485 communication, and application logic.
How It Works: DHCP in Three Lines of MicroPython
The firmware runs on MicroPython. Ethernet initialization uses the built-in network.WIZNET5K driver — no third-party library required.
from machine import Pin, SPI
import network
spi = SPI(0, baudrate=5_000_000, polarity=0, phase=0,
mosi=Pin(19), miso=Pin(16), sck=Pin(18))
cs = Pin(17, Pin.OUT)
reset = Pin(20, Pin.OUT)
nic = network.WIZNET5K(spi, cs, reset)
nic.active(True)
nic.ifconfig('dhcp')
print("IP:", nic.ifconfig())Relay control is equally straightforward:
from machine import Pin
relay_pins = [24, 25, 26, 27, 28, 22]
relays = [Pin(p, Pin.OUT) for p in relay_pins]Combining these two layers with an HTTP or MQTT handler produces a fully functional remote relay control system. The overall architecture looks like this:
Why This Project Stands Out
- Commercial product, not a prototype: GatePi is a shipping product from SB Components, with full KiCad hardware design files and MicroPython software published openly. The reproducibility and reliability bar is higher than a typical community project.
- RP2040 + W5100S: Adding a hardwired TCP/IP stack to the dual-core RP2040 delivers stable wired Ethernet without any software networking overhead. MicroPython's built-in
network.WIZNET5Kdriver keeps the integration minimal. - Three interfaces, one board: Relay output, RS485, and Ethernet in a single compact form factor directly maps to the "collect from field devices, control actuators, report over network" pattern needed in industrial environments.
- Recurring WIZnet adoption: SB Components uses WIZnet chips across multiple products. For WIZnet, this represents a partner that has validated the chip family across different platforms and use cases.
Use Cases
- Building automation: Remote control of lighting, HVAC, and access control via 6-channel relay over Ethernet
- Industrial field control: Read RS485 sensor and meter data, forward over Ethernet, trigger relay outputs based on thresholds
- RS485-to-Ethernet gateway: Bridge legacy RS485 industrial devices onto modern IP networks
- Energy management: Combine RS485 power meters with relay-controlled circuit breakers on a single board
- Smart agriculture: Remote pump, ventilation, and lighting control with RS485 sensor data collection
Related Projects on maker.wiznet.io
Several WIZnet-based projects on maker.wiznet.io share context with GatePi.
NetPi - Ethernet HAT for RPi Pico — Another SB Components product using W5100S, designed as a pure Ethernet expansion HAT for Raspberry Pi Pico. Where NetPi adds Ethernet to Pico, GatePi builds on that foundation and adds relay control and RS485 — making them natural companions in the same product family.
Programmable IoT Edge ESP32 Ethernet IO Module — An ESP32-based industrial Ethernet IO module supporting Modbus TCP, MQTT, and Profinet. Similar in purpose to GatePi as a networked industrial IO device, but ESP32-based with a broader protocol stack.
WizOnOff — A 4-channel relay automation board based on WizFi360-PA. Shares the relay control concept with GatePi but uses Wi-Fi rather than wired Ethernet — a direct contrast in connectivity approach.
Sensoco Ethernet Gateway — A W7100A-based Ethernet gateway. Like GatePi, it has a gateway character, but focuses on bridging wireless devices to Ethernet rather than direct relay and RS485 control.
Tech Stack Summary
| Item | Details |
|---|---|
| MCU | RP2040 (dual-core Cortex-M0+) |
| Ethernet Chip | WIZnet W5100S (Hardwired TCP/IP, SPI interface) |
| Relay | 6-channel (GPIO22, 24–28), NO/COM/NC |
| Industrial Comm | RS485 (UART0, GPIO0/1) |
| Indicators | RGB LED (GPIO4), Buzzer (GPIO2) |
| Development | MicroPython, Thonny IDE |
| Manufacturer | SB Components (UK) |
FAQ
Q. Does W5100S use a hardwired TCP/IP stack? Yes. W5100S integrates a complete TCP/IP stack in hardware. The RP2040 communicates with W5100S over SPI by reading and writing socket registers — no software TCP/IP implementation is involved on the MCU side.
Q. Why wired Ethernet instead of Wi-Fi? In environments where stability matters — relay control, industrial equipment, building systems — wired Ethernet is the more reliable choice. It eliminates wireless interference and connection variability, which is exactly the kind of environment GatePi is built for.
Q. Can RS485 and Ethernet run simultaneously? Yes. RS485 uses UART0 (GPIO0/1) and W5100S uses SPI0 (GPIO16–20) — they operate on separate buses independently. Combining them enables an RS485-to-Ethernet gateway where field device data is collected via RS485 and forwarded over the network.
Q. How does GatePi differ from NetPi? Both are SB Components products using W5100S. NetPi is an Ethernet expansion HAT for Raspberry Pi Pico — Ethernet only. GatePi adds a 6-channel relay and RS485 on top, making it a complete control and communication platform rather than just a connectivity module.
Q. Is remote relay control available out of the box? The published examples cover Ethernet initialization, relay control, and RS485 communication as separate demos. Combining these with an HTTP or MQTT handler — both well-supported in MicroPython — enables a fully remote relay control system with minimal additional code.
Project Links
- GitHub (Software): sbcshop/GatePi-Ethernet-Software
- GitHub (Hardware): sbcshop/GatePi-Ethernet-Hardware
- SB Components: https://shop.sb-components.co.uk
- WIZnet W5100S: https://docs.wiznet.io/Product/Chip/Ethernet/W5100S

