The Verdict: Which Raspberry Pi Ethernet Cable and Setup Wins?

If you are building a hardwired embedded sensor node, the default choice for your raspberry pi ethernet cable and physical layer must be a Cat6 UTP Solid Copper cable terminated to T568B, paired with a Raspberry Pi Pico H and a Wiznet W5500 SPI Ethernet module.

While Wi-Fi is convenient, hardwired Ethernet eliminates RF interference, drops the power budget by roughly 40% compared to a Pi Pico W transmitting over 2.4GHz, and guarantees latency for industrial or greenhouse monitoring. Skip flat "slim" Cat6 cables (they are often stranded Copper Clad Aluminum, which suffers from severe voltage drop if you ever add Power over Ethernet) and avoid Cat5e for new runs due to higher alien crosstalk at modern switching speeds. Terminate to the T568B standard, as it is the default for 95% of commercial and residential patch panels in the US and EU.

Direct Answer: Buy a 1000ft spool of 24 AWG Solid Copper Cat6 UTP (approx. $130) and pass-through RJ45 connectors. Do not buy pre-terminated CCA (Copper Clad Aluminum) patch cords for permanent in-wall or conduit runs.

Parts List & Specifications

This build targets the Raspberry Pi Pico H (the variant with pre-soldered castellated headers, saving you 20 minutes of surface-mount soldering). The W5500 chip handles the entire TCP/IP stack in hardware, offloading the RP2040 dual-core processor.

Component Exact Variant / Model Est. Cost (2026)
Microcontroller Raspberry Pi Pico H (RP2040, pre-soldered headers) $5.00
Ethernet PHY/MAC Wiznet W5500 SPI Module (USR-ES1 or standard breakout) $8.50
Ethernet Cable 24 AWG Solid Copper Cat6 UTP (T568B) $0.15/ft
Connectors RJ45 Pass-Through Connectors (Cat6 rated, 3-prong) $0.20/ea
Firmware MicroPython v1.23+ for RP2040 Free

Pin Mapping: Pico H to W5500 SPI

The W5500 communicates via SPI. The RP2040 has two SPI peripherals; we will use SPI0. The most critical pin here is SCSn (Chip Select). If this pin floats or is miswired, the W5500 will ignore all clock signals, resulting in silent initialization failures.

Raspberry Pi Pico H Pin W5500 Module Pin Function & Notes
GP16 (Pin 21)MISOSPI0 RX (Master In, Slave Out)
GP19 (Pin 25)MOSISPI0 TX (Master Out, Slave In)
GP18 (Pin 24)SCLKSPI0 Clock
GP17 (Pin 22)SCSnChip Select (Active LOW)
GP20 (Pin 26)RSTnHardware Reset (Active LOW)
3V3(OUT) (Pin 36)VCC3.3V Power (W5500 draws ~130mA peak)
GND (Pin 38)GNDCommon Ground

Step-by-Step: Wiring and Cable Termination

  1. Strip the Cat6 Jacket: Use a dedicated cable stripper to remove 1.5 inches of the outer jacket. Do not score the inner twisted pairs; a nicked 24 AWG solid copper wire will snap when pushed into an RJ45 plug.
  2. Untwist and Arrange (T568B): Untwist the pairs only as far as necessary (max 0.5 inches to maintain impedance). Arrange left-to-right: White-Orange, Orange, White-Green, Blue, White-Blue, Green, White-Brown, Brown.
  3. Trim and Insert: Cut the wires flush. Push them into a pass-through RJ45 connector until the copper ends poke out the front. Verify the jacket extends fully into the rear of the connector for strain relief.
  4. Crimp and Test: Use a pass-through crimping tool. The tool will trim the excess copper and crimp the 3-prong contacts simultaneously. Test with a basic continuity tester to ensure all 8 pins map 1-to-1.
  5. Wire the SPI Bus: Connect the Pico H to the W5500 using 22 AWG silicone jumper wires. Keep SPI traces under 10cm to prevent signal reflection at 1MHz+ clock speeds.

Complete MicroPython Code for DHCP & Static IP

This code targets the Raspberry Pi Pico H running MicroPython v1.23+. It initializes the SPI bus, attempts a DHCP lease, and includes robust error handling to fall back to a static IP if the DHCP server times out—a common issue on isolated test benches.

import network
import machine
import time

# --- Pin Definitions for Raspberry Pi Pico H ---
SPI_SCK = 18
SPI_TX  = 19
SPI_RX  = 16
ETH_CS  = 17
ETH_RST = 20

# Initialize SPI0 at 1MHz (W5500 supports up to 80MHz, but 1-10MHz is safer for breadboards)
spi = machine.SPI(0, baudrate=1000000, polarity=0, phase=0,
                  sck=machine.Pin(SPI_SCK),
                  mosi=machine.Pin(SPI_TX),
                  miso=machine.Pin(SPI_RX))

# Initialize the WIZNET5K network interface
nic = network.WIZNET5K(spi, machine.Pin(ETH_CS), machine.Pin(ETH_RST))
nic.active(True)

print("Attempting DHCP connection...")
try:
    nic.ifconfig('dhcp')
    
    # Poll for connection with a strict 10-second timeout
    timeout = 10
    while not nic.isconnected() and timeout > 0:
        time.sleep(1)
        timeout -= 1
        
    if not nic.isconnected():
        raise TimeoutError("DHCP timeout: No offer received from server.")
        
    print("DHCP Success! Network Config:", nic.ifconfig())

except Exception as e:
    print(f"Network Error: {e}")
    print("Falling back to Static IP configuration...")
    
    # Fallback Static IP: (IP, Subnet, Gateway, DNS)
    static_ip = ('192.168.1.50', '255.255.255.0', '192.168.1.1', '1.1.1.1')
    nic.ifconfig(static_ip)
    print("Static IP Applied:", nic.ifconfig())

# Keep the script alive to maintain the link state
while True:
    time.sleep(5)
    # Optional: Add sensor reading and MQTT publishing here

For deeper hardware-level register debugging, consult the official Wiznet W5500 Datasheet, which details the internal 32KB TX/RX buffer allocation.

Debugging: Cable Faults and Network Errors

When your Pico fails to connect, the MicroPython REPL will typically throw one of two errors. Here is the exact decision path to resolve them.

First 3 Things to Check When It Fails

  1. The Chip Select (CS) Pin: If GP17 is loose, the Pico will initialize the SPI bus but the W5500 will ignore it. Measure voltage on the SCSn pin; it should pulse LOW during initialization.
  2. Cable Continuity (All 8 Pins): Ethernet requires all 8 wires for modern auto-MDIX negotiation and PoE. If your cheap crimping tool missed pin 4 or 5 (the blue pair), the link light on the switch will stay dark.
  3. Switch Port Isolation/VLAN: If plugging into a managed switch, ensure the port isn't assigned to a guest VLAN that blocks DHCP broadcast packets.

Error Decision Tree

Exact Error String Root Cause Fix
TimeoutError: DHCP timeout Physical link is up, but DHCP server is unreachable or blocking unknown MAC addresses. Check router MAC filtering. Verify the W5500 MAC address isn't colliding with another device on the LAN.
OSError: [Errno 113] EHOSTUNREACH IP assigned, but gateway is unreachable. Usually a subnet mask mismatch or bad cable pairs. Verify T568B on both ends. Ensure the static IP gateway matches your router's actual IP.
OSError: [Errno 116] ETIMEDOUT SPI bus initialized, but W5500 internal PHY failed to negotiate link speed with the switch. Hard-reset the Pico. Some older 10/100 switches struggle with W5500 auto-negotiation; force 10Mbps in switch settings if possible.

For advanced cable validation, reference the Fluke Networks cabling guidelines, which detail how bent pairs at the RJ45 entry point cause return-loss failures at high frequencies.

Extending and Simplifying the Build

How to Simplify: If you do not need the ultra-low power footprint of the RP2040, abandon the SPI module entirely. Use a standard Raspberry Pi 4 Model B or Pi 5. They feature an integrated Gigabit MAC/PHY connected via PCIe (Pi 5) or USB 3.0 (Pi 4). You simply plug the Cat6 cable directly into the RJ45 jack and use standard Linux dhcpcd or NetworkManager. No SPI wiring or MicroPython network drivers required.

How to Extend: To eliminate the 5V USB power cable, upgrade to Power over Ethernet (PoE). You cannot feed 48V PoE directly into the W5500 module's RJ45 jack without frying it. You must insert a PoE Splitter (48V to 5V/1A) inline with your Cat6 cable before it hits the W5500. Alternatively, use a dedicated W5500+PoE integrated breakout board (like the Waveshare PoE ETH module) which includes the flyback transformer and rectification circuitry on the PCB. This allows you to run a single Cat6 cable to a remote greenhouse sensor node, delivering both data and 5V power up to 100 meters.