How hot can you get your Raspberry Pi 4? Let's find out!
So first things first, why would you test how hot your Raspberry Pi 4 can get? That's because this A72 processor can get so hot that it will be slowed down. It will go from the gigahertz range, down to the megahertz range just to protect itself, now that's a dramatic drop in speed and it's completely avoidable depending on the Raspberry Pi and the cooling options be it in case or out of case and something like Stressberry allows you to take a look at the whole picture and make sure that wherever your Raspberry Pi is, it's not going to slow down ever again.
So Stressberry is a repo on GitHub, it's matured over the last few months, the most useful part about Stressberry really is taking raw data and putting it into a chart. I've put together a guide that basically digests that whole experience, I kick off with the setup on how to install it, stress testing and give you some example graphs. I also ran into an issue and I've got to fix that, if you run into the same problem let's wind back a step and actually install this on a Raspberry Pi, just in case you're following this guide so boot up your Raspberry Pi, open up the terminal and then run these commands, just copy and paste the first line which will install stress onto your Raspberry Pi and then run the second command, which is going install Stressberry.
Stressberry will do two things, first is capturing data that takes a long time it's going to be incrementally checking the CPU temperature, making sure it's stable and then it will load up the CPU and it'll progressively grab the temperature over time and then it will have a bit of a cool-off period at the end, so you can actually see how the CPU in its environment is cooling down. The second step is taking that output data and turning it into a chart. That chart will show all of the information over time, so starting from the very start of the test, all the way over to the end of the test and what you end up with is a great visual representation of what happened throughout that whole process.
Testing on your bench is a little bit unfair because it's the perfect scenario, because the Raspberry Pi is often exposed to the atmosphere and putting it inside a case or inside a drawer will really cram that temperature because the whole environment will heat up. Before we kick off and do step one of grabbing the data, let's create a local folder inside our home directory so that those files but whether they're output files or their images, PNG images they're going to be in one place. As you can see here, I'm making a new directory inside the home directory it's called temperature tests, so here's the command for step one, it's a long command. This is going to generate an output file over 30 minutes that will have incremental temperature samples, used for plotting in step two.
There's a lot of options here and I've put together a little bit of a breakdown on what each of them do. So, as you can see the end option so, “-n” is the test name you've got “- I” which is the five-minute idle periods before and after and that's in seconds. “- d” is the duration of the stress tests itself, I've configured this as 1800 which is 30 minutes, “-c” means 1 core and my tests start out, that's the file name for the test data itself. So step one in using that command will take about 30 minutes, you could change the D option from 1,800 to maybe 300 or something shorter, just for testing purposes, but temperature is a tricky thing it takes a long time for that environment to really get that thermal mass and to be fair 30 minutes is a bit short. You’ll probably want to run it for about 6 hours in the real world, if this is something you wanted to really make sure was stable and you wanted to collect that data.
Step two will allow you to create the chart, here is the command so here's the list of options and we'll kick off at the top, my test start out, it's important that that's the same file name for the test data that you want to refer to. The F option is to signal that the CPU frequency will be plotted, the L option defines the limits of the frequency, then you can toggle on and off the legend and the transparency of the background and you can also define a line width, I've configured my line width as 0.6, I found that was a good compromise between too thick and too thin. Particularly on these graphs when they get pushed in.
I’ve run two separate tests one for the bare board and one in the official case. The results I don't find overly surprising, the official case under performs by comparison to a bare board, it's very difficult to justify having a bare board just sitting in a drawer. It’s very easy for something to get shorted out, using a case is often the best way to go about long term storage of your Raspberry Pi, if it's always powered on, but it does come with compromise sitting in here, there's very little airflow around these connector ports and there is no active or passive cooling other than the thermal relief pad that is on this Raspberry Pi.
If you get the same error as I did and some other people have had on the GitHub repo, that is this import error here, then run this command and go back and run your test. I'm not sure why this happened to me, but it's happened to others and there you go, that's the way forward. From here I plan on testing all my favourite cases with Stressberry on the Raspberry Pi 4, stay tuned for that but for now this is Stressberry, that's how you stress test temperature on your Raspberry Pi and build some cool charts to see what happened.
Makers love reviews as much as you do, please follow this link to review the products you have purchased.