PiKVM using a RPi 2 Model B

2024-07-31

Post about designing and assembling a DIY KVM system with pikvm to monitor PCs in my homelab.

Motivation

Beginning of this year, I decided to use all my collected SBCs to build the projects I had in mind for so long (typical G.A.S). For some of these SBCs I don't even had a concrete plan/project identified yet. As an example, I had a RPi 2 Model B catching dust in one of my drawers. This board, however, is rather limited in comparison to what you would normally use for RPi projects today (like home automation or print server). Similar to the RPi 2 Model B, I bought an euro box (case) some years back that now should find its way as a case in this project. Okay, these are the constraints for the project I would like to realize. But what shall I do with this setup?

As tinkering with my homelab, I always have the need to remotely monitor a machine in my basement. Most of my machines in my homelab don't have a graphical environment but terminal. Would be nice to capture the 'screen' from a terminal without the need for X11 or Wayland desktop (ie. TigerVNC). Fortunately, I came across a post by Joel (aka TuM'Fatig) describing how he is using a RPi Zero 2W for creating a KVM (keyboard, video, and mouse) over IP. From performance perspective these two SBCs are comparable, so using my RPi 2 in a similar setup seems to be feasible. Checking out the PiKVM V1 instructions, I've realized that I need some additional components especially to capture the video signal and provide a keyboard and mouse input. In addition, the case needs some preparation to carry the electronic components. So let's get started.

Electronics

All in all, I followed the build instruction for the DIY PiKVM V1 without ATX. That means the setup consists of the following parts:

Most of these things I had already lying around. I envisioned to connect the RPi with an angled micro USB cable (open ended) to solder a power jack that can be mounted in one of the side walls of the case. I also ordered a angled micro USB cable for the RPi Pico that can be mounted (USB A) with two screws directly into the side wall. I also ordered the parts for the keyboard, video, and mouse inputs. The complete shipping of all parts takes some time, especially the RPi Pico needs 6 weeks to be shipped. Thus, I started to design the parts for the case.

Case

The two main parts that need to get designed and adapted for the case were a base plate for carrying the RPi 2 and the CSI to HDMI card, and one side wall. For getting the base plate correct, I've used the sketch for the euro box with measurements. My design consists of a rather simple rectangle with holes for mounting the plate to the case and for mounting the electronics. The case as such was not equipped with any drill holes thus I used hot inserts (for the first time) to meld the metal drill holes into the case. Using a soldering iron with 200 degrees is more than enough (lacking a proper hot insert machine) for that purpose. In the meantime the CSI to HDMI adapter arrived. I packaged everything together and mounted it within the case.

For designing the side wall I used Tinkercad where I picked up the dimensions from the physical object as well as from the sketch. The side wall has some 7.5 mm radius where I need to ensure to make it correct in Tinkercad because it measures circles with the diameter. I also used a self printed radius gauge to cross check the radius. In the end I just set holes for the RPi USB, Ethernet as well as the other accessories. All in all, I need three prototypes from that side wall until all dimensions were correct.

Assembly

As already said, I was using the build instructions of PiKVM which includes

Putting it all together and powering up with a regular power supply. A first test run was successful. However, the RPi runs in under voltage issues.

Summary

When the components gets delivered it was just one afternoon to finish the project. The PiKVM documentation is great and easy to follow. I don't need to redo the wiring or anything else it just works.

Gallery

Case with hot inserts
Top view with electronics
Front view with electronics
Cables attached

Links

PiKVM using a RPi Zero 2W by TuM'Fatig
DIY PiKVM V1 Instructions
piKVM side A @ Tinkercad
Radius gauge @ Printables
Euro Box Sketch

Thanks for reading. Feel free to send comments, questions, or recommendations via Mail.