🛠 Nœud capteur autonome sur batterie : énergie et fiabilité
Objectives
Powering a Zero W on battery: 65 × 30 mm and ~150 mA typical during activity (including radio) make it an ideal sensor node — with one major pitfall.
Hardware
- 1 Raspberry Pi Zero W + a quality 5 V USB battery (power bank)
- 1 5 V / 1.2 A power supply for debugging
- I²C sensor (the header provides 3.3 V, SDA1/GPIO2, SCL1/GPIO3)
Steps
- Measure your actual profile with a USB tester (~150 mA with Wi-Fi active, more depending on peripherals). A 5000 mAh battery gives an order of magnitude of 30 h at a constant 150 mA — to be adjusted for the duty cycle.
- Disable unused services (
sudo systemctl disable --now cups avahi-daemon) and sample in short cycles: read, post via HTTP, sleep. - Protect the SD card: mount
/var/login tmpfs, group synchronizations at the end of the cycle. - Monitor temperature in a sealed enclosure:
vcgencmd measure_temp— throttling at 80 °C, limit 85 °C.
Verification
Full cycle with a USB tester: peak < 500 mA, average consistent with the calculated autonomy.
Common errors
- Power bank entering sleep mode under low load: "low-current" model.
- Black enclosure in direct sunlight: at ~0.75 W, solar heat is enough to reach 80 °C.
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash