raspberry pi 4 cpu temperature observations

The short video above shows the Adafruit Feather displays attached to the Raspberry Pi 4, along with the micro:bit and scroll:bit I wrote about last post. The Adafruit Feather work was done over a year ago. You can find and read about it in the section Golang.

Basically I’m using the USB as well as the GPIO/I2C connections to drive a number of devices. In one terminal I have tempmonitor.py running, and in another I have a Bash script, clock.sh, running. The Bash script uses some of the Go developed apps to manipulate the Adafruit Feather displays using I2C. The Bash script simply displays the system time, sleeps a bit, and then displays the system date. Then it repeats. The script for this is at the bottom of the post.


  • I’ve taken the top off the official Raspberry Pi 4 case. It’s open now, and as a consequence the CPU is now running a good 15C cooler than it was with the top on. Which begs the question who designed that case that way without any vents at all for circulation of the heat out of the enclosure.
  • Running the same code on the Raspberry Pi 3B+ shows the CPU temp to be a good 20C cooler, and this board is in a case. The case has a lot of ventilation holes in it, and thus probably helps it run cool. Furthermore, that CPU has a heat sink attached to it as well.
  • When the Raspberry Pi 4 is running cooler, the entire board is running cooler, especially the USB chip itself. When it’s hot, USB communication is intermittent and can be seen when the micro:bit/scroll:bit fails to scroll the temperature sent to it. I’ve debugged the original Python script, and know when it’s sending a message to the micro:bit when I see a corresponding message on the terminal. About one out of every eight attempts to send a message fails when the CPU is registering 75C. At this much cooler temperature (around 55C) all messages are sent across and scrolled. You can draw your own conclusions.
  • I’ve ordered a Flirc aluminum case which has a heatsink that’s part of the case and is designed to pull heat away from the CPU. I don’t know when it’ll arrive since this was a pre-order, but it was only about US $12, so I figured why not.
# Copyright (c) 2019 William H. Beebe, Jr.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------------------------
# A simple clock that uses the Bash shell to send the Unix date and time to a
# pair of Adafruit displays.
# CTRL C is trapped to turn off the displays before exiting from the script.
trap ctrl_c INT

function ctrl_c() {
    display clear > /dev/null
# Get the date from the Unix date command, using +%r to get the time formatted
# in the locale's time format. This will give it in 12 hour format, with an
# AM or PM. Then use the Bash shell's built-in regex to replace the last ':'
# and second digits with a space, so that the time string is in the format
# '12:00 PM' and will print across the eight Adafruit hexadecimal digits.
while true; do
    DATE=$(date +%r)
    display print "${DATE//:[0-9][0-9] / }" > /dev/null
    sleep 3
    DATE=$(date +%D)
    display print "$DATE" > /dev/null
    sleep 3
    display clear > /dev/null