Back to Tanmay's profile
1view

HeatWave Edge AI

An Arduino UNO Q that measures real WBGT where people are, forecasts 3 hours ahead on-device, and warns each person at their own risk level, no cloud needed.

Tanmay Chiranjib Sahoo
  • Video of it working
  • Problem, approach and result explained
  • Expert reviewed· 6 reviews
HeatWave Edge AI

0.45°C

Forecast error at +1 h, on-device TSMixer

91%

of +1 h forecasts within ±1 °C

3808

Model parameters, running on the UNO Q

Walkthrough

Overview

The problem

Heat warnings in Odisha are issued per district, from regional weather data. But heat doesn’t hit a district evenly. A classroom under a tin roof, a workshop, a bus stop or an old person’s closed room can be several degrees worse than the district figure. And air temperature alone is the wrong measure: what decides whether a body can cool itself is humidity, radiant heat from walls and roofs, and air movement.

The people hurt most are the ones who can least protect themselves: children, outdoor workers, and elderly people, especially those living alone. In winter the same group faces the opposite danger. A cold room, or a fall nobody notices, can be just as serious.

We set out to build one small device that measures the real heat stress index (WBGT) right where people are. It grades the risk differently for children, adults, the elderly and public places, and acts on the spot: fan, lights, alarm, and a message to family. It has to keep working with no internet and no mains power, so every decision runs on the Arduino UNO Q itself, not in the cloud.

The approach

We measure the two inputs of ISO 7243 WBGT directly:

a DS18B20 sealed inside a matte-black globe, for radiant heat, a 10 kΩ NTC thermistor in a wet cotton wick, for the natural wet bulb, which captures humidity and air movement the way sweat does.

The UNO Q’s two processors split the work. The STM32 reads the sensors every 2 s and drives the green and red LEDs, buzzer, fan relay and the 8×13 LED matrix, which shows WBGT, the level and a face. The Linux side runs Python: it checks for sensor faults, computes WBGT = 0.7·Tnwb + 0.3·Tg, grades four risk profiles with hysteresis, and sends the level back over the Bridge. It also runs a TSMixer model (3,808 parameters, NumPy on the board) that forecasts the next 3 hours, plus a room adapter that keeps refitting on this room’s own readings. Everything is logged to SQLite and shown on a dashboard the board serves itself.

Power comes from USB-C or a 2×18650 pack through a buck converter at 5 V. If the Python side stops, the STM32 computes WBGT itself after 60 s and keeps the alarms running.

For the “Silent Winter” add-on we added a cold mode (felt temperature and cold dose) and used an Android phone as a room camera. The board detects falls and unusual stillness, asks the person “wave if OK” first, and only then alerts caregivers’ phones through an ntfy server running on the board.

The parts that fought us the most:

Wet bulb readings. The NTC wet bulb read “EXTREME” for days. The divider orientation was wrong, then the wet bulb sat above the globe because the two sensors are at different heights near a warm box. We fixed it with a physics check (a wet bulb can’t be warmer than the globe) and a one-button in-place calibration against the factory-calibrated globe sensor. Database permissions. App Lab runs Python in a container, so the dashboard server couldn’t write the database (“readonly database”). We separated them completely: they now talk only through JSON files. Camera “ghosts”. Whoever stood in front of the camera at startup became invisible on that spot later. We wrote our own background model: it only re-learns a spot as empty if it showed that view far more often than anything else, and it never re-learns the person’s own area. Phone alerts. The SMS gateway app couldn’t be installed on our phones (Android blocks sideloaded SMS apps), so we switched to a self-hosted ntfy server for phone alerts, with no cloud involved.

The result

It works on the real device. The UNO Q computes live WBGT from its own sensors every 5 s, and the dashboard shows the formula with today’s numbers plugged in. When the level rises, the LEDs, fan relay, buzzer and LED-matrix face respond on their own, with Wi-Fi off and running from the battery pack.

What we measured and tested:

Forecast accuracy: TSMixer was trained on hourly Open-Meteo history for Raurkela and Patia and tested on 2026 data it never saw. Error is 0.45 °C at +1 h (91% of forecasts within ±1 °C) and 0.72 °C at +3 h (77%). Model size: 3,808 parameters, 33 KB as int8, well under 1 ms per forecast on the board’s Cortex-A53. Room learning: the room adapter refits every 10 min on the device’s own readings, and the dashboard shows its live error against a “no change” forecast. Fault handling: we tested pulling the internet (it continues on cached weather), killing the backend (the microcontroller takes over in 60 s) and unplugging a sensor (rejected and flagged). Elder-safety add-on: we ran each scenario end to end. A fall with the person moving afterwards sends nothing. A fall with no response alerts caregiver 1, then caregiver 2, and a reply closes it. Lying in the bed zone isn’t a fall. A person lying still for 5 minutes stays detected. A simulated cold night goes from NORMAL to EXTREME with the fan off and a caregiver alerted. On the board, the camera, live view and fall prompt have run with a real phone.

Reflection

What we’d do differently: mount both sensors at the same height from day one and build the calibration first. Most of our debugging time went into a wet bulb that was reading the box’s heat, not the room. We’d also check up front which libraries and apps actually work on the platform. App Lab’s container and Android’s install rules both cost us days.

What’s unfinished or known-broken:

We have one physical node, so the street-level map is designed (site IDs, sync, map view) but not yet deployed with a second node. The MLX90614 IR sensor was damaged, and the humidity sensor never arrived. Humidity and wind come from regional Open-Meteo data, though the wet bulb already captures their effect on the body. Our globe is smaller than the standard 150 mm. The room adapter needs a few hours of clean data before its coefficients mean much. For elders, we still want a slow-fall rule (someone sliding to the floor rather than falling fast), a big physical “I’m OK / Help” button, and voice prompts in Odia and Hindi.

What we learned: how much the right measure matters. Air temperature alone would have told a completely different story than WBGT. We also learned that a tiny, well-chosen model plus a per-room correction beats a big model you can’t run on the edge. And honest labelling (measured vs regional, real vs simulated) is what makes the numbers trustworthy.

Submitted to Heat Intelligence at the Edge

Arduino board used?

Yes

Edge AI used?

Yes

Report (PDF)
Report (PDF)PDF
Schematic
Schematic: HeatWave Edge AI
A working UNO Q node computing local heat stress indices (heat index, WBGT) from real sensor input, not just raw temperature

The UNO Q computes WBGT from its own sensors every 5 s, not from raw air temperature. A DS18B20 inside a black globe measures globe temperature (Tg), and a wick-covered NTC thermistor measures natural wet-bulb temperature (Tnwb). The board combines them with the ISO 7243 indoor formula WBGT = 0.7·Tnwb + 0.3·Tg, after a dashboard calibration that removes the thermistor offset. Every reading passes fault checks before use: sensor disconnects, a wet bulb reading implausibly above the globe, and stuck values. Heat Index (NWS Rothfusz) and a Bureau of Meteorology WBGT estimate are computed alongside, from Open-Meteo air temperature and humidity, as a regional comparison. The dashboard plugs the live sensor values into the formula so reviewers can check the arithmetic. Code: python/indices.py (formulas), python/main.py (pipeline and fault checks), sketch/sketch.ino (STM32 sensor reading). Dashboard panel: “WBGT formula · live”.

An on-device room-level thermal forecasting model, with evidence it learns that specific room's behaviour

Two layers run on the UNO Q. (1) A TSMixer forecaster (3,808 parameters, 33 KB int8) runs on the board in NumPy. It takes 24 h of 9 weather features and predicts air temperature and humidity at +1/+2/+3 h. It was trained on the Open-Meteo archive for Raurkela and Patia. Error on held-out data: 0.45 °C at +1 h (91% within ±1 °C) and 0.72 °C at +3 h. (2) A room adapter learns this specific room. It is a ridge regression, WBGT(t+h) = a·WBGT_now + b·ΔTa_forecast + c, refitted on the board every 10 min. It uses only this device’s own real sensor rows (simulated rows are excluded), with separate adapters for heat and cold modes. Evidence it learns the room: the dashboard model panel shows the adapter’s fitted coefficients a·b·c changing from the default 1.00·0.50·0.00. It also shows the live forecast error against a “no change” baseline, both computed from the device’s own logged data in SQLite. Code: python/forecast.py, training/train_tsmixer.py, python/model/.

Person-and-activity risk grading logic with at least three distinct profiles and their thresholds documented

Four profiles, each with its own WBGT thresholds (MODERATE / HIGH / EXTREME), plus 0.5 °C hysteresis so levels don’t flicker: Children (under 15): 24 / 26 / 28 °C Adults (15–59): 26 / 28 / 31 °C Elderly (60+): 25 / 27 / 29 °C All ages (public place): 24 / 26 / 28 °C A cold mode covers the same people. Its “felt temperature” is (Ta + Tg)/2, with levels below 18 / 16 / 12 °C (children, elderly, public) and 16 / 13 / 10 °C (adults). A cold dose (degree-hours below 18 °C over 6 h) raises the level when cold lasts. Activity is graded from the room camera. It detects whether the person is moving, still, lying or in bed, and the time spent still is compared with a learned hourly routine. A fall, or unusual stillness during the person’s usual active hours, raises an alert. Each level has its own advice text and its own LED, buzzer, fan and LED-matrix response, and every profile’s level is shown live on the dashboard. Documented in the Project Guide (PDF), the README and python/risk.py.

A live automatic relief loop — sensing to decision to actuation — demonstrated end to end with the network and mains disconnected

The full loop runs on the board with no network: sensors → WBGT → risk level → actuation. At HIGH the cooling fan relay switches on automatically. Each level has its own LED pattern, EXTREME adds the buzzer, and the LED matrix shows the WBGT value, the level and a face for that level. All decisions are computed on the UNO Q itself. Open-Meteo data is only used for forecasting and comparison, and is cached so outages don’t stop the loop. If the Linux side stops responding, the STM32 falls back after 60 s to its own built-in threshold rule from the raw sensors and keeps driving the outputs. In the demo video we disconnect Wi-Fi and run the board and fan from a battery, then heat the globe: the fan, LEDs, buzzer and face respond with no network or mains connected.

A multi-node street-level heat map output plus a one-page civic recommendation showing how a municipality would use it

We built one physical sensing node, at Raurkela. The dashboard map places that node’s measured WBGT next to regional WBGT estimates for Raurkela and Patia, Bhubaneswar (Open-Meteo, roughly 10 km grid). It shows a 24-hour Raurkela vs Patia comparison and the gap between the device and the regional estimate. That gap is the hyper-local difference a city-wide forecast misses. The software is multi-node ready: each node reports with its own site ID, and readings can sync to a shared database (optional Supabase sync) to build a street-level map from many nodes. The attached one-page civic recommendation explains how a municipality would place nodes and use the alerts: cooling-centre activation, elderly check-ins, and work-hour advisories.

AI tools used

Claude

We used Claude as a coding and writing assistant: to help write and debug the Python backend, the Arduino sketch and the dashboard, to work through hardware issues (NTC wiring, calibration, App Lab’s container setup), to design the camera fall-detection logic and its tests, and to draft the project report, images and submission text. The team built and wired the hardware, trained and ran the model, tested everything on the real device, and made the design decisions.

Gallery

5