Built to order

IoT Poultry Farm Environment Monitor

This project builds an IoT environment monitor for poultry sheds: an ESP32 node with a DHT22 (temperature/humidity), an MQ-137 ammonia sensor and a light sensor watches the shed continuously, plots every reading against bird-comfort bands on a live dashboard, raises heat-stress and ammonia alerts, and can switch an exhaust fan automatically when the shed leaves the comfort zone. Heat and ammonia are the two biggest silent killers of flock performance — this system makes them visible before birds start panting or falling behind on weight. Suitable for B.E./B.Tech final-year projects in IoT &

IoT Poultry Farm Environment Monitor — project thumbnail preview
More project photos (2)

The problem

A poultry shed lives or dies on its air. When temperature climbs past a bird's comfort band, chickens eat less, pant, and stop gaining weight; when ammonia from the litter builds up, respiratory stress quietly follows and mortality rises. Farmers usually discover both problems the slow way — by walking the shed, by smell, by watching birds gasp. This project replaces guesswork with continuous sensing: a single ESP32 node carrying a DHT22 for temperature and humidity, an MQ-137 for ammonia, and a light sensor for photoperiod tracking, reporting to a shed dashboard that judges every reading against bird-comfort bands rather than raw numbers. Crossing a warning band raises a visible dashboard alert; crossing the heat-stress line fires the buzzer and switches the exhaust fan on automatically. It is livestock-welfare engineering first and an IoT data system second.

How it works

  1. The ESP32 samples the DHT22 (temperature/humidity), MQ-137 (ammonia) and LDR light sensor on a fixed cycle; readings are filtered and converted to engineering units in firmware.
  2. Firmware compares each reading against its comfort band (stored, configurable constants) — in-band, warning band, or alarm band — every cycle.
  3. Entering a warning band flags WATCH on the dashboard and logs the event; entering the heat-stress or ammonia alarm band sounds the local buzzer and starts the exhaust fan.
  4. Readings are pushed to the shed dashboard over Wi-Fi, where the gauge needles, the 24-hour comfort-band chart and the event log update live.
  5. The light sensor accumulates on/off hours against the configured photoperiod schedule; deviations appear as schedule-fault entries.
  6. Heartbeats carrying sensor status confirm the node is alive; a missed heartbeat raises a communication-fault entry instead of silently freezing the dashboard.

Tech stack:

  • ESP32 development board
  • DHT22 temperature-humidity sensor
  • MQ-137 ammonia gas sensor module
  • LDR light sensor module
  • Relay module + 5 V exhaust fan
  • Active buzzer (heat-stress alarm)
  • Wi-Fi uplink to shed dashboard
  • Comfort-band dashboard (HTML/CSS/JS single-file demo)
  • Arduino IDE firmware
Parameter Value
Controller ESP32 dev board (datasheet)
Temperature sensing DHT22, -40 to 80 °C, ±0.5 °C (datasheet)
Humidity sensing DHT22, 0–100 %RH, ±2–5 %RH (datasheet)
Ammonia sensing MQ-137, 5–500 ppm NH3 range (datasheet), burn-in required
Light sensing LDR module, lux-indicative (approximate)
Comfort band (default) 18–24 °C · 50–70 %RH · <20 ppm NH3 (design, configurable per bird type)
Heat-stress alarm ≥30 °C default (design, configurable)
Fan control Relay, hysteresis ±1 °C around setpoint (design)
Sampling Fixed cycle with per-cycle band check (design)
Uplink Wi-Fi to shed dashboard (design)

Project features

  • [Comfort-band firmware logic] Temperature, humidity and ammonia are judged against configurable comfort bands (e.g. 18–24 °C, 50–70 %RH, <20 ppm NH3 as design defaults), with warning and alarm tiers so the dashboard shows WATCH before it shows ALARM.
  • [Heat-stress alerting] Temperature breaching the alarm line fires a local buzzer and raises a heat-stress event with the exact reading and time — the demo shows how the alert chain looks end to end.
  • [Automatic exhaust-fan control] A relay module drives the shed exhaust fan when temperature crosses the fan-on threshold, with hysteresis so the fan does not chatter around the setpoint.
  • [Ammonia monitoring with MQ-137] The ammonia-specific SnO2 sensor tracks shed NH3 continuously; readings crossing the warn/alarm thresholds are logged with the action taken.
  • [Photoperiod tracking] The light sensor records day/night hours against the configured lighting schedule (layers need consistent photoperiods), flagging deviations on the dashboard.
  • [Live comfort-band dashboard] One screen shows all four gauges with band indicators, the 24-hour temperature curve drawn against the comfort band, the event log and control status.
  • [Sensor health and heartbeat] The node reports sensor status and heartbeat periodically, so a disconnected DHT22 or an unheated MQ-137 reads as a fault, never as clean data.
  • [Calibration and band-tuning guide] Procedures for MQ-137 burn-in, load-resistor tuning and adapting the comfort bands to the bird type (broiler vs layer, chick vs grower) are documented.

What is included

  • Fully wired ESP32 sensor node (DHT22, MQ-137, LDR, relay, fan, buzzer, 5 V supply)
  • Arduino firmware (sampling, comfort-band logic, fan control, buzzer alarm, Wi-Fi uplink, heartbeat)
  • Comfort-band dashboard matching the demo: gauges, 24 h comfort-band chart, event log, control status
  • Sensor calibration and comfort-band tuning procedure (MQ-137 burn-in, bird-type band tables)
  • Shed mounting guide (node placement height, sensor exposure, fan positioning)
  • Complete wiring diagram and schematic
  • Project report PDF (background, poultry environment science, sensor theory, methodology, observations)
  • PPT presentation for final review
  • Viva Q&A preparation document (comfort bands, heat stress, MQ sensor principles, hysteresis, photoperiod, calibration)

Limitations & prerequisites

  • MQ-137 needs 24–48 h burn-in and periodic recalibration; ammonia readings are indicative comfort bands, not laboratory-grade measurements — the procedure is part of the deliverable.
  • DHT22 humidity accuracy drifts at sustained high humidity (>90 %RH); readings at the extremes are approximate.
  • Comfort bands are design defaults for general broiler/layer guidance — they must be adapted to the actual bird type and age, and the tuning guide explains how.
  • The system warns and ventilates; it does not replace shed management practices (litter management, stocking density) that control ammonia at source.
  • Wi-Fi must reach the shed; the local buzzer and fan work offline, but the dashboard does not log during an uplink outage.

Frequently Asked Questions

Why these three sensors?

Temperature and humidity define the bird's comfort band directly, ammonia (NH3) is the dominant respiratory stressor from litter, and photoperiod tracking matters for layer lighting schedules. Together they cover the shed's air, not just its temperature.

What happens on heat stress?

When temperature crosses the alarm line, the node sounds the local buzzer, starts the exhaust fan automatically and logs a heat-stress event with the reading and time — all of it visible in the demo dashboard.

How accurate is the ammonia reading?

Indicative, not metrology-grade: the MQ-137 needs burn-in, drifts with humidity and responds to some other gases. The project treats it honestly — burn-in, load-resistor calibration, conservative bands and documented limits in the report.

Can the comfort bands change for chicks vs layers?

Yes — the bands are firmware constants, not hardcoded hardware. The tuning guide includes band tables for broiler growers, layers and day-old chicks (which need ~32–35 °C, not 18–24 °C).

Does the fan work if Wi-Fi drops?

Yes. Fan control and the buzzer run in firmware on the node, independent of the uplink. The dashboard shows a communication fault during the outage instead of freezing on stale readings.

Is this project suitable for a final-year project?

Yes — for IoT & Embedded Systems, Electronics and Electrical programs. It combines real sensor interfacing, threshold/hysteresis control logic, a purpose-built dashboard and a genuine livestock-welfare application. Suitable for B.E./B.Tech final-year projects in IoT & Embedded Systems, Electronics and Electrical engineering.

Components & software requirements
  • ESP32 development board
  • DHT22 temperature-humidity sensor
  • MQ-137 ammonia gas sensor module
  • LDR light sensor module
  • Relay module + 5 V exhaust fan
  • Active buzzer (heat-stress alarm)
  • Wi-Fi uplink to shed dashboard
  • Comfort-band dashboard (HTML/CSS/JS single-file demo)
  • Arduino IDE firmware
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 abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of an ESP32 development board at the centre, with sensor nodes, data-flow arrows and a circuit-brain motif representing an AI agent reasoning and sending decisions back.Engineering students building IoT or embedded final-year projects who want to add local AI agent behaviour with ESP32, MQTT and a small language model.

AI Agents on ESP32: Agentic IoT Final-Year Projects

An agentic IoT system observes, reasons, acts, remembers and explains. On ESP32 that means a split architecture: the chip senses and acts while a small local model (Ollama on your laptop) reasons over MQTT — a full LLM needs gigabytes of RAM the chip doesn't have. This guide covers three working patterns (host-reasoned agent, on-device tinyML on ESP32-S3, and a hybrid of both), plus Wi-Fi CSI presence sensing, parts and budget for India, code shapes, and honest limits to state in your report.

Read guide
Technical illustration of three electronic control units linked by a twisted-pair CAN bus cable carrying signal pulses between them.Electronics, E&TC, IoT and robotics students who keep hearing “CAN bus” in EV, automotive and industrial project ideas and want to understand it properly before wiring anything

CAN Bus Basics for Students: How ECUs Communicate

CAN bus is the shared network that lets dozens of controllers in a car, EV or robot communicate over two wires. This guide explains message IDs, arbitration, the physical layer, frame structure, error handling and CAN FD, then walks through building a working two-node bench network with an ESP32 and a transceiver.

Read guide
Illustration of a quadcopter drone build showing labeled parts including frame, motors, propellers, ESCs, flight controller, and battery.B.E./B.Tech Electronics, Mechanical, and Computer Science students planning to build a quadcopter drone who need to select compatible parts without wasting money on mismatched

Drone Build: Parts Selection Guide

Picking drone parts that actually work together is a sizing problem, not a shopping problem. This guide walks the compatibility chain — frame to props to motors to ESCs to battery — with the thrust math, firmware choices, LiPo safety, and the bench-test order that prevents disasters.

Read guide
Get a quotation