1

I bought a Raspberry Pi 4 Model B/4G B. I want to use it 24/7 day and night to run a program over the internet. This program doesn't ask for much resources to run. When I plugged it in the socket, the processor began to be hot. Is it possible somehow to use my Raspberry Pi in a low level mode in such a way to run my little program non stop but without using all hardware resources? If not, at least how can I run it nonstop without getting hot? Is it possible somehow to not let my Raspberry Pi plugged in overnight but to use a battery instead? Or how can I protect it against power loss or spikes? What something else could I use?

4
  • 1
    It shouldn't have problems running 24/7 under low load. Have you tried adding a passive heatsink / radiator?
    – Daniel F
    Commented Jan 31, 2020 at 20:09
  • 2
    Just buy a hitsink and a fan and a case to hold those.
    – Biswapriyo
    Commented Jan 31, 2020 at 20:26
  • 1
    How much CPU usage does your program create?
    – CoderMike
    Commented Jan 31, 2020 at 20:29
  • 1
    Have you updated Raspbian to the latest level (which includes the DVFS kernel)? Have you tried sitting it upright on one edge (see MagPi magazine issue #89 & #90 - magpi.raspberrypi.org)?
    – Dougie
    Commented Jan 31, 2020 at 20:37

3 Answers 3

2

It has been shown that a Pi runs cooler if mounted vertically, as the convection currents flow better around it.

The magazine MagPi issue 90 contains an article about this. The print version even includes a free cooling stand. It should be easy to make one from e.g. wood or cardboard.

enter image description here

1

You should check the SoC temp w/ vcgencmd measure_temp. If it is < 70 ℃ (which is quite warm to the touch), everything is fine -- in fact it's fine upto 80-85 ℃, at which point the CPU will be throttled to reduce the heat. It will be uncomfortable to touch at that point.

Is it possible somehow to not let my Raspberry Pi plugged in overnight but to use a battery instead?

This is not a worthwhile pursuit if mains power is available. It will not reduce the demand, and if it meets that demand the heat will be the same. If it doesn't meet the demand, you will have worse problems than overheating, and create more, not less, wear and tear for reasons touched on below.

It's worth nothing that electronics are not damaged by heat within their operational range. By "not damaged", I mean they do not suffer wear and tear because of it. A chip kept at 80 ℃ will not have a shorter lifespan than one kept at some other temperature within the operational range (20°, 40°, 0°, etc).

What produces wear and tear and degrades the lifespan are fluctuations in temperature. In other words, if you get it hotted up to 85° then unplug it and put it in the fridge for a few minutes, then take it out and heat it up again and repeat this process frequently, that is stressing the materials in a way which may eventually lead to failure. Unreliable voltage/current (which is what the battery will be compared to a proper PSU) may create this kind of fluctuation as well.

A heatsink (or set thereof) is I think recommend for the Pi 4, so if you don't have one, you should get one. If it is in a particular hot or poorly ventilated environment, then think about a fan of some sort.

You may find this interesting:

https://www.explainthatstuff.com/voltage-optimisation.html

4
  • I didn't think so but: "Chiefly British Informal. to heat; warm" dictionary.com/browse/hotted :P
    – goldilocks
    Commented Jan 31, 2020 at 22:36
  • " A chip kept at 80 ℃ will not have a shorter lifespan" - Are you sure? I would be interested to see a citation for this assertion.
    – Glen Yates
    Commented Jan 31, 2020 at 22:47
  • @GlenYates I'll temper that by saying my claim is in terms of a reasonable scale. Corrosion and electrochemical effects happen faster at higher temperatures, as anyone with a cast iron barbecue grill has probably noticed. But the relative scale is what is significant. If you left the devices in a box, one in a dry 80° room and the other in a 20° room for 20 years, chances are they would both still work fine. Meaning, temperature alone won't seriously degrade the lifespan.
    – goldilocks
    Commented Feb 1, 2020 at 14:37
  • However, if you put one in a third room and cycled the temperature 50 times/day between those extremes, I'd bet that one will be defunct long before the other two. So again, my point is if the temperature is stable and within the operating limits, it's fine, even if you feel it is "really warm".
    – goldilocks
    Commented Feb 1, 2020 at 14:37
1

MagPi issue 90 also contains an article on overclocking (page 34 onwards). I am not suggesting you overclock your Pi 4, but the question suggests you may want to underclock it.

Some hints from the article:

The file /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq shows the default clock rate, which is 600000 (600MHz). The actual clock speed can increase under load. You can monitor the actual frequency with:

vcgencmd measure_clock arm

or (which runs continually at one-second intervals)

watch -n 1 vcgencmd measure_clock arm

The maximum clock speed is in the file /boot/config.txt. Change this section

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

to

#uncomment to overclock the arm. 700 MHz is the default.
over_voltage=[your value, default 0]
arm_freq=[your value]

I can't advise on what values may be best for you.

Reboot the Pi after changing this file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.