Final-year projects / Health and agriculture

Vaccine and milk cold-chain temperature logger

Vaccines and milk spoil when the cold chain breaks, and rural health centres and dairies often have no record of it. A logger that records temperature and alerts on breaks gives proof and warning.

ESP32Mini or Major projectECE, EIE, CSE, BME
ESP32DS18B2029.2°CBUZZERFeatured
Parts
₹3,795
Build
12 weeks
Board
ESP32
Objectives
6

Block diagram

Inputs
  • DS18B20
    DS18B20 probesMeasure temperature inside the box
Controller
  • ESP32
    ESP32Logs and checks the 2 to 8 °C range
Power
  • +
    Backup batteryKeeps logging in a power cut
Outputs
  • SD
    SD card and RTCKeep a timestamped record
  • 23.4°CBUZZER
    Buzzer and displayWarn on a break
  • 4G
    4G modemSends SMS alerts and calls over the mobile network+
  • CLOUD
    Cloud dashboardStores readings, plots trends and sends alerts+

Objectives

  1. To log temperature every minute with a timestamp.
  2. To alert when temperature leaves 2 to 8 °C for more than five minutes.
  3. To keep logging through a power cut on battery, without losing data.
  4. To compare probe readings with a reference thermometer (ice point and a warm bath).
  5. To send SMS alerts through a 4G modem where no Wi-Fi is available.
  6. To publish readings over MQTT and show them on a live dashboard with threshold alerts.

Parts and specifications

Total about ₹3,795 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Resolution and time

12-bit gives 0.0625 °C steps but takes 750 ms per conversion; one reading a minute is plenty.

Excursion rule

Alarm when outside 2 to 8 °C for over 5 minutes, which needs 5 consecutive minute readings: one stray reading does not raise it.

Card capacity

One line about 40 bytes a minute = 57.6 KB a day = 21 MB a year; a 32 GB card holds decades.

Backup runtime

About 45 mA average with Wi-Fi off. 2600 mAh × 0.8 / 45 ≈ 46 hours of logging in a power cut.

Pin map

SignalPin or connection
DS18B20 data (both probes)GPIO 4 (4.7 kΩ pull-up, one bus)
SD card CS / SCK / MOSI / MISOGPIO 5 / 18 / 23 / 19
DS3231 + OLED SDA / SCLGPIO 21 / 22
BuzzerGPIO 27

Firmware outline

  1. Read both probes every minute by their 64-bit ROM addresses.
  2. Write date, time, T1, T2 and power state to a CSV on the SD card, then flush.
  3. Count minutes outside 2 to 8 °C; alarm at 5.
  4. Track daily minimum, maximum and time out of range, and show them on the OLED.
  5. Detect power loss (VIN sense) and keep logging on battery.

Test plan

TestExpected result
Ice water (0 °C) and 40 °C waterWithin ±0.5 °C of a reference thermometer
Box door opened 10 minutesExcursion logged and alarm
Mains removed for 2 hoursNo gap in the log
SD card removed and replacedLogging resumes, error shown meanwhile

These rows start your results table when you plan the project.

Viva practice

Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.

1. Why 2 to 8 °C for vaccines?
2. How do two DS18B20s share one wire?
3. Why an RTC when you have Wi-Fi?
4. What is a cold-chain excursion?
5. How would you prove the log was not edited?

Make it yours

One or two upgrades for a mini project, two to four for a major one.

Build these first

Datasheets and sources to cite

  • Analog Devices DS18B20 datasheet
  • WHO PQS E006 temperature monitoring devices
  • MoHFW Cold Chain Handbook (2016)

About this project

How much does the vaccine and milk cold-chain temperature logger project cost?

About ₹2,205 for the parts in the base list: ESP32 DevKit V1, DS18B20 waterproof probe × 2, MicroSD card module (SPI), DS3231 RTC module, 32 GB microSD card, 0.96 inch OLED (SSD1306, I²C), Active buzzer 5 V, 18650 cell 2600 mAh (branded), TP4056 charger with protection, MT3608 boost converter, Insulated box for testing.

How long does it take?

About 8 weeks for the base project, built on an ESP32. Each upgrade adds time.

Which branches is it suitable for?

Electronics and Communication, Instrumentation, Computer Science / IT (IoT, AI), Biomedical, as a mini or major project.

Which pins and design calculations does it use?

DS18B20 data (both probes) on GPIO 4 (4.7 kΩ pull-up, one bus); SD card CS / SCK / MOSI / MISO on GPIO 5 / 18 / 23 / 19; DS3231 + OLED SDA / SCL on GPIO 21 / 22. Worked calculations on this page: resolution and time, excursion rule, card capacity, backup runtime.

How do I test it?

Ice water (0 °C) and 40 °C water: Within ±0.5 °C of a reference thermometer. Box door opened 10 minutes: Excursion logged and alarm. Mains removed for 2 hours: No gap in the log. SD card removed and replaced: Logging resumes, error shown meanwhile.

What are the objectives?

To log temperature every minute with a timestamp. To alert when temperature leaves 2 to 8 °C for more than five minutes. To keep logging through a power cut on battery, without losing data. To compare probe readings with a reference thermometer (ice point and a warm bath).