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.
- Parts
- ₹3,795
- Build
- 12 weeks
- Board
- ESP32
- Objectives
- 6
Block diagram
- DS18B20 probesMeasure temperature inside the box
- ESP32Logs and checks the 2 to 8 °C range
- Backup batteryKeeps logging in a power cut
- SD card and RTCKeep a timestamped record
- Buzzer and displayWarn on a break
- 4G modemSends SMS alerts and calls over the mobile network+
- Cloud dashboardStores readings, plots trends and sends alerts+
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).
- To send SMS alerts through a 4G modem where no Wi-Fi is available.
- To publish readings over MQTT and show them on a live dashboard with threshold alerts.
Parts and specifications
- ESP32 DevKit V1Dual-core 240 MHz, 520 KB SRAM, Wi-Fi + Bluetooth, 3.3 V logic, 12-bit ADC (use ADC1 pins when Wi-Fi is on)₹450Buy
- DS18B20 waterproof probe−55 to 125 °C, ±0.5 °C from −10 to 85 °C, 9 to 12-bit, 1-Wire with 4.7 kΩ pull-up, 750 ms at 12-bit₹240Buy
- DS3231 RTC moduleTemperature-compensated, ±2 ppm (about 1 minute a year), I²C 0x68, CR2032 backup₹150Buy
- TP4056 charger with protection1 A CC/CV Li-ion charging to 4.2 V, DW01 protection cuts at about 2.5 V₹40Buy
- Insulated box for testing₹300
- A7670C 4G LTE module4G Cat-1 with 2G fallback, SMS, calls and data, works with any Indian SIM including Jio; 3.4 to 4.2 V, 2 A peaks₹1,500Buy
- LM2596 buck converter (set to 4.0 V for the modem)4 to 40 V in, 1.25 to 37 V out, up to 2 A continuous (3 A peak), about 85% efficient₹90Buy
Total about ₹3,795 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
12-bit gives 0.0625 °C steps but takes 750 ms per conversion; one reading a minute is plenty.
Alarm when outside 2 to 8 °C for over 5 minutes, which needs 5 consecutive minute readings: one stray reading does not raise it.
One line about 40 bytes a minute = 57.6 KB a day = 21 MB a year; a 32 GB card holds decades.
About 45 mA average with Wi-Fi off. 2600 mAh × 0.8 / 45 ≈ 46 hours of logging in a power cut.
Pin map
| Signal | Pin or connection |
|---|---|
| DS18B20 data (both probes) | GPIO 4 (4.7 kΩ pull-up, one bus) |
| SD card CS / SCK / MOSI / MISO | GPIO 5 / 18 / 23 / 19 |
| DS3231 + OLED SDA / SCL | GPIO 21 / 22 |
| Buzzer | GPIO 27 |
Firmware outline
- Read both probes every minute by their 64-bit ROM addresses.
- Write date, time, T1, T2 and power state to a CSV on the SD card, then flush.
- Count minutes outside 2 to 8 °C; alarm at 5.
- Track daily minimum, maximum and time out of range, and show them on the OLED.
- Detect power loss (VIN sense) and keep logging on battery.
Test plan
| Test | Expected result |
|---|---|
| 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 |
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.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
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).
