Cheap 2-computer switch for PIKVM

Hardware & firmware

Idea

The need for this hardware arose when I bought a PIKVM v4 mini and wanted to control two PCs. I really wanted to be able to forward the POWER, RESET buttons, and LEDs to the chosen computer for easy control of the target. I looked it up, and there already were several solutions that relied on an RP2040 being connected to the PIKVM via USB and exposing the target computer’s power and reset via its GPIO. Unfortunately, I couldn’t use them in my use case, as the PIKVM v4 mini doesn’t have a USB port that can be used as a host port. The non-mini version does have this port but is more expensive…

This board implements a PIKVM ATX signal mux for two computers. It can be easily extended for more. The mux is realized by an analog switch IC that bridges the four ATX signals to the PIKVM ATX port on demand. Additionally, the board features an audio jack for signaling an external HDMI switch that I use in my homelab.

ATX switch board

The board features an RP2040 devboard with an Ethernet port with an HD44780 LCD for displaying the current status and three RJ45 ports. The one on the left is the ATX port, which goes to the PIKVM, and the two on the bottom go to the target PCs. This board is powered via the DC jack on the bottom with 5V. This board features a 3.3V voltage regulator U9, which can be omitted after soldering R20 to 0R. In this case, the devboard’s internal regulator is used.

PCI Slot Board

This is a helper board I used to connect the second PC to the switch board the same way the first one, which uses the original PIKVM PCI slot board. I designed mounting holes and the position of the RJ45 port to be compatible with popular Intel gigabit network cards. I literally bought some PCI brackets for Intel network cards off eBay.

PIKVM integration

I modified the PIKVM’s kvmd daemon to add support for this board in the GUI interface. The modified daemon is available in my fork. It allows controlling the switch board via the following panel:

Firmware

The firmware is written in MicroPython and runs on the RP2040-based W5500-EVB-Pico devboard. It exposes a REST API over Ethernet for controlling the ATX signal mux and the external HDMI switch.

API endpoints:

Endpoint Method Description
/switch POST Switch both ATX output and HDMI switch
/switch/atx POST Toggle ATX output between PC1 and PC2
/switch/kvm POST Pulse the external HDMI switch
/atx POST Set ATX output to a specific PC (0 or 1)
/atx GET Get the current ATX output selection