As enterprise organizations continue investing in AI, there is growing value in creating environments where teams can safely experiment with models, optimize infrastructure, and better understand the operational realities of running AI workloads. While production environments often receive the most attention, many of the lessons learned begin in smaller lab environments where engineers solve practical challenges that ultimately scale into broader enterprise thinking.
As you might know from one of my previous blogs, I set up a budget AI inference server locally. It has been a great platform for running and testing various models while also giving me the opportunity to fine-tune a few of them.
As I mentioned in that post, I’m using an NVIDIA P40. It’s a data center GPU that has no self-contained cooling. It’s considered a blower-style card, meaning it relies on external airflow across the heatsink to keep temperatures under control. In a data center, that’s not an issue. In a consumer PC case with limited airflow, however, it meant I had to keep a close eye on temperatures.
To keep the card cool during heavier workloads like model training or extended inference sessions, I needed a dedicated cooling solution. Unsurprisingly, I’m not the first person to run a P40 in a homelab, so there were already some helpful community guides available. The solution required two primary components: a custom shroud and a PWM blower fan to force air across the heatsink. I found a 3D-printable shroud design online and had a friend print it for me.
Once everything was installed, I connected the blower fan to a motherboard system fan header, assuming fan control would be straightforward. Unfortunately, while the BIOS could detect and adjust the fan, it didn’t offer the level of control I wanted. I also explored managing the fan through the operating system, but my motherboard only exposed fan monitoring, not fan control.
The best workaround I could manage was configuring the BIOS to estimate GPU cooling needs based on CPU temperature, with a healthy margin of safety. It worked, but the fan spent most of its time running much faster than necessary. The result was significantly more noise than I’d have liked. And, trust me, this blower fan wasn’t exactly quiet.
Back to the drawing board.
After talking through the problem with Claude, I landed on what turned out to be a much better solution: using an Arduino to directly control the PWM fan based on actual GPU temperature readings from nvidia-smi.
Since I already had a spare Molex connector available, I wired the fan’s 12V power directly from that source, shared a common ground between the Arduino, fan, and computer, and connected the PWM signal to a PWM-capable Arduino pin. The Arduino itself connected back to the server over a standard USB cable, which also provided power to the board.
With a little AI-assisted development, I had a working controller.
The Arduino code is available here:
https://github.com/rsarv3006/fan-controller
I had previously written a GPU temperature monitoring script that used API Alerts to notify me if temperatures became elevated. I expanded that script to also send control messages directly to the Arduino, allowing the fan speed to follow the GPU temperature rather than relying on rough CPU-based estimates.
That code is available here:
https://github.com/rsarv3006/gpu-temp-monitor
Now the fan follows an actual temperature curve based on the GPU’s workload. Most of the time it runs significantly quieter, while still ramping up appropriately when the card is under sustained load. It’s a better experience for the hardware, better for the room the server lives in, and a much more elegant solution overall.
Projects like this are a good reminder that AI infrastructure isn’t just about selecting the right model. It’s also about solving the operational challenges that make experimentation practical, repeatable, and sustainable. Whether you’re running a single inference server in a lab or supporting enterprise AI initiatives at scale, thoughtful infrastructure decisions often have an outsized impact on performance, reliability, and long-term success.
At RBA, we help organizations think beyond AI models alone, helping design the infrastructure, governance, and operational foundations needed to successfully scale AI initiatives across the enterprise.
About the Author
Robby Sarvis
Senior Software Engineer
Robby is a full-stack developer at RBA with a deep passion for crafting mobile applications and enhancing user experiences. With a robust skill set that encompasses both front-end and back-end development, Robby is dedicated to leveraging technology to create solutions that exceed client expectations.
Residing in a small town in Texas, Robby enjoys a balanced life that includes his wife, children, and their charming dogs.