Skip to content
OnlyProjects
B.Tech / B.E. · Internet of ThingsFor educational purposes only
Code included

Cold-Chain Temperature Monitoring and Excursion-Alert System for PHC Vaccine Storage

ESP32 nodes on MQTT watch a +2 to +8 °C vaccine refrigerator, log every reading to MySQL and raise excursion alerts before doses are lost

Mapped to your syllabusVTU 2022 Scheme (OBE/CBCS) · BCS685 Major Project Phase-I · Semester 6

Overview

1 min read

Cold-Chain Temperature Monitoring is an end-to-end IoT system that keeps watch over vaccine storage where a few warm hours silently destroy doses. In a typical primary health centre (PHC), vaccines sit in an ice-lined refrigerator (ILR) that must stay between +2 °C and +8 °C; a broken compressor or an overnight power cut can push it out of range, and the standard twice-a-day manual thermometer reading discovers the damage only after the doses are compromised.

Our system places ESP32 nodes with waterproof DS18B20 probes inside the ILR and in a vaccine-carrier demonstration box. Every 30 seconds each node publishes a reading over MQTT to an Eclipse Mosquitto broker; nodes buffer readings in flash when the network is down and backfill with their original timestamps on reconnect, so no gap is silently papered over. A Python ingestion service subscribes to the broker and writes every reading into MySQL. An alert engine applies the WHO range rules — instantaneous breach, breach persisting beyond a grace window, plus a rolling z-score check that flags slow sensor drift a fixed threshold misses — and drives a buzzer on the node, a banner on the dashboard and a webhook stub for an SMS gateway. A Flask + Chart.js dashboard shows live temperatures, device heartbeats and an exportable excursion log for the district immunisation officer.

The build costs under ₹3,000 per node and reuses skills the VTU CS syllabus already teaches, making it a strong, demonstrable major project.

Relevant for
Karnataka
Level
Intermediate · 14 weeks · team of 4
Common at
Visvesvaraya Technological University, Jawaharlal Nehru Technological University Hyderabad, Biju Patnaik University of Technology
Updated
Nov 2026

Syllabus alignment

VTU · 2022 Scheme (OBE/CBCS)

BCS685 · Major Project Phase-I · Semester 6 · 2 credits · CIE 100

Subjects this project applies
  • BCS403 DBMS (MySQL) — time-series schema, indexes and excursion queries
  • BCS701 Internet of Things — MQTT architecture, sensors and node design
  • BCS602 Machine Learning — rolling-statistics excursion detection
  • BCSL504 Web Technology Lab — Flask backend and Chart.js dashboard
  • Python programming — ingestion service, alert engine and analytics
How it is evaluated

Team: individual or group ≤ 4

report : presentation : Q&A = 50 : 25 : 25; report marks identical for all batch-mates; SEE by two university examiners

Also fits: JNTUH R22, BPUT 2023-24 admission batch.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

Vaccines stored at a PHC must remain between +2 °C and +8 °C, but compliance is checked only twice a day by reading a thermometer and writing it in a register. An excursion caused by a failed compressor, an evening power cut or a door left ajar is therefore discovered late — often after the doses have lost potency — and there is no record to show how long the excursion lasted or which other doses were affected. Health workers are blamed for failures they cannot see, and the district office has no data to prioritise which ILRs need repair or replacement.

There is a need for a low-cost, continuously logging temperature-monitoring and alerting system — sensor nodes on an MQTT backbone, a durable database store, rule-based and statistical excursion detection, and a dashboard with an auditable excursion log — that a PHC can afford, that keeps working through network outages by buffering and backfilling readings, and that gives both the PHC staff and the district immunisation officer timely, evidenced alerts instead of a next-morning surprise.

Synopsis

Abstract

Vaccines are biological products that lose potency once warmed. The national immunisation programme keeps them in a strict +2 °C to +8 °C cold chain from manufacturer to arm, yet the last mile — the PHC ILR and the vaccine carrier — is monitored mostly by hand: a health worker reads a thermometer twice a day and writes it in a register. Excursions that happen between readings, or overnight, are simply not recorded. This project builds a low-cost MQTT-based monitoring and alerting system that closes that gap with continuous, timestamped, auditable data.

Introduction

The WHO's immunisation supply-chain guidance treats temperature monitoring as core cold-chain infrastructure, and India's Universal Immunisation Programme runs one of the largest such chains in the world. The failure mode is mundane: compressors fail, power fails, doors are left open. The technology to catch these failures early is now cheap — an ESP32, a DS18B20 probe and a Wi-Fi connection cost less than a thermal box of Hepatitis B vaccine.

Existing System

  • Manual twice-daily thermometer readings entered in a register; no data between readings, no alarms, no history beyond the register itself.
  • Some districts use data-loggers that must be physically carried to a PC to download; alarms, if any, are delayed by days.
  • Commercial IoT cold-chain monitors (₹15,000–₹40,000 per point) exist but are rarely budgeted at PHC level.
  • Limitations: late detection, no accountability trail, no way to correlate an excursion with power supply or door-opening events.

Proposed System

  • Nodes: ESP32 + waterproof DS18B20, publishing JSON readings every 30 s over MQTT (QoS 1) with unique device IDs; a last-will message marks a node offline if it dies.
  • Store-and-forward: when the broker is unreachable, up to 48 hours of readings are buffered in flash and backfilled with original timestamps on reconnect.
  • Broker and store: Eclipse Mosquitto with password auth; a Python ingestion service writes to MySQL tables (devices, readings, excursions, acknowledgements) with indexed time-series queries.
  • Alert engine: rule layer (below 2 °C, above 8 °C, breach persisting beyond 5 minutes) plus a rolling 24 h mean/standard-deviation z-score that catches slow drift such as a failing door gasket; alerts drive the node buzzer, dashboard banner and a webhook stub for SMS.
  • Dashboard: Flask + Chart.js live view, excursion lifecycle (open → acknowledged → closed) with remarks, device heartbeat page and CSV export.

Feasibility Study

  • Technical: all components are open-source and documented; the ML component is deliberately simple (rolling statistics) so it is defensible; a demonstration rig uses a mini-fridge and an insulated box, no real vaccines, hence no licence or biological-safety issues.
  • Economic: node BOM ≈ ₹2,400–₹3,000; broker and services run on any existing lab PC; zero licence cost.
  • Operational: firmware is pre-configured per device; a PHC staff member needs only to read the dashboard and hear the buzzer; data stays within the facility's own network.

Objectives

  1. 01Design and build battery-backed ESP32 + DS18B20 sensor nodes that publish temperature readings over MQTT (QoS 1) every 30 seconds with unique device identity.
  2. 02Implement store-and-forward buffering on the node with timestamp-preserving backfill so network outages leave no data gaps.
  3. 03Deploy an authenticated Eclipse Mosquitto broker and a Python ingestion service that persists all readings into a normalised MySQL schema.
  4. 04Detect cold-chain excursions using WHO range rules with a persistence grace window, plus a rolling 24-hour z-score check for slow drift.
  5. 05Deliver alerts through a node buzzer, dashboard banner and a webhook stub for an SMS gateway, with an open → acknowledged → closed excursion lifecycle.
  6. 06Build a Flask + Chart.js dashboard showing live temperatures, device heartbeat status and an exportable excursion log.
  7. 07Validate the system with simulated excursion tests (warm-water bath, door-open test) and broker/network outage tests.

Scope

In scope

  • Two to three sensor nodes covering one ILR and one demonstration vaccine-carrier box on a single Wi-Fi network.
  • Temperature only (DS18B20 ±0.5 °C accuracy class); no humidity, door or power sensors in v1.
  • MQTT transport (QoS 1, retained device-status messages, last-will offline detection), MySQL persistence, rule + rolling-statistics alerting, Flask dashboard, CSV export.
  • Simulated-cold-chain testing with a mini-fridge and insulated box; no biological material, no medical certification.

Out of scope

  • SMS/WhatsApp delivery through a real paid gateway (a webhook stub is provided and documented).
  • Multi-PHC cloud deployment, GPS tracking of transport vehicles, and LoRaWAN for carrier-in-transit monitoring (future scope).
  • Automatic control of the refrigerator; the system monitors and alerts, it does not actuate.
  • Regulatory compliance documentation (WHO PQS device listing) — we follow the temperature guidance, not the procurement process.

Methodology

The project follows an iterative-incremental SDLC with four working increments, each ending in a demonstrable, testable slice — appropriate because the alert rules and dashboard can only be designed sensibly once real node data flows.

PhaseWeeksActivitiesDeliverable
1. Requirements & design1–2PHC workflow study (secondary sources), sensor/broker selection, schema and topic design, Phase-I reportDesign doc + BCS685 report
2. Node + ingestion increment3–5Node firmware (read → publish → buffer), Mosquitto setup, ingestion service, MySQL schemaOne node streaming into MySQL
3. Alerting increment6–9Threshold + persistence rules, rolling z-score engine, excursion lifecycle, buzzer/webhook actionsAlert engine with test suite
4. Dashboard & hardening10–12Flask/Chart.js UI, heartbeat page, CSV export, outage/backfill tests, soak test (7 days)Complete system v1.0
5. Evaluation & reporting13–14Full test-matrix execution, demo script, final report and PPTPhase-II submission

Testing approach: unit tests for the alert rules (synthetic series); integration tests that publish fake MQTT readings and assert DB rows; scenario tests — warm-water bath for a fast breach, door-open test for a slow drift, Wi-Fi/Broker cut for store-and-forward; a 7-day soak test on the mini-fridge to quantify packet loss and timestamp continuity; every test recorded in a matrix (ID, input, expected, actual, status).

Architecture & tech stack

2 diagrams · 5 technologies · 2 min read

  • C (Arduino framework on ESP32) — sensor-node firmware with MQTT client and offline buffering
  • Python (paho-mqtt, Flask) — ingestion service, alert engine and dashboard backend
  • MySQL — readings, devices and excursion store (BCS403 DBMS)
  • JavaScript (Chart.js) — live temperature dashboard
  • Eclipse Mosquitto — MQTT broker

The system is a four-tier publish–subscribe architecture with durable storage and a rules engine:

  1. Field tier — ESP32 nodes read DS18B20 probes over the 1-Wire bus every 30 s, wrap each reading in JSON (device_id, ts, temp_c, seq) and publish to topic coldchain/<device_id>/readings with QoS 1; a last-will message on coldchain/<device_id>/status marks a crashed node offline.
  2. Broker tier — Eclipse Mosquitto with password-file authentication and a persistent store; it decouples nodes from the backend so the server can restart without touching firmware.
  3. Service tier — a Python ingestion service subscribes to coldchain/#, validates each payload against the schema, de-duplicates by sequence number, and writes to MySQL. The same process hosts the alert engine: WHO threshold rules with a 5-minute persistence window, plus a rolling 24 h mean/σ z-score that flags slow drift; alerts update the excursions table and fan out to buzzer (MQTT command topic), dashboard banner and webhook stub.
  4. Presentation tier — Flask serves the dashboard; Chart.js renders live series from a lightweight JSON API; a heartbeat page shows last-seen per device; CSV export serves the excursion log.
flowchart LR
  DS["DS18B20 probes (1-Wire)"] --> N["ESP32 node<br/>30 s cycle, flash buffer"]
  N -->|"MQTT QoS 1<br/>coldchain/id/readings"| B["Eclipse Mosquitto broker"]
  N -.->|"last-will status"| B
  B --> ING["Python ingestion service"]
  ING --> DB[("MySQL: devices, readings,<br/>excursions, acknowledgements")]
  ING --> AE["Alert engine: WHO rules +<br/>rolling 24 h z-score"]
  AE -->|"command topic"| BUZ["Node buzzer"]
  AE --> WEB["Webhook stub (SMS gateway)"]
  DB --> API["Flask JSON API"]
  API --> UI["Chart.js dashboard +<br/>excursion log + CSV export"]
flowchart TD
  OK["Normal: 2-8 °C"] -->|"reading outside range"| PEND["Breach pending"]
  PEND -->|"back inside within 5 min"| OK
  PEND -->|"breach persists > 5 min"| OPEN["Excursion OPEN + buzzer + banner"]
  OPEN -->|"staff acknowledges with remark"| ACK["Acknowledged"]
  ACK -->|"temperature back in range 10 min"| CLOSED["Closed: duration, min/max logged"]

Key design decisions: QoS 1 gives at-least-once delivery so the sequence-number de-duplication is what guarantees correctness; buffer-and-backfill preserves the true reading timestamps instead of shifting them to reconnect time; and both rule and statistical layers are kept because fast breaches (power cut) and slow breaches (worn gasket) have different signatures.

Modules

4 modules

  1. Module 01

    Sensor Node Firmware

    ESP32 firmware in C: DS18B20 read cycle on the 1-Wire bus with CRC check, JSON payload construction, MQTT publishing at QoS 1 with unique device ID, automatic Wi-Fi and broker reconnection with exponential backoff, flash-resident ring buffer holding up to 48 hours of readings when offline, and timestamp-preserving backfill plus last-will status publishing on reconnect.

  2. Module 02

    Broker & Ingestion Service

    Mosquitto deployment with password-file authentication and persistence; Python ingestion service (paho-mqtt) subscribing to coldchain/#, validating payloads against a schema, de-duplicating by device sequence number, and writing readings into the MySQL time-series table with indexes tuned for range queries; heartbeat tracking that records last-seen time per device.

  3. Module 03

    Alert Engine & Analytics

    Rule layer implementing the WHO +2 to +8 °C band with a five-minute persistence grace window to reject door-opening blips; analytics layer computing a rolling 24-hour mean and standard deviation per device and raising a drift alert at |z| > 3; excursion lifecycle state machine (open → acknowledged → closed) with min/max/duration capture, buzzer command publishing and webhook stub delivery.

  4. Module 04

    Dashboard, Storage & Reporting

    Normalised MySQL schema (devices, readings, excursions, acknowledgements) with range-partition-friendly indexes; Flask JSON API and Chart.js dashboard with live temperature view, excursion table with acknowledge-with-remark action, device heartbeat page and CSV export for the district officer; documentation pages covering setup, calibration checks against a reference thermometer, and the test matrix.

Slides

11 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Cold-Chain Temperature Monitoring & Alerting

  2. Slide 2

    The Cold-Chain Problem

  3. Slide 3

    Problem Statement

  4. Slide 4

    Proposed System

  5. Slide 5

    Why MQTT?

  6. Slide 6

    System Architecture

  7. Slide 7

    Node Design & Store-and-Forward

  8. Slide 8

    Alert Logic

  9. Slide 9

    Database Design

  10. Slide 10

    Demo & Test Results

  11. Slide 11

    Conclusion & Future Scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 15 answered free · 12 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    What is MQTT and why did you choose it over plain HTTP polling for the sensor nodes?

    MQTT is a lightweight publish–subscribe protocol over persistent TCP. Our nodes publish readings to a topic and the backend subscribes, so nodes never need the server's address or availability. Compared with HTTP polling, MQTT keeps the connection open (less energy and latency), supports QoS levels for delivery guarantees, retained messages for instant device status and a last-will that automatically marks a crashed node offline — none of which HTTP gives us.

  2. 02Concept

    Explain the difference between QoS 0, 1 and 2 in MQTT and which you used.

    QoS 0 is fire-and-forget, QoS 1 guarantees at-least-once delivery using PUBACK retransmission, and QoS 2 gives exactly-once with a four-way handshake. We used QoS 1 because it guarantees delivery without the QoS 2 overhead, and we handle its duplicate side-effect ourselves by de-duplicating readings on the sequence number each node attaches, so at-least-once becomes effectively exactly-once in the database.

  3. 03Concept

    What is the WHO-recommended temperature range for vaccines and how does it appear in your system?

    Vaccines must be stored between plus two and plus eight degrees Celsius. In our alert engine this band appears as the primary rule: any reading outside it starts a breach-pending timer, and if the breach persists beyond a five-minute grace window the excursion is opened and the buzzer and dashboard alerts fire. The grace window stops door-opening blips from creating false excursions.

+12 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

6 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

6 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

253 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

253 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

360 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

360 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

6 sources

  1. MQTT Version 5.0 — OASIS Standard
  2. Eclipse Mosquitto — Documentation
  3. DS18B20 — Programmable Resolution 1-Wire Digital Thermometer, Datasheet (Analog Devices)
  4. WHO — Immunization Supply Chain and Logistics: Guidance and Tools (Vaccine Management Handbooks)
  5. Flask — Documentation (Pallets Projects)
  6. scikit-learn — Machine Learning in Python Documentation

Cite this bundle

OnlyProjects. (2026). Cold-Chain Temperature Monitoring and Excursion-Alert System for PHC Vaccine Storage: B.Tech / B.E. Internet of Things project bundle [Educational resource]. https://onlyprojects.online/projects/btech-iot-cold-chain-temperature-monitor-mqtt-alerts

Future scope

1 min read

  • SMS/WhatsApp delivery through a real gateway (the webhook stub already defines the payload contract).
  • LoRaWAN carrier tag — a low-power node for vaccine carriers in transit, backhauling through a campus gateway.
  • Door and power sensors (reed switch + mains monitor) so excursions can be attributed to causes automatically.
  • Predictive alerting — replace the rolling z-score with a forecasting model trained on soak-test data to warn before the range is crossed.
  • Multi-PHC cloud deployment with organisation logins, district-level fleet view and automatic monthly compliance reports.
  • MQTT 5 features — shared subscriptions for hot-standby ingestion and message expiry for stale buffered data.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

B.Tech / B.E.Code included

Aerospace / Aeronautical

Low-Speed Open-Circuit Wind Tunnel with Force Balance for Aerofoil Lift-Drag Measurement

Build a subsonic test tunnel on a student budget, then trace lift and drag on a 3D-printed NACA 0012 against theory

  • C / Arduino Uno (industry-standard extra) — HX711 load-cell and serial logging firmware
  • Python (NumPy, Matplotlib) — calibration, force coefficients and plots
  • MATLAB / Scilab — thin-airfoil theory overlay and regression
  • +4

intermediate14 wk4 students