MuPiBox Documentation MuPiBox NG

Fan

Run a temperature-controlled fan on a GPIO pin – thresholds for 25, 50, 75 and 100 percent, hardware PWM and wiring.

Under Hardware → Fan you control a fan depending on the temperature, as on MuPiBox Classic.

Fan

Settings

SettingDefault
Fan GPIO (BCM)12 (physical pin 32)
25 % from45 °C
50 % from55 °C
75 % from65 °C
100 % from75 °C

Below the 25 % threshold the fan stays off. The thresholds must be ascending. The page shows the CPU temperature, the temperature of the MuPiHAT chip and the current fan speed.

Wiring

A fan needs more current than a GPIO can deliver. Connect it through a transistor/MOSFET or a fan module; the GPIO only controls it.

Hardware PWM

In Hardware → Fan → Hardware PWM, you can explicitly add the overlay on supported Raspberry Pi 3/4 devices. Existing conflicting PWM overlays are rejected and a reboot is needed. Merely enabling the fan does not edit config.txt. GPIO12 and GPIO13 are independently controlled, including a fan on GPIO13 and a power LED on GPIO12.

With the overlay dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4 the box controls the fan and power LED on GPIO12/13 smoothly and quietly with hardware PWM. Without the overlay it switches the fan in software. See the GPIO reference.

Disable: The Disable hardware PWM action removes only the block managed by MuPiBox. Custom or externally configured PWM overlays are never deleted. Returning to software PWM also requires a reboot. The overlay is shared with the PWM-capable power-button LED on GPIO12/13; the Buttons & LEDs page links to this single configuration.

© 2026 MuPiBox