🔬 Academic research project · Universidad de Castilla-La Mancha
Research project · IoT · Smart Agriculture · UCLM

Do you know what's
happening in your tank?

A research initiative to develop low-cost IoT solutions for monitoring bulk milk cooling tanks in real-world dairy farms.

Can you really know that the entire profitability of a dairy farm
goes through a refrigerated steel tank — with no monitoring?

Read the research 📐 Explore the prototypes
24/7Continuous monitoring
MonthsBattery life
Plug & PlayNo tank modification
AIAutomatic stage detection
Why it matters

The tank nobody
was watching

Most farms have zero real-time visibility into what happens inside their bulk milk tank. This research addresses that gap with affordable, deployable IoT hardware validated in real farm environments.

Dairy tank issue
01
Silent failure

Problems surface too late

Cooling failures, missed agitation cycles, and early collection go undetected until batch quality is compromised — causing rejections and direct economic loss.

Audit compliance
02
Compliance

No objective record for audits

Veterinarians rely on farmer testimony and sporadic manual checks. Without timestamped data, protocol compliance cannot be verified objectively.

Human error dairy
03
Human error

Misconfiguration goes unnoticed

Incorrect thermostat settings, forgotten maintenance routines, and operator errors are a recurring source of storage failures — invisible without monitoring.

01 / 03
Research prototypes

Two prototypes.
One research platform.

The LactoKeeper research platform comprises two complementary prototypes, both validated in real dairy farm deployments across multiple farms in Castilla-La Mancha.

Prototype 01 · Standalone audit device 💾
LactoLogger

A self-contained floating sensor that records temperature and motion data to a MicroSD card. No network required — designed for on-demand veterinary audits and remote farm deployments.

  • Temperature + 6-DoF IMU logging
  • MicroSD card storage — no connectivity needed
  • Long battery life — months of autonomous operation
  • Food-grade stainless steel AISI 316 enclosure
  • Plug-and-play — no tank modifications required
Prototype 02 · Connected monitoring platform ☁️
LactoCloud

The connected research platform. A LoRaWAN gateway aggregates data from multiple tanks in real time, enabling cloud-based monitoring, energy consumption analysis, and AI-powered stage detection.

  • Real-time monitoring via LoRaWAN
  • One gateway covers multiple tanks simultaneously
  • Energy consumption monitoring of the tank
  • Air quality monitoring of the tank room
  • Full historical data record — always accessible
  • AI-powered automatic stage detection
LactoCloud Platform

Research data.
Visualised in real time.

The LactoCloud dashboard was developed as part of the research to validate monitoring hypotheses and visualise field data from real farm deployments. Screens shown are from live research deployments.

lactocloud · Digital Twin
Digital Twin
Digital Twin
Real-time 3D visualisation of tank state and sensor positions
lactocloud · Live Monitoring
Live Monitoring
Live Monitoring
Per-tank real-time readings — temperature, agitation and operational status
lactocloud · Event Analysis
Event Analysis
Event Analysis
Detailed event log with automatic stage classification by the AI model
lactocloud · Farm Dashboard
Farm Dashboard
Farm Dashboard
Multi-day overview of milking cycles, agitation patterns and cooling events
System architecture

From sensor to
cloud in seconds

📐
Sensing
In-tank monitor
Air quality
Energy meter
📡
LoRaWAN
Long range
Low power
Licence-free
🔌
Gateway
Data collection
VPN secure
Multi-tank
☁️
Cloud
Ingestion
Time-series DB
Remote access
🤖
AI
Stage detection
Anomaly alerts
Energy analysis
📊
Dashboard
Visualisation
Alerts
Audit reports
AI stage detection

The tank tells a story.
The model reads it.

A core research contribution is a machine learning model that automatically identifies every operational stage from raw sensor data — validated against manually labelled field recordings.

The model processes gyroscope magnitude, temperature curves, and temporal patterns to classify each moment in the tank's lifecycle. Any anomaly — a missed wash, irregular cooling ramp, unexpected agitation — is detected and flagged automatically.

Energy consumption data is analysed in parallel, correlating electrical patterns with operational phases. This allows the research to identify inefficiencies, detect abnormal consumption during cooling or agitation, and build a baseline for energy optimisation in dairy storage.

Air quality readings from the tank room and electrical consumption data each come from dedicated sensor nodes — separate from the floating device. Together they provide environmental and energy context that complements the in-tank data, enabling a more complete picture of storage conditions and equipment efficiency.

Milk collection eventVolume drop + temp shift
Active cooling cycleTemperature ramp down
Agitation runningω_mag above threshold δ
Tank washing cycleTemp + vibration pattern
Idle / storageStable within range
Energy consumption patternPower draw per phase
Air quality — room env.Humidity · temp · gas
Technical contributions

Key research
contributions

Hardware

Long battery life

Intelligent deep-sleep scheduling on ESP32 enables months of autonomous deployment — a critical requirement for real farm validation without infrastructure changes.

Sensors🔄

Multi-parameter sensing

The floating device integrates 6-DoF IMU and temperature sensing. Separate dedicated nodes handle air quality in the tank room and electrical energy consumption — each optimised for its specific measurement context.

Connectivity📡

LoRaWAN — farm-scale range

Low-power wide-area network covering entire farms without Wi-Fi infrastructure. One gateway handles multiple tanks simultaneously across different buildings.

Energy🔋

Energy consumption monitoring

Real-time measurement of tank electrical consumption — enabling research into correlations between energy usage, operational phases, and equipment efficiency.

Environment🌬️

Air quality monitoring

Environmental sensors in the tank room capture temperature, humidity, and air quality parameters — providing context for tank behaviour and storage conditions.

Traceability📋

Audit-ready data records

Every event is timestamped and stored. Field data from multiple farms provides the empirical basis for the research findings and AI model training.

Publication

Peer-reviewed research
from real field deployments

LactoKeeper has been validated across multiple dairy farms in Castilla-La Mancha. The research findings have been submitted for publication and are available as a preprint on SSRN.

SSRN Preprint
LactoLogger: A Low-Cost IoT Solution for Monitoring and Optimizing Bulk Tank Milk Performance
Cantarero Navarro, R. · Rubio, A. · López Castiello, A.
Mendes, A. · Pereira, A.I. · Lopez, J.C.
Read preprint ↗ Dataset ↗
SSRN
5060857
The team

Researchers, engineers
and field veterinarians

A multidisciplinary research team from the Universidad de Castilla-La Mancha — combining expertise in embedded systems, IoT, data engineering, and smart agriculture.

Alejandro
Alejandro López Castiello
Principal Researcher
Alejandro.Lopez47@alu.uclm.es
Ana
Ana Rubio Ruiz
Principal Researcher
Ana.Rubio@uclm.es
Rubén
Rubén Cantarero Navarro
Principal Researcher
Ruben.Cantarero@uclm.es
🩺

Developed in collaboration with clinical veterinarians specialised in milk quality. The research has been validated with veterinary professionals with decades of field experience in dairy herd health and storage protocol compliance — ensuring the system addresses the real informational needs of quality auditors and farm advisors.

Contact

Interested in the research?
Get in touch.

Whether you're a dairy farmer, a veterinarian, a researcher, or an institution interested in collaborating — we welcome enquiries about field validation partnerships, research collaboration, or access to the dataset.