Back to Projects

EarlyEar

Solar-powered cattle ear tag for early detection of Bovine Respiratory Disease

ESP32 SolidWorks FEA 3D Printing Embedded C++ IoT Personal Project

Bovine Respiratory Disease (BRD) is the most economically significant disease in the cattle industry. By the time visible symptoms appear, the animal is already well into infection treatment is less effective and losses are higher. EarlyEar is a compact, solar-powered ear tag designed to detect the earliest physiological indicators of BRD: elevated temperature and reduced movement. The goal is to flag sick animals before symptoms are visible.

Current Status Early development: problem definition, hardware selection, and component sourcing complete. SolidWorks enclosure design and solar bracket FEA in progress.

Development Roadmap

✓ Complete

Problem Definition

BRD detection window, physiological indicators, and monitoring requirements identified.

✓ Complete

Hardware Selection

ESP32 platform, temperature sensor, IMU, and solar charging circuit selected. Parts list finalized.

→ In Progress

Enclosure Design

Compact tag body and angled solar panel bracket modeled in SolidWorks. FEA on bracket hang-off underway.

Upcoming

Prototype Fabrication

3D print tag enclosure, assemble electronics, and validate fit and waterproofing.

Upcoming

Firmware Development

ESP32 firmware for sensor polling, threshold alerting, and low-power sleep cycles.

Upcoming

Field Testing

Validate temperature and movement baselines on healthy animals and test alert logic against known BRD cases.


The Problem — Why BRD Is Hard to Catch Early

BRD accounts for over 70% of feedlot cattle illness and a significant portion of mortality. The challenge is that cattle mask illness instinctively and by the time a stockman visually identifies a sick animal, the infection has typically been progressing for 24–72 hours. Early treatment with the correct antibiotic is dramatically more effective than late intervention, but identifying that window visually at scale is nearly impossible.

The two most reliable early physiological indicators are a rise in body temperature above the normal range (~101–102.5°F) and a measurable drop in movement activity. An ear tag that monitors both continuously and flags deviations from an individual animal's baseline could push the detection window back by one to two days, enough to meaningfully change outcomes.


Hardware Architecture

Core Platform — ESP32-S3 SuperMini 22×18 mm footprint — dual-core, BLE 5.0, built-in WiFi, deep sleep mode for battery-constrained operation. Small enough to fit in the tag body alongside sensors and battery. Two tags + one spare planned from a single order.

Ear Tag Components

# Component Function Qty Notes
1 ESP32-S3 SuperMini Tag MCU + BLE 5.0 radio 3 22×18 mm. Get 3: 2 tags + 1 spare. Waveshare version has best documentation.
2 DS18B20 waterproof probe Ear temperature sensing 3 Placed against inner ear for consistent contact. 5-pack on AliExpress best value. Requires 4.7kΩ pullup resistor per data line.
3 MPU-6050 GY-521 breakout Activity + posture accelerometer 3 Detects movement drop and head position changes. AliExpress 5-pack ~$4 — Adafruit version is nicer but overkill here.
4 LiPo 3.7V 400mAh Tag battery 3 JST-PH 2mm connector. 400mAh = ~5 days autonomy. Verify connector matches ESP32-S3 JST pin before ordering.
5 TP4056 USB-C w/ protection LiPo charging circuit 5 Must get version WITH protection circuit (2 ICs on board, not 1). Protects LiPo from overcharge/overdischarge.
6 Magnetic USB-C connector Field recharging 3 Allows charging without precise alignment on a moving animal.
7 30×25mm solar cell 5V Trickle charge — outdoor pens 2 ~60mA output. Wired to TP4056 IN+. Mounted on angled bracket in SolidWorks design.
8 PETG filament Weatherproof tag enclosure 1 spool Chemical resistant, slightly flexible. 1kg spool covers many tag iterations. Bambu printers available.

Base Station / Gateway

The gateway sits in the barn or pen and collects BLE data from all tags within range, logs to local SQLite, and handles alert logic and any wireless upload. A second ESP32-S3 SuperMini runs as BLE central scanning for tags — same board as the tags, which simplifies the codebase significantly.

# Component Function Notes
9 Raspberry Pi Zero 2W Gateway brain, SQLite, alerts Official $15 MSRP. Adafruit and PiShop are reliable sources when in stock.
10 ESP32-S3 SuperMini (gateway) BLE central — scans for tags, WiFi upload Same board as tag MCU. Covered by order #1.
11 0.96in OLED SSD1306 I2C Live readout display SSD1306 has excellent library support. 5-pack useful for gateway + future experiments.
12 MicroSD SPI breakout CSV data logging Standard SPI module. Adafruit version sturdier but $3.95 vs $0.50 for same function.
13 IP65 project box ~120×80mm Gateway weatherproof housing Clear lid lets you see OLED without opening. Drill for antenna, USB, power.
Estimated build cost — AliExpress-heavy (slow ship): ~$47  ·  Amazon Prime-heavy (fast ship): ~$91  ·  Mixed strategy: ~$68  +  ~$15 for Pi Zero 2W regardless of strategy. Prices current March 2026.

Enclosure Design

The tag body needs to be compact enough to sit on the ear without causing irritation or snagging, rugged enough to survive a feedlot environment, and sealed against moisture and debris. The solar panel mounts on an angled bracket extending from the main body with the angle set so the panel faces skyward during normal grazing head position rather than straight up, improving charge capture throughout the day.

The bracket hang-off is the most structurally demanding feature. It's a cantilevered shelf loaded by the weight of the panel plus dynamic loading from head movement. Finite Element Analysis will evaluate stress at the bracket root and determine whether the printed geometry needs reinforcement or a revised angle.

EarlyEar concept sketch Early concept sketch — tag body with angled solar bracket.
SolidWorks enclosure model SolidWorks enclosure model — tag body and bracket geometry.
SolidWorks assembly — full tag with bracket and panel (in progress)

Solar Bracket Structural Analysis

The angled solar panel bracket is a cantilevered feature loaded by panel weight and the inertial forces from head movement. The bracket root, where it transitions into the tag body, is the primary stress concentration of interest. FEA in ANSYS Mechanical or SolidWorks Simulation will evaluate Von Mises stress and displacement under representative load cases to confirm the design can survive daily use without fatigue failure.

Planned Load Cases

FEA result — bracket Von Mises stress (pending)
FEA result — bracket displacement (pending)

Firmware Plan

The ESP32 will run a polling loop that wakes from deep sleep at a set interval, reads temperature and IMU data, compares against a rolling per-animal baseline, and either logs the reading or triggers an alert if thresholds are exceeded. Between readings the device returns to deep sleep to minimize current draw and extend battery life between solar recharge cycles.

Alert Logic

Baseline approach: Rather than using a fixed species-wide threshold, EarlyEar establishes a per-animal baseline over the first few days of wear. This accounts for natural variation between animals and makes alerts more specific to actual deviation from normal.

Next Steps

This page will be updated with CAD renders, FEA results, firmware, and field testing data as the project develops.