How Stratux fan control works: a 50 °C target

November 2, 2026 · 3 min read

The Stratux fan program tries to hold the CPU at 50 °C. Below that the fan idles at about 1% duty, and it speeds up as the CPU gets hotter. It checks the temperature every 5 seconds.

Open white Stratux case with a Raspberry Pi 3B seated inside and a cooling fan beside it on a workbench
An illustrative scene made from photos of the real parts. It is not a photo of a finished build.

The fan is a thermostat that never fully stops

The fan program, fancontrol, runs a feedback loop instead of a simple on/off switch. Each cycle it reads the CPU temperature, compares it with the target, and sets a fan speed. The values below come from the Stratux source, read on 2026-11-02.

Four steps: read the CPU temperature every 5 seconds, compare with a 50 °C target, a PID controller sets the speed, PWM drives the fan on GPIO pin 18
The fan control loop, as it appears in the Stratux source.
Setting Value in the code
Target CPU temperature 50 °C (defaultTempTarget)
Update interval 5,000 ms
PID gains (P, I, D) 0.2, 0.2, 0.1
Output range 0 to 100% duty
Below the target about 1% duty, so the fan never fully stops
Minimum duty (PWMDutyMin) 0 by default
Fan pin GPIO 18 (BCM numbering), driven with PWM

A PID controller adds three terms: how far the temperature is from the target, how long it has been off, and how fast it's changing. That's why the fan ramps up smoothly as the CPU passes 50 °C, instead of jumping between off and full speed. You'll usually notice it spinning up somewhat above 50 °C, which is where the "about 55 °C" figure comes from.

What you can change

Two settings matter if you want to change the fan: the minimum duty cycle and the target temperature. The web interface exposes the first. The second is a command-line flag.

  • Minimum fan duty cycle (PWMDutyMin, default 0): set on the Settings page and passed to the fan program.
  • Target temperature: the fancontrol program accepts -temp. It also accepts -minduty, -frequency and -pin. This is for advanced users. Whether you can set the target from /boot/firmware/stratux.conf isn't confirmed, so don't count on it.
  • Fan wiring: the fan's PWM line uses GPIO 18, which is physical pin 12 on the Pi header. Check the polarity when you connect it, and don't reverse the leads. Red goes to +.

What this means for a hot cockpit

Airflow decides how well the loop works, because the fan can only move air the case lets through. Keep the side vents clear, and keep the unit out of direct sun on the glareshield when you can. If a unit goes dark after a few minutes, check for heat first. A fan helps more than case colour, according to the power guide. Printing your own case? The 3D-printed cases guide covers filament that survives a hot cockpit. Inside Stratux shows where the fan sits.

Raspberry Pi 5: no fan control reported

The standard board is the Raspberry Pi 3B or 3B+. A Pi 4 works, but it runs hotter. On a Pi 5, community reports say the fan doesn't work. There's no Pi 5-specific code in the fan program. It uses the same go-rpio library and GPIO 18 default as on other boards, and nobody's documented why it fails. If you run a Pi 5, treat it as unsupported for fan control until a maintainer confirms the cause.

Frequently asked questions

At what temperature does the Stratux fan turn on? It never fully switches off. The program aims to hold the CPU at 50 °C. Below that, it keeps the fan at about 1% duty, then speeds up as the CPU gets hotter.

Can I change the target temperature? Yes, from the command line. The fancontrol program takes a -temp flag for the target. The Settings page only exposes the minimum fan duty cycle.

Does fan control work on a Raspberry Pi 5? The fan program has no Pi 5-specific code, and community reports say the fan doesn't work on a Pi 5. Nobody has documented the cause.

Is a fan really needed? Stratux runs hotter in direct sun and with blocked vents. If a unit goes dark after a few minutes, check heat first, because a fan helps more than case colour.

Next step

Open your case, check that the fan spins freely and its red lead goes to +. Then see Inside Stratux for the full parts list.