🛠 Surveiller la température et la fréquence de la Zero 2 W

Raspberry Pi Zero 2 W (2021) — Board Sheet · debutant · Schéma : IMG-zero-2w-debutant-3-surveiller-temperature-zero2w.svg — Zero 2 W avec dissipateur, flèches thermiques, terminal affichant vcgencmd measure_temp et un graphique de température.

Objectives

Learn to read the thermal and frequency state of the board: the Zero 2 W packs a quad Cortex-A53 into 65 × 30 mm without a fan, using thick copper layers as heat sinks. The throttling threshold is 85 °C (progressive reduction starting at 80 °C). You will measure, constrain, and verify behavior under load.

Equipment

Complete code

# Température du SoC (mesure côté GPU, la plus juste sur les kernels Pi) :
vcgencmd measure_temp            # temp=48.3'C

# Fréquences actuelles des cœurs :
vcgencmd measure_clock arm       # en Hz (1000000000 = 1 GHz nominal)

# Bits d'état : 0x0 = tout va bien ; bit 0 = sous-tension,
# bit 18 = bridage thermique déjà survenu depuis le boot :
vcgencmd get_throttled

# Échantillonnage toutes les 2 s pendant une charge :
nproc
seq 4 | xargs -P4 -I{} sh -c 'yes > /dev/null &'
while true; do
  printf "%s  %s  %s\n" "$(date +%T)" \
    "$(vcgencmd measure_temp | cut -d= -f2)" \
    "$(vcgencmd measure_clock arm | cut -d= -f2)"
  sleep 2
done
# Stopper la charge : Ctrl-C puis « pkill yes »

Expected verification

At idle, around 40–50 °C; under load on all 4 cores, the temperature rises sharply. At 20 °C ambient, a bare Zero 2 W sustains an indefinite stress test without throttling (documented by the foundation) — but in a closed case or without a heat sink in a hot room, the frequency drops below 1 GHz and get_throttled displays bit 18. Optional passive cooling then becomes a performance choice, not a safety one.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials