Cooling off your Raspberry Pi 4
blog.alexellis.io
blog.alexellis.io
We spend a ridiculous amount of money testing various cases from China. In testing we found that the heat sink style[1] cases with fan work best.
Having said that, for most use cases you just need to move the hot layer of air away from the SoC, so even a low speed fan will do the trick.
[1] https://raspberry.piaustralia.com.au/collections/cases-enclo...
For my home lab, I don't bother with the fans/cases and instead just stack the Pis with brass spacers.
I haven't had any issues yet with the ambient room temperature around 20-22ºC (68-71.6ºF for the stonecutters who keep the metric system down[1]).
The machine doesn't throttle under load even when I hammer it with a compilation job on all four cores.
I wrote about it here: https://www.reddit.com/r/raspberry_pi/comments/cefzwu/carbon...
I get great thermals. Currently I put it in the official case (with drilled holes) and get about 25 over ambient with USB turned off and a conservative CPU governor.
In the end we decided the extra cost, power consumption, noise, and moving parts simply weren't good value for the customer!
Adding fans could (and should) make a huge difference but this specific design was very poor at taking advantage of them.
I took a look on amazon and it seems like there are quite [3] a [4] few [5] resellers offering what appears to be the same product or design:
[1] https://raspberry.piaustralia.com.au/collections/cases-enclo...
[2] https://cdn.shopify.com/s/files/1/0053/4721/3361/products/ar...
[3] https://www.amazon.ca/Waveshare-Aluminium-Raspberry-Resistan...
[4] https://www.amazon.ca/Cooling-Aluminium-Aluminum-Enclosure-R...
[5] https://www.amazon.ca/Lorchwise-Cooling-Aluminum-Enclosure-R...
With so many clones in the market it becomes difficult to trust anyone, which is frustrating to say the least. I would love some unbiased advice on what product to purchase for a raspberry pi 4 which will probably be playing a lot of games and running at high cpu often.
Equilibrium temp is arount 73C running a realtime website. Take a £2 coin and place it on the CPU. Temp drops 10C within seconds. I can get it under 60C by swapping a second coin. They stay pretty hot after you take them off. Also the equilibrium temp when you just leave the coin there seems to be a good few degrees less than with no coin. Possible the larger surface area helps remove the heat, just not as good as an actually designed heatsink.
I just rested them on top of the chip, no compound, no glue. Definitely reduced throttling before I could get a proper heatsink shipped.
A few quids increases the surface area quite a lot!
Taping the coin (or heat sink) down should give you better heat transfer, therefore better cooling.
Designing your own case in OpenSCAD and 3D printing is a piece of cake, building a large fan into the case (lower noise) is a nice weekend project.
You probably had very little metal-chip contact.
Even toothpaste works well, until it dries out.
When you lie the heat sink you have a rough surface of air bubbles. Super glue would fill those bubbles with a solid material which always has a better heat conduction than air
In terms of practicality the best is probably to take a real heatsink with heatconducting double sided tape on it already
https://wickedaluminum.com/products/raspberry-pi-4-standard-...
Lesson: just because there are protections for going past limits doesn't mean that everything is fine when you are constantly hitting them. (applicable to our current government problems sadly)
If you reach out to me directly (e-mail in profile) I'll make sure we send you an early sample of our combined Picade X HAT with fan to test out!
> This option does apply a decent amount of cooling at idle and under load, it also moves the heat away from the board unlike the heatsink.
I think the comment makes sense with that context, compared to a fan, the heat from a heatsink will stay near the board and make future cooling less efficient.
A fan also aids convection, but instead by maintaining a larger temperature difference between the surface (however large) and the surrounding air.
Either alone is good; both together are better.
Best I could find was the BCM2711 (the Broadcom SoC at the heart of the RasPi4) "datasheet" (a frickin' Word document) [1] that says the board requires a PSU capable of providing 3A at 5V.
So that'd be 15W.
[1] https://www.raspberrypi.org/documentation/hardware/raspberry...
A large problem is that even “3A rated" supplies suffer large voltage droop under load. This can be seen pretty easily using a cheap USB DC load [0]. As load goes up, voltage tends to drop slowly at first, then heavily at a certain point.
Several I’ve bought drop as low as 4.1V at just 2A load which will almost definitely make any Pi very unhappy. I haven’t found an authoritative source but generally the Pi’s power management system starts complaining (flipping the “undervolt since boot” bitflag [1] in “vcgencmd get_throttled”) around 4.6-4.7V [2]
To monitor the throttled bitflags, which also report thermal throttling, I wrote a basic shell script that just converts the hex to bin then returns a Grok-ready string with the flags as booleans. I've already got Telegraf on the RPis sending basic host metrics to an InfluxDB instance so that script just gets called by an exec input to generate and persist the data for monitoring or analysis.
Eventually I'd love to write (or contribute to) a proper Golang Telegraf plug-in that just reads from the VC mailbox directly but that's still on the back burner.
As far as actual power consumption during use, I’ve recently started running tests using a decent USB power meter (WITRN/Qway U2 [3] and X models, in particular) to monitor load over time while running various workloads on a Pi Zero W, a Pi 3B+ and a 4GB Pi 4.
Power usage at idle is usually low but even that's unpredictable. Daemons are gonna daemon regardless of the user load. Generally though the load goes up substantially when powering peripherals - Ethernet, USB, BCM VideoCore enc/dec/CSI/SSI, SD card R/W, HDMI, fans, HATs, GPIO peripherals, etc. CPU load definitely factors in heavily, of course, but it’s only part of the picture.
For reducing power usage, some surprisingly simple things can help. As a very minor example, shutting off the activity LED [4] can save a few dozen mA. :)
[0] https://www.droking.com/Intelligent-USB-Adjustable-Constant-...
[1] https://raspberrypi.stackexchange.com/questions/48329/underv...
[2] https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=1477...
[3] https://usbchargingblog.wordpress.com/2018/08/11/web-u2-usb-...
[4] https://www.jeffgeerling.com/blogs/jeff-geerling/controlling...
the whole point of a 3A rated 5V power supply is it will not drop more than ~5% under its rated load. What you describe is being a victim of a fraud.
So if you have a '3A 5V' power supply without a captive cable, you can still get 4.1v at the useful end of the USB cable.
The official RPi chargers include a captive cable, presumably to stop users substituting such standard USB cables.
[1] https://www.westfloridacomponents.com/blog/compensate-cable-...
Did you ever publish the results of your power/load monitoring on the various boards?
Ideally I’d prefer to Yep people run their own testing and monitoring. This stuff isn’t rocket science, just requires a bit of knowledge, inexpensive tools, and a bit of logical framing. :)
It's not doing what you think; `true` here is just a non-zero length string. `while [ false ]; do ..` does the exact same thing!
Use `while true; do ...`. Or better `while :; do ...`
Even better, depending on the context, is
while sudo sudo /opt/vc/bin/vcgencmd measure_temp; do
sleep 2
done
PS. why two sudos?Seems to stay very cool and is silent. Noctua makes some good fans.
I hope the next two main steps for the next Raspberry Pi (4+ or 5?) and the corresponding compute module will be:
a) including a SATA controller (SD cards are not... ideal.)
b) a more power-efficent node
We're using the CM3+ on carrier boards. It's substantially better in terms of thermal performance than the CM3.
We ended up identifying a particular Taiwan-designed JMicron-based SATA/USB2 controller that worked really reliably with Linux, unlike, say every single PRC-designed SATA/USB2 controller chip we tested. It was a pretty painful experience going through all of that testing.
We bought 120 retail packages of that JMicron-based product, directly from the Taiwanese producer, just to be sure, to guarantee our first-gen production run.
I think many RasPi users want a reliably high-speed, low-cost storage device. It doesn't make much sense for all of these users to have go through this very annoying process. It should just work. Since the chip cost for this by now is likely very small in the raspi kind of volume, why not?
The Pi became possible because of integration, where the SoC supported all the required interfaces internally so very few external ICs were required. That's what allows them to keep the price so low. Additional chips add significant additional cost. That's why there have always been compromises like the USB-connected ethernet. They can only do what the SoC supports natively.
Keep in mind that this is a 10+ year old problem by now (talking about USB2-to-SATA). They've gone through all of the cost cutting methods possible by now.
I can buy that chip that also happens to come with a PCB, a very nice extruded and anodized alumunium case, plastic end-pieces + screws, indication LEDs, voltage regulators, 10-20 pieces of small passives (redistors/caps), a screwdriver, 2-3 pieces of instrution manuals/warranty notices, two layers of very nicely designed paper packaging + shrinkwrap... all for like $5 in retail. The cost to the retail store for these items is probably closer to $2.
(Oh, and there's also the assembly cost for that PCB inside the case.)
This is my job. I design consumer electronics that ship in volumes larger than the raspberry pi. You've probably used something I've designed before. The backseat engineering by software devs in these threads is annoying and presumptuous. The pi designers aren't incompetent, they've probably rolled up dozens of feature BOMs to find what they can afford to ship.
Now, I wouldn't be surprised if it was 50c instead of 1$, but _nothing_ is 5-10c, so you're off by an order of magnitude. Even a single transistor in a package is a few cents. Additionally, if they add the IC they still need a connector, and those are some of the more expensive components in a device like the pi, probably 25c-1$ depending on quality.
> I can buy that chip that also happens to come with a PCB...
You're right that the economics don't seem to make sense, but you made several mistaken assumptions:
1) The price of that device is _almost entirely_ driven by the cost of the IC. Those designs have almost no supporting electronics, and the PCB itself will be 10-20c.
2) You're overestimating the margins. It's probably not delivered to the retailer for 2$, closer to 3$. Generic electronics are not high margin.
3) In cheap, commodity devices the manufacturer can use grey-market ICs, but the pi designers can't get away with that. That easily doubles the IC price.
Fair enough. Thanks for your explanation.
> The pi designers aren't incompetent, they've probably rolled up dozens of feature BOMs to find what they can afford to ship.
That's a borderline straw man argument. You're seem to be implying that I either wrote (or think) that they are incompetent, while none of those things are true.
> Now, I wouldn't be surprised if it was 50c instead of 1$, but _nothing_ is 5-10c, so you're off by an order of magnitude.
Okay, let's say it's 50 cents. I would still think it makes sense to include this feature. Also, that's "half a magnitude off" compared to 10 cents, not a magnitude off.
I wish Raspberry Pi had better support for fast storage.
The Rock64Pro is probably a great board too, and it also has USB3, so it can do both options. There's some Odroid boards that have built in SATA as well.
https://magpi.raspberrypi.org/articles/raspberry-pi-4-specs-...
Caveat: I think it makes sense that all RPI5 boards (except the lite Compute Modules) would have like 8-16GB onboard flash, via eMMC. If it makes sense, economically speaking. I think it could. The SD card aspect of the RPI sucks in so many ways.
So not yet.
'cos I'm a little boy inside.
Stable 33% overclock, I'm typing to you from it now. :D
$ cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
2000000
pic: https://files.esotericnonsense.com/pub/rpi-tower.jpgI do have an x86 laptop which I use on the go, and a server that I SSH in to for heavy loading like compilation etc.
Even with stress tests I can't get the Pi to break 50 C.
I don't use mine as a desktop yet, though. I just run 8 Docker containers for stuff like DNS, Time Machine backup, etc.
The goofy-looking Pi: https://www.ericlagergren.com/share/d9htGfiETJHN3ua
I've just borked my install trying to migrate to aarch64 from armv7h.
Currently rescuing it (I hope) with a chroot.
Fun! :D
edit: all sorted! aarch64 kernel compiled; migrated the userland over from armv7h (I've been using 32-bit for a few months) - no issues so far! whee!
Though I believe barsonme picked that up from my other post below.
Just got the 64bit kernel compiled and running, now on a 64bit userland in case anyone else was interested. :)
I do remember it running a bit hotter before I updated to the latest firmware via "sudo apt full-upgrade" a few days ago.
Running "stress -c 4" gets it up to about 50C ...
[1] https://www.amazon.com/Raspberry-iUniker-Heatsink-Model-Sing...
[0] https://www.youtube.com/watch?v=yJRrGCqG9Jc
[1] https://hackaday.com/2018/08/13/oil-immersed-raspberry-pi-ke...
[2] https://hackaday.com/2017/05/15/liquid-cooling-overclocked-r...
[3] https://www.reddit.com/r/raspberry_pi/comments/bmeklj/pi_imm...
If it's just for fun, then I think water-cooling Pi's looks way more interesting to play with:
http://finniss.net/water-cooled-raspberry-pi/
https://modmymods.com/modmymods-raspberry-pi-mini-water-cool...
https://syonyk.blogspot.com/2018/09/raspberry-pi-3b-flirc-ca...
https://syonyk.blogspot.com/2018/09/project-pi3bdesk-making-...
I grabbed one of my little 20mmx20mm heatsinks which are generally good enough for devices of that size that come passively cooled. In the RPi's case that thing got hot enough to burn me even with a small fan. So I repeated this process a few times with stuff from my junk box trying to find a passive solution eventually I ended up with a 40x40x30mm heatsink (looks sorta like this https://www.amazon.com/Karcy-Aluminum-Heatsink-Cooling-Raspb... only that one says its 11mm) and a small fan.
The thing is huge, but the temps stay under control and it over-clocks @2Ghz now, but I wouldn't run it like that for long even with that heatsink. I've got mine pinned at 1.75).
I'm using as a media center with my cheap 75 inch TV.
I have one case with a fan and one case where part of the case body attaches to the chip top with thermal goop. The fan works better.
Now I can crank it up and rip the knob off, and the temperature doesn't get anywhere near throttle point.
If I shipped out a fully-powered MK-R LED without a heat sink, saying "Oh it'll work fine!" I'd be getting chewed out within two minutes of the customer turning it on.
Though IMO even calling it an issue is overblown, most phones and laptops cannot maintain their peak clocks under load for extended periods of time either. Intel calls it turbo boost so it's a feature instead of a bug.
Maybe it wouldn't be an issue on the Pi 4 that I think it is. In that case I have been holding back on switching to a 4 for no good reason. This is very helpful, thank you.
However, you can get better performance by cooling. A fan off to the side of the board blowing between the two would probably work well if you want to keep it on top, but you're probably fine doing nothing as well.
TL;DW: The Flirc case is one of the best options.
I would have thought this would generate very little load, and a major temp increase might indicate a bug in k3s?
Is there a bunch of cpu-intensive work an idle cluster needs to do?
My OCD kicks in when I can hear the fan running all day long.
What's the best-spec'd Pi (or comparable alternative) that doesn't require fans?
The one feature all these boards have in common is their CPU is mounted on the _bottom_ of the board, allowing a much larger heat sink to be mounted without obstructing anything. The lack of this feature in on the RPi 4 is a fatal blunder IMHO and why I chose not to buy it.
I currently use a Nano Pi M4 as my main desktop computer. It has no active cooling, only a big heatsink which covers the entire rear of the board. As I write this, I have three browser windows open containing a total of 30 tabs while streaming a 44 kHz stereo 128 kbps audio stream. Its CPU temp is holding at 32 C.
Someone else graphed out the 2,3 and 4 temps under idle and load at 22'C:
https://www.reddit.com/r/raspberry_pi/comments/dspb5g/temper...
Now I have HP T620, can be bought cheaply, it's definitely bigger than RPI4, but finally it just works.
Building a heat sink case with attachable fans doesn't seem all that impossible.