Which Raspberry Pi 3B+ case is best for the PoE HAT?

February 08, 2019

Which Raspberry Pi 3B+ case is best for the PoE HAT?

The Raspberry Pi PoE HAT has been a great addition to our family of Pi add-ons.  The PoE HAT allows you to run a Raspberry Pi 3B+ directly off Ethernet when you use a PoE injector or PoE router.  

With the PoE HAT, the Pi tends to run a bit warm, so the PoE HAT includes a built-in fan.  Recently, a customer asked us which case they should use with a PoE HAT.  We scoured the Interwebz and could not find an answer, so we decided to conduct some testing on two of our most popular cases:  the Cyntech / ModMyPi security case and the HighPi case.  We did not test the official Pi Foundation case, but we expect it would perform the same or worse than the Cyntech case.

First, we needed a way to measure temperature inside the case.  We tried mounting some sensors, then I remembered that the Raspberry Pi's CPU temperature is available at the command line.  Problem solved.

Next we needed a script to check the temperature.  Python is our language of choice at CED, so we put this simple script together.  This python3 script simply runs vcgencmd to get the CPU temperature, CPU speed, and throttled status.  It then displays these parameters to the screen, and then logs them to a file. .

Here is the output, the first number CPU temperature in celsius, the second number is CPU speed in Hz, and the third is the throttled status (more on the last two in a minute).  

48.3 600000000 throttled=0xa0000

And here is our code:

import os, time, vcgencmd

name = input("Enter filename: ")

while True:
    temp = vcgencmd.measure_temp()  #Python3 package that does most of what vcgencmd does at the command line
    freq = vcgencmd.measure_clock('arm')
    throttle = os.popen("vcgencmd get_throttled").readline()  #Can't get this in the Python3 vcgencmd package so we have to jump out to the shell to do it
    throttled = throttle.rstrip('\n')
    print(temp, freq, throttled)
    temp_freq_throt = "{}, {}, {}".format(temp, freq, throttled)
    if name is not "":   #include this so we can run it without logging 
        with open(name, "a+") as text_file:
            text_file.write(temp_freq_throt)
            text_file.write("\n")
    time.sleep(1)

 

Then we simply booted up a Pi with a PoE HAT mounted in both of the cases and waited.  We also tested a Pi with PoE HAT and no case.  We ran the above scrip to log and show the data.

Cyntech / ModMyPi Case with PoE HAT (shown in clear, available in multiple colors)

HighPi Case with PoE HAT

 

Idle Test

This test was conducted using the latest release of Raspbian simply running at idle.

The results are initially a bit surprising:

Cyntech / ModMyPi HighPi No Case
Avg Temp °C 46.9 47.2 48.0
Standard Dev. 1.7 1.7 1.9

Wait a minute, the average temperature with no case is higher than either case option?  This makes no sense until we look at the graphs.  These are plots of the CPU temperature in each setup over a 5 hour period:

 

If we hadn't been watching this experiment the graphs still might not make sense.  Here's how we perceive it:

With no case, the fan runs less often.  Around 50°C, the fan turns on, and then the fan turns off around 45°C.  Since the Pi is out in the open, the fan is more effective at dissipating heat.  

With the HighPi case, the fan runs more often than with no case.  The HighPi case is a taller design with more volume.  It also has more paths for air to flow, so the fan is more effective.

With the Cyntech / ModMyPy case, the fan has to run more often because it is a more compact design with less holes for airflow.  See the straight lines at the beginning of the graph?  In those cases, the fan is just on, because the CPU temperature is not getting quite low enough to turn the fan off.  The interesting result is that the CPU stays at an overall cooler temperature.

CPU Stress Test

I want to preface this section by stating that cpuburn-a53 is a very aggressive test.  You can learn more about it here.  In all likelihood you are never maxing out your Pi like this.  That said, it can't hurt to test at the extremes, so here we go. 

Like before, we booted into Raspbian but then we ran the aforementioned cpuburn-a53 stress test.   In each case, we tested for 10 minutes.  This time around, we tried putting a heat sink on the Pi when using the HighPi case just to see what would happen.

Cyntech  HighPi HighPi with Heat Sink No Case
Avg Temp °C         76.0            75.3                                  74.5            61.5
Max Temp °C          83.3            82.2                                  81.7            62.8
Min Processor Speed          926          1,034                                1,034          1,200

 

During the stress test, the Pi performs best without a case, which is no surprise.  The CPU temperature goes over 60°C pretty quickly, which triggers the Pi 3B+'s soft temperature limit.  This lowers the max CPU clock speed to 1200 Mhz.  The CPU temperature maxes out at 62.8°C, and no CPU throttling occurs.

Of the two cases, the Cyntech case performs worse than the HighPi by a slight amount.  In the Cyntech case, the max CPU temperature hits 83.3°C and the processors slows down to 926 MHz.  On the Pi 3B+, if the CPU temperature exceeds 80.0°C the ARM processors begin to slow down.   

In the HighPi case, the max CPU temperature is 82.2°C and the processors slow down to 1034 MHz.  For fun, we added a heat sink in the HighPi setup.  This had little effect, as the max CPU temperature still hit 81.7°C.  

Our takeaway from this test is that if for some reason you plan to max out your Pi at all times, you should probably either not use a case or leave the top of the case off.  With both cases, if you remove the top, the results were similar to a case-less Pi.  We did think it was interesting that the heat sink had little effect on the 2nd High Pi test, so we are confident in saying there is no reason to add a heat sink when using the PoE HAT due to the onboard fan.

Throttled Status

We mentioned the throttled status earlier.  I thought I'd take a second to clear up what that means.

When you type vcgencmd get_throttled at the command prompt, you will get a hexadecimal value like 0x80008.   

Developers often like to keep things esoteric for us non-Computer Engineers (I'm a Mechanical Engineer), so rather than a user-readable output sometimes they like to spit out some hex.  To figure out what 0xA2002 means, find a hex to binary converter like this one and put in A2002.  You'll get a binary value of 1010 0000 0000 0000 0010.

From left to right, you go from bit 19 to bit 0. 

Starting from the left, bits 19 through 16 are 1010, which means: soft temperature limit has occurred and ARM frequency cap has occurred, but none of the following occurred: throttling and under-voltage.

Then skip bits 4 through 15.  Bits 3 through 0 are 0010.   This means the ARM frequency is currently capped at 1200 MHz, but we are not under-voltage, not currently throttled, and the soft temperature limit is not active.

Bit Meaning
0 Under-voltage detected
1 Arm frequency capped
2 Currently throttled
3 Soft temperature limit active
16 Under-voltage has occurred
17 Arm frequency capped has occurred
18 Throttling has occurred
19 Soft temperature limit has occurred

What to do?

So, which case is the right one?  In the end we feel either case works just fine, as long as you are not maxing out your Pi all the time.  These fans are designed with a life expectancy of 70,000 hours or 8 years, here's a link to the datasheet for your reference.  As long as you aren't maxing out your Pi all the time, the fan does a fine job of keeping the Pi cool in both cases. Therefore we would recommend whichever one works for you!  And if you *are* maxing out your Pi, leave the top of your case off!




Leave a comment

Comments will be approved before showing up.


Also in News

The Raspberry Pi Pico
The Raspberry Pi Pico

July 28, 2021

Raspberry Pi Pico’s are a great microcontroller that has a fair amount of range, despite the slightly more tricky set up process, once it’s ready to go there’s a lot you can do. 

Continue Reading

Raspberry Pi Troubleshooting

June 30, 2021

Continue Reading

An introduction to soldering
An introduction to soldering

June 08, 2021

Soldering is a good skill to learn and improve throughout your making and DIY-ing, there’s quite a few situations where it will be the best option for a more permanent build.

Continue Reading