Modified Pimorini Fanshim Code for slower Quieter running using PWM

Cloned the official code and made minimal changes so it runs at 80% speed instead of 100%. 

Especiallly with the Pi making less heat due to recent firmware changes this lower speed is more than sufficient and is far quieter.   For example at at 1100% Load Test for 15 minutes using the 80% speed the CPU temperature settled at 59C.

See the Readme files at and  and also

In February 2020 checked out the changes on an R Pi 4 running Volumio (a specialized Media Player OS from ) and added the necessary extra notes to get Python3 working on that minimal Jessie based system.  

R Pi 4 Pulse Width Modulated (PWM) Speed Control of Pimorini Fanshim Fan

r pi with pimorini fanshim fan

Get code for Pimorini Fanshim PWM Control

To install from my GitHub Repository:

The later repository at  has a simpler appraoch using minimal changes to the original Pimorini Fanshim Code.  The REadMe in that repository also has info about installing on other OS such as Volumio.

For full instructions click on READ MORE below.  These explain how to set the code to run automatically at start up.

An example of the HTML file that the code saves in /home/pi/fanshim is shown in the image above.  In this case the R Pi was being used as a desktop. 

The csv log file also shows several 15 minute runs of a 100% stress test and prolonged periods with the R Pi 4 very inactive.

This code as the stable version I had tested for several days on December 3rd 2019.  ( Output of version under development see )

Any comments or queries please email me at .

Software Set Up

This is my collection of commands I have accumulated that I need to get an R Pi working the way I like it.


Raspberry Pi Cheat Sheet for Dataplicity/Tmux/Nginx/Cloud Commander


This article is deliberately brief see the links below for more detail and a full understanding of Dataplicity/Nginx/Cloud Comander and Tmux.

The combination of these has allowed me to run a Python Script at a community centre that controls the heating and monitors tempreatures.  It has run 24/7 for many weeks.  I am able to connect from anywhere and minitor its operation, restart the script if there has been a power interuption and monify the script to try out changes or and fix bugs.


Get set for running Python Control Program: