The problem
Milk spoils fast when the cold chain slips — at village collection centres, a chiller that runs too warm or a door left open during intake can push a whole tank past the safe limit before anyone notices. The problem is visibility: the compressor may be running, but nobody knows the actual milk temperature, how long it stayed above 4.0°C, or whether the door was opened during a power cut. This project fixes that with an ESP32-based monitor wired into the chilling unit. Waterproof DS18B20 probes measure tank and ambient temperature, a 5 V relay module switches the compressor on the ESP32's command, a reed switch logs every door opening, an agitator motor stirs on schedule, and a ZMPT101B monitors the mains. A local LCD shows the live state (MILK: 4.3°C, CHILL: ON 4°C), while the dashboard records the 24-hour tank curve against the 4.0°C limit, compressor duty cycle, time-above-limit, and an event log — e.g. "tank reached 4.3°C after milk intake — compressor boost engaged, back under 4.0°C in 22 min."
Waterproof tank probe plus ambient probe, read every few seconds.
Follow the working sequence
How it works
- Two DS18B20 probes (tank + ambient) are read every few seconds by the ESP32; the tank probe is waterproof-sealed for immersion.
- When the tank temperature rises above the 4.0°C setpoint plus hysteresis, the ESP32 energises the relay and the compressor runs until the temperature falls back below the setpoint.
- A reed switch on the tank lid timestamps every opening; the dashboard marks these on the 24-hour curve so intake events are distinguishable from cooling failures.
- The agitator motor is scheduled every 20 minutes to keep the milk temperature uniform across the tank.
- The ZMPT101B mains monitor reports supply voltage; a compressor-off with mains present reads as a control decision, with mains absent as a power event.
- All readings and events are pushed to the cloud dashboard, which draws the temperature curves, computes duty cycle and time-above-limit, and keeps the event log; the local LCD mirrors the live state.
Tech stack:
- ESP32 (WROOM) firmware
- DS18B20 waterproof probes (±0.5°C datasheet)
- 5 V single-channel relay module
- Reed switch (tank door)
- ZMPT101B mains voltage sensor
- 16×2 LCD (local display)
- Cloud dashboard (24-h charts, events)
- MQTT/HTTP telemetry
| Parameter | Value |
|---|---|
| Controller | ESP32-WROOM module |
| Tank probe | Waterproof DS18B20, ±0.5°C accuracy (datasheet) |
| Safe band | Milk ≤ 4.0°C (design target setpoint, configurable) |
| Compressor switching | 5 V relay module, hysteresis control (expected) |
| Door sensing | Reed switch, timestamped openings (expected) |
| Agitator | Scheduled stir every 20 min (configurable) |
| Mains | ZMPT101B, ~230 V nominal (expected) |
| Dashboard | 24-h curves, duty cycle, time-above-limit, event log |
Project features
- [Milk-temperature sensing] Waterproof DS18B20 probe in the tank plus an ambient probe — the DS18B20's ±0.5°C accuracy (datasheet) is the basis of the safe-band control.
- [Compressor control] 5 V single-channel relay switches the compressor with hysteresis around the 4.0°C setpoint; the dashboard reports duty cycle (62% / 14.2 h today in the demo).
- [Door & mains monitoring] Reed switch logs every tank-lid opening; ZMPT101B mains monitor distinguishes compressor-off from power-loss.
- [Agitator scheduling] Agitator motor runs every 20 minutes so the tank temperature stays uniform instead of stratifying.
- [Live dashboard] 24-hour tank vs ambient curve, safe-limit line, door-open markers, sensor/actuator states, cooling-performance panel and event log.
- [Local LCD display] The unit shows live status without the internet: tank temperature, chiller state and setpoint.
- [Cooling performance metrics] Time above 4.0°C today and compressor duty cycle — the numbers a dairy manager actually cares about.
What is included
- Complete ESP32 prototype (probes, relay, LCD, reed switch, wiring diagram)
- Firmware (temperature control, door/mains/agitator logic, telemetry)
- Cloud dashboard (live curves, performance metrics, event log)
- Calibration guide (probe placement, setpoint tuning, hysteresis)
- Project report PDF (background, cold-chain theory, methodology)
- PPT presentation for final review
- Viva Q&A preparation document (DS18B20, relay control, hysteresis, MQTT)
Limitations & prerequisites
- The ±0.5°C probe accuracy is the DS18B20 datasheet value; the built unit's achieved control band depends on probe placement and tank insulation — stated as a design target, not a measured claim.
- A single tank probe cannot capture stratification fully; the agitator schedule mitigates this but does not eliminate it.
- The demo dashboard figures (62% duty cycle, 18 min above limit) are illustrative simulation data from the demo app, not measurements from a built unit.
- The relay switches the compressor's control circuit — high-voltage compressor wiring must be done by a qualified electrician, not as part of the student build.
- Cloud connectivity needs Wi-Fi at the collection centre; without it, only the local LCD and logged data are available.
Frequently Asked Questions
Which sensor measures the milk temperature?
A waterproof DS18B20 probe immersed in the tank (±0.5°C per its datasheet), plus a second probe for ambient/shed temperature so the dashboard can separate weather effects from cooling failures.
How is the compressor controlled?
Through a 5 V relay module driven by the ESP32, with hysteresis around the 4.0°C setpoint so the compressor does not short-cycle. The dashboard tracks duty cycle as a health metric.
What does the door sensor add?
The reed switch timestamps every tank-lid opening. On the 24-hour curve, an intake spike is visibly different from a cooling failure — the event log records the distinction.
Why monitor the mains supply?
To tell a control decision apart from a power event: compressor off with mains present is normal control; compressor off with mains absent is a power cut the dairy manager needs to know about.
Does it work without the internet?
The local LCD always shows tank temperature, chiller state and setpoint. Cloud curves, alerts and the event log need Wi-Fi; readings can be logged locally and synced later.
Is this project suitable for a final-year project?
Yes — for IoT & Embedded, Electronics and Electrical programs. It is a real cold-chain application with sensor interfacing, relay control, hysteresis logic and cloud telemetry in one build. Suitable for B.E./B.Tech final-year projects in IoT & Embedded Systems, Electronics and Electrical.
Components & software requirements
- ESP32 (WROOM) firmware
- DS18B20 waterproof probes (±0.5°C datasheet)
- 5 V single-channel relay module
- Reed switch (tank door)
- ZMPT101B mains voltage sensor
- 16×2 LCD (local display)
- Cloud dashboard (24-h charts, events)
- MQTT/HTTP telemetry
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.