R Pi 4 Temperature and Load Log


I have been experimenting with PWM and the Pimorini Fan Shim.  I will make a Zip of the Python once I and fully debugged it and put here..   The result is shown in the window above.  The aim is to keep the cpu at between 61 and 69C and to exercise the fan as little as possible when the R Pi 4 is inactive.  

One issue has been choice of pwm parameters to ensure fan runs at all and smoothly another has been a good compromise between spped of responce when cpu is running on 100% and avoiding needless operation of fan when R Pi is relativly inactive.

I am fairly sure have cracked this so I will run this set upfor a week or so and publish the script after that.  However please email to if you wnat a copy before that or any info on methods used.

Ref: Support PWM to control speed? #22 on Pimorini Fan Shim Support

Implementation and CSV File

Above implemented in Python3 using a rotating buffer that is sent data on every cycle and only remembers the last 200 sets and then sends an html file here with those last 200 sets of data. Kind of useful for keeping an eye on something. The buffer can also make a csv file so that the data can be more easily analysed at a later date.   Whether the top line of the buffer is overwritten or not depends on whether the Fan is running.  So you will see that when the cpu is cool no lines are added but the top line gets overwritten every few seconds.

I use separate modules for items such as the Class that does the buffer to make them more easily re-usable.

I find this buffer to html file to website arrangement very useful when I want to remote monitor what is happening.

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:

Software Set Up

This is my collection of commans I have accumulated that I need to get an R Pi working for me.