The Pi Zero that cooked itself in my letterbox (and what lives in there now)
Contents
G'day legends. This one's a confession.
Last January I built a "you've got mail" notifier. Pi Zero 2 W, a reed switch on the letterbox flap, a magnet, a little Python script that pinged Home Assistant over MQTT. Took an arvo. Worked first go. Felt very clever.
Then Brisbane did Brisbane. The letterbox is black powder-coated steel, faces west, and sits in full sun from about 1pm. I had the Pi logging vcgencmd measure_temp every minute (for fun, I thought) and by the second week of January it was sitting at 80 to 85°C every afternoon, throttling hard. By the end of the month it started dropping off WiFi around 3pm, then it stopped booting at all. Card corrupted, and I reckon the board had a rough time too. It now lives in the drawer of shame.
What I got wrong
- A Pi is a computer. It wants to be on all the time, and it makes heat all the time, even doing nothing. For "a switch changed, tell me", that's the wrong tool.
- A closed black metal box in the sun is an oven. I measured 61°C of air inside the letterbox on a 34°C day. The Pi adds its own heat on top.
- SD card plus heat plus brownouts. See my SD card post. All three at once is a death sentence.
What's in there now
An ESP32-C3 board, the same reed switch, and two lithium AA cells. It sits in deep sleep drawing microamps and only wakes when the flap opens. On the C3 you can wake from deep sleep on a GPIO (pins 0 to 5 only, which caught me out):
esp_deep_sleep_enable_gpio_wakeup(BIT(GPIO_NUM_2), ESP_GPIO_WAKEUP_GPIO_LOW);
esp_deep_sleep_start();
Wakes, connects, sends one MQTT message, goes back to sleep. Awake for under two seconds. It's been in there since February on the same batteries and it doesn't care how hot it gets.
Why lithium AAs and not a LiPo? Because a LiPo in a steel box in the Queensland sun is a fire with extra steps. The lithium primaries are rated to 60°C and they don't puff up.
Would I build it again?
The ESP32 version, yes, it's dead reliable. The Pi version was a $25 lesson in thermal design, and honestly a cheap one.
cheers, Matt 🔧
Get the best of #raspberry_pi_lab weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to comment