The problem
Dairy farmers usually notice a sick animal only after visible symptoms appear — by which time treatment costs more and milk yield has already dropped. Cattle mask early illness well, but two signals change first: body temperature rises and normal movement (grazing, rumination motion) falls. The engineering gap is a low-cost way to watch those two signals continuously on every animal without manual checks. This project builds exactly that: a collar-worn ESP32 node with a skin-contact temperature probe and a motion sensor, transmitting readings over LoRa to a farm gateway, with a dashboard that flags fever and abnormal inactivity per animal. Everything is demonstrated on a real collar prototype plus a working farm dashboard, so the sensing-to-alert chain is fully visible.
How it works
- The collar's DS18B20 probe measures skin-contact temperature while the MPU6050 samples acceleration; firmware converts motion into a 0–100 activity index.
- Every 30 seconds the ESP32 packs temperature, activity index, battery level and collar ID into a LoRa packet and transmits it to the farm gateway.
- The gateway ESP32 receives packets, checks each animal against the fever (39.5 °C) and low-activity thresholds, and serves the farm dashboard over Wi-Fi.
- The dashboard renders one card per animal with live temperature, activity bar, battery and last-packet age, plus a selectable 24-hour temperature chart with the fever band marked.
- When a reading crosses a threshold, the dashboard raises an alert banner, changes the animal's card status, and appends a timestamped entry to the event log.
- The farmer checks the watch list each morning; the buyer-run calibration procedure documents how the fever threshold and activity baseline are tuned for the demo herd.
Tech stack:
- ESP32 (collar node + LoRa gateway)
- DS18B20 temperature probe · MPU6050 IMU
- LoRa radio (SX1276/Ra-02 class)
- 18650 cell with charging module
- Arduino IDE (C/C++ firmware)
- HTML/CSS/JavaScript companion dashboard
- 3D-printed collar enclosure
| Parameter | Value |
|---|---|
| Temperature sensing | 35–42 °C range, ±0.5 °C (DS18B20 datasheet) |
| Fever threshold | 39.5 °C (design target, configurable in firmware) |
| Packet interval | Every 30 s (design target) |
| LoRa range | Approximately 1–2 km line-of-sight (design target) |
| Collar weight | Approximately 120 g including battery (design target) |
| Battery life | Approximately 3–5 days per charge (design target) |
| Gateway capacity | Up to 48 collars in the demo dashboard (design target) |
| Dashboard | Single-file companion web app served over Wi-Fi |
Project features
- [Smart collar hardware] Rugged 3D-printed enclosure on a fabric neck strap carrying the ESP32, temperature probe, motion sensor, LoRa radio and rechargeable cell — a wearable students can actually handle and demonstrate.
- [Body-temperature sensing] DS18B20 probe in skin contact reports body temperature with ±0.5 °C datasheet accuracy; fever flag at a configurable 39.5 °C threshold.
- [Activity index] The MPU6050 motion sensor is converted into a 0–100 activity score, so reduced grazing or rumination movement shows up as a falling trend before visible symptoms.
- [LoRa collar-to-gateway link] Each collar transmits its readings every 30 seconds to a farm gateway — long range on a farm with no Wi-Fi or mobile data needed at the collar.
- [Per-animal farm dashboard] The companion dashboard shows every animal as a card with temperature, activity, battery and last-packet time, plus a 24-hour temperature chart and an event log.
- [Fever and inactivity alerts] Temperature above 39.5 °C raises a fever alert; sustained low activity adds the animal to a watch list, both logged with timestamps.
- [Battery monitoring] Collar battery percentage is reported with every packet so dead collars never silently drop out of the herd view.
What is included
- Working smart collar prototype (enclosure, ESP32, sensors, LoRa radio, battery)
- LoRa gateway node with firmware
- Companion farm dashboard web app (per-animal cards, charts, alerts, event log)
- Arduino firmware source for collar and gateway
- Wiring diagram and 3D enclosure print notes
- Project report PDF (background, sensor theory, LoRa link design, methodology, results)
- PPT presentation for final review
- Viva Q&A preparation document (temperature sensing, IMU activity scoring, LoRa basics, threshold tuning)
Limitations & prerequisites
- The probe measures skin-contact temperature, an approximation of core body temperature — it is an early-warning aid, not a veterinary diagnostic device.
- LoRa range of 1–2 km is a design target for open farm terrain; buildings and hills reduce it, and the buyer verifies range on their own site.
- Battery life of 3–5 days is a design target; heavier packet rates shorten it.
- No GPS or geofencing is in the build — the system tracks health signals per collar ID, not location.
- The collar is a student prototype enclosure, not a chew-proof, weather-sealed commercial tag.
Frequently Asked Questions
How does the collar detect illness early?
It watches the two earliest signals: body temperature (fever above 39.5 °C) and the activity index from the motion sensor. A cow going off its feed moves less before it looks sick, so the falling activity trend plus a temperature rise raises the alert.
Why LoRa instead of Wi-Fi on the collar?
Farms rarely have Wi-Fi across grazing areas. LoRa reaches the gateway from a kilometre or more on very little power, and only the mains-powered gateway needs Wi-Fi for the dashboard.
Is the temperature reading accurate enough?
The DS18B20 is ±0.5 °C per its datasheet. Skin-contact temperature runs slightly below core temperature, so the 39.5 °C fever threshold is a design target the buyer tunes during the calibration procedure — the report explains this honestly.
What does the dashboard show?
One card per animal with live temperature, activity bar, battery percentage and last-packet time, a 24-hour temperature chart with the fever band marked, and a timestamped event log of alerts.
Is this project suitable for a final-year project?
Yes — for IoT, Embedded Systems and Electronics programs. It combines wearable embedded design, wireless communication, sensor interfacing and a full dashboard, with honest, defensible viva material. Suitable for B.E./B.Tech final-year projects in IoT, Embedded Systems and Electronics.
Components & software requirements
- ESP32 (collar node + LoRa gateway)
- DS18B20 temperature probe · MPU6050 IMU
- LoRa radio (SX1276/Ra-02 class)
- 18650 cell with charging module
- Arduino IDE (C/C++ firmware)
- HTML/CSS/JavaScript companion dashboard
- 3D-printed collar enclosure
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.