This is a remix of the original Case published here: https://docs.pikvm.org/stl/v3.3/
The original case is just fine when placed into one of those dedicated server rooms which tend to be extremely loud with hundreds of fans of all sizes screaming at you with insane RPMs.
The PiKVM is a great device, there is no doubt about that. I use one in my lab which is in general completely silent. The original 3D printed case allows room for a 30mm fan which is powerful enough to keep even the Pi4 cool. However, I could not find any high quality fan of this size. Manufacturers known to make perfect fans do not have a 30mm model, they start at 40mm.
The 30mm one I got off of Amazon is crap and I had no idea which ones are good since they are all made by unknown brands.
So I decided that I wanted to use a 40mm fan to keep the PiKVM unit cool. This required some modifications to the "A" part of the 3D printed case.
This is a description of all the changes I made.
I loaded the publicly available STL file into Onshape because Debian decided to remove FreeCAD completely from Debian Testing, which happens to be my main OS. I wanted to try Onshape for a while now and FreeCAD drives me insane anyway.
I just cut out a 41mm squared block and made sure that there are means to bolt the fan onto the case. It sticks out a little bit but the case is still able to sit flat on the table. The fan is placed so that it evacuates the case just like in the original design.
There is also a small spacer for the fan because I only had M4x30 screws and they were about 5mm too long and were going to hit the mainboard. If there are M4x25mm screws available the spacer can and must be removed.
First I tried the on board fan header. It worked but in the area of about 25% to 33% the RPMs of the fan kept oscillating and this was audible. Above and below it was fine but all in all not perfect.
I tried hooking up the fan to 5V and connecting its PWM line to the fan header. This did not yield the desired results. Time for some thinking, reading and additional hardware.
I got myself my first oscilloscope, read everything I could find on the design of the PiKVM's fan header and put the conclusions together.
I tried connecting the PWM line to GPIO pin 12 which is used in PWM mode to drive the fan header anyway and it worked out of the box. Using the built in fan controller I could control the fan from 5% (yes, five, not fifty and it ran smoothly) all the way up to 100% without any issues whatsoever. Note: per default the pin ist set to a so called “PWM Balanced” mode. This mode violates the specification of how the PWM pin of a fan is to be used. However.. the Noctua fan didn't care and performed its task perfectly. Noctua fans are awesome. You may think that I could call it a day but no, there is more.
There was a tacho line dangling unused at the fan and the fan controller has an option to specify an RPM pin to watch over the fan. So I picked a free GPIO pin (I chose 25) and connected the tacho line to it. It did not work. The oscilloscope showed that the signal on that line was garbage. With my limited background in electrical engineering I tried a 1k pull up resistor and behold, it worked! Further reading about pull up resistors revealed that they are usually between 10k and 100k. So my 1k was not perfect and I switched it for a 47k resistor. It did work but the signal was strangely deformed like there was a voltage divider at play here. I read some more about internal pull up resistors of the Pi4 and realized that the pin was set to utilize a 50k pull down resistor. The 1k I tried at first overruled it completely but the 47k one compared with the 50k internal one indeed acted as a voltage divider. So I changed the config to pull up, removed the 47k external pull up and the signal was as clear as can be. No need for an additional part. The fan controller worked perfectly with the modifications.
Noctua fans have a standardized wire color scheme.
There is only one place where the default configuration needs to be adapted to work perfectly.
The configuration for the fan controller:
[root@pikvm ~]# cat /etc/conf.d/kvmd-fan
KVMD_FAN_ARGS="--verbose --speed-idle 5 --speed-low 5 --temp-low 30 --speed-high 50 --temp-high 55 --temp-hyst 3 --hall-pin 25 --hall-bias 2"
All in one line. The big fan is much more powerful than any 30mm variant so the speeds as well as the temperatures are lower.
This is a complete list of all the additional parts I used
Follow these easy steps to put it all together.
Now my lab will be silent again. At ~24% power the temperature settles at ~40°C. I have to put the modified PiKVM as close as 20mm to my ear in order to hear it as loud as the unmodified one that resides in a closed rack that is placed around the corner and needs 50% power to hold the same temperature. It is actually louder with lower power settings because the higher magnetic force keeps it from rubbing on its own frame.
The author remixed this model.