nus-sps / earth-sensors-article

SP3275 Raspberry Pi and CO2 + BME688 sensor codebase
https://sps.nus.edu.sg/sp3275/raspberrypi-and-sensors/
GNU General Public License v3.0
1 stars 1 forks source link

Possibility of hitting Pi Operational Heat Limit while in fieldwork #2

Open SungMatt opened 1 year ago

SungMatt commented 1 year ago

During the AY22/23 run of SP3275, some groups encountered hot heatsinks and suddenly terminating data collection, that heating was a concern.

We can look into implementing a diagnostics tool to report the current working temperature of the Pi. Operating conditions of the Pi is -20ºC to 85ºC.

GPU Temp: vcgencmd measure_temp

CPU Temp * 1000 = cat /sys/class/thermal/thermal_zone0/temp

To-Do Test if a Pi in the hot sun would hit the temperature limit

SungMatt commented 1 year ago

Quick monitoring script:

#!/bin/bash
# Script: my-pi-temp.sh
# Purpose: Display the ARM CPU and GPU  temperature of Raspberry Pi 2/3 
# Author: Vivek Gite <www.cyberciti.biz> under GPL v2.x+
# -------------------------------------------------------
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$(date) @ $(hostname)"
echo "-------------------------------------------"
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)"
echo "CPU => $((cpu/1000))'C"
mingyi456 commented 1 year ago

From the official documentation, image the vcgencmd measure_temp command should suffice for both the CPU and GPU temperature even though vcgencmd is technically talking to the GPU. (I also think this is the only use for the GPU in the RPi, given that even now I do not find hardware accelerated video playback works). From my own testing, the temperature being output of this command indeed rises significantly when running a CPU load (via stress -c 4), which should not be the case if it is measuring GPU temperature only.