0% found this document useful (0 votes)
21 views11 pages

Literature Review for EEG 326 Design Project

This document outlines a project focused on designing and constructing an automatic water shower system for hogs to mitigate heat stress, leveraging an ESP32 microcontroller and DHT22 sensor for real-time monitoring and control. The system utilizes the Temperature-Humidity Index (THI) for precise activation of cooling measures, improving animal welfare and operational efficiency while conserving water. The project emphasizes the integration of modern technology in livestock management, showcasing advancements over traditional methods.

Uploaded by

amahchinezim75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views11 pages

Literature Review for EEG 326 Design Project

This document outlines a project focused on designing and constructing an automatic water shower system for hogs to mitigate heat stress, leveraging an ESP32 microcontroller and DHT22 sensor for real-time monitoring and control. The system utilizes the Temperature-Humidity Index (THI) for precise activation of cooling measures, improving animal welfare and operational efficiency while conserving water. The project emphasizes the integration of modern technology in livestock management, showcasing advancements over traditional methods.

Uploaded by

amahchinezim75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Literature Review- GROUP 42 DESIGN PROJECT

Group Members
Amah Chinezimuzo Joan
Akanni Ezra Oluwakayode
Adetunbi Julius Olaoluwa
SOKENU ABIGAIL SENUME
Lewis-Igbafen Osaije Emmanuel
Lawal Muhammed Oladimeji
Project Title: Design and Construction of an Automatic Water Shower System for
Hogs.

Introduction to Heat Stress in Livestock.


Among farm animals, pigs (hogs) are particularly vulnerable to heat stress due to their limited ability to
regulate body temperature. Unlike other animals, hogs do not sweat efficiently and rely on external
means such as wallowing in mud or access to water to cool themselves. In hot climates or during the dry
season, excessive heat can lead to discomfort, decreased feed intake, slower growth, reproductive
issues, and even mortality. Traditional cooling methods, such as manual spraying or water troughs, are
often inefficient and labor-intensive. They may also result in water wastage, increased labor costs, and
inconsistent cooling.

Automating this process can significantly improve both animal welfare and operational efficiency. An
automatic water shower system is a sustainable farm solution that activates based on the presence of
animals or ambient or animal temperature, offering a smart, responsive, and resource-efficient
approach to livestock cooling. This project aims to design and construct an electronic control system
that activates a water spray for hogs when certain environmental conditions are met. The system will
rely on a combination of analog and digital electronic components to sense, process, and actuate
responses, making it a practical application of core concepts in electronic circuits. These systems reduce
labor, improve efficiency, and conserve water.

Technological Evolution in Livestock Cooling


Recent advancements in microcontroller-based systems have paved the way for smart livestock
management tools. Studies by Chukwuemeka & Fadare (2019) demonstrate the viability of using
embedded systems (e.g., Arduino, ESP32) to automate farm operations. Similar designs implemented in
poultry and greenhouse environments employ temperature-humidity sensors and real-time feedback
loops to trigger control mechanisms for climate regulation.

The ESP32 microcontroller stands out for its integrated Wi-Fi, high processing power, and analog/digital
interfacing capabilities, making it a suitable backbone for an automatic shower system. It provides real-
time decision-making ability based on sensor inputs and can be programmed for various response
thresholds.

Review of Existing Systems and Techniques.


Current livestock cooling systems often rely on:

 Manual labor (e.g., spraying)


 Timed misting or fan systems
 Basic temperature-triggered automation

However, many of these systems fail to:


 Integrate both temperature and humidity data
 Factor in real-time constraints
 Provide any user interface or status feedback
 Employ scientifically grounded decision-making tools such as the Temperature-Humidity Index
(THI)

This leads to inefficient cooling, wasted water and power, and reduced animal welfare.

Component Analysis and Operational Logic


Sensor Integration

 The DHT22 sensor, widely used in environmental monitoring, provides accurate readings of
ambient temperature and humidity. These data points are processed using the Temperature-
Humidity Index (THI) formula:

THI= T−((0.55−0.0055×H) × (T−14.5))

Where:

 TT = Temperature in °C
 HH = Relative Humidity in %

THI Interpretation:

 Below 50 – Safe
 50–60 – Mild Stress
 Above 60 – Moderate to Severe Stress

This formula, commonly referenced in livestock climate studies (Gebremedhin et al., 2008), helps
determine the threshold at which thermal discomfort occurs in pigs and is widely used in modern animal
farming as a better indicator of when to activate cooling interventions.

Actuation and Control

 A Relay Module is utilized to bridge low-power control signals and high-power actuation
mechanisms. It manages the flow of current to a Solenoid Valve, which governs water release
through a shower pipe system.
 The Solenoid Valve, once triggered, allows pressurized water to spray the hogs, serving as a
cooling intervention. It is chosen over traditional mechanical valves due to its rapid response
and controllability.

Display & Scheduling Features

 An OLED Display presents live metrics (temperature, humidity, THI score, system status),
offering visual feedback that is essential for farm monitoring.
 The RTC (Real-Time Clock) module ensures that the system operates within defined hours (e.g.,
deactivates post-5:00 PM), conserving resources and avoiding unnecessary water usage.

The Temperature-Humidity Index (THI) combines ambient temperature and humidity into a single value
that more accurately represents heat stress in livestock.

Circuit Diagram.

 ON PROTEUS
 CIRCUIT DIAGRAM ON WOKWI
Link to the circuit: Wokwi - Online ESP32, STM32, Arduino Simulator

 CIRCUIT CODE ON WOKWI


/*
Pigs don’t sweat, so high temperature + high humidity is especially
dangerous for them.
This is where we introduce the concept of:

👉 THI — Temperature-Humidity Index


It’s a widely used metric in agriculture to estimate heat stress in
animals.

A commonly used formula:

THI = temp - ((0.55 - 0.0005 * hunidity) * temp - 14.5)


*/

#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <RTClib.h>

// Pin Definitions
#define DHTPIN 16
#define DHTTYPE DHT22
#define RELAY_PIN 2
#define PIR_PIN 27

// Display size and reset pin


#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET -1

// Thresholds
#define TEMP_THRESHOLD 30.0
#define HUMIDITY_THRESHOLD 70.0

DHT dht(DHTPIN, DHTTYPE);


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
RTC_DS1307 rtc;

void setup() {
Serial.begin(115200);

dht.begin();
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, LOW); // Start with relay OFF
pinMode(PIR_PIN, INPUT);

// Initialize the display


if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;);
}

if (! rtc.begin()) {
Serial.println("Couldn't find RTC");
Serial.flush();
while (1) delay(10);
}

if (! rtc.isrunning()) {
Serial.println("RTC is NOT running, let's set the time!");
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
}

display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.println("Initializing...");
display.display();
delay(2000);
}

void loop() {
float temp = dht.readTemperature();
float humid = dht.readHumidity();

DateTime now = rtc.now();


String yearStr = String(now.year(), DEC);
Serial.println(yearStr);

String hourStr = (now.hour() < 10 ? "0" : "") + String(now.hour(),


DEC);
Serial.println(hourStr);

// if (hourStr > "17") {


// Serial.println("System Disabled..");
// return;
// }

bool relayState = false;


if (isnan(temp) || isnan(humid)) {
Serial.println(F("Failed to read from DHT sensor!"));
return;
}

int thi = temp - ((0.55 - 0.0055 * humid) * (temp - 14.5));


Serial.print("THI: ");
Serial.println(thi);
bool motionDetected = digitalRead(PIR_PIN) == HIGH;
Serial.println(motionDetected);
Serial.println(", motionDetected");

// Use THI threshold to control relay


if (thi >= 30 && !relayState && motionDetected) {
digitalWrite(RELAY_PIN, HIGH);
relayState = true;
Serial.println("Cooling ON");
} else if (thi < 50 || !motionDetected) { // hysteresis
digitalWrite(RELAY_PIN, LOW);
relayState = false;
Serial.println("Cooling OFF");
}

// Serial output for debugging


Serial.print("Temp: ");
Serial.print(temp);
Serial.print(" °C, Humidity: ");
Serial.print(humid);
Serial.print(" %, Relay: ");
Serial.println(relayState ? "ON" : "OFF");

// OLED output
display.clearDisplay();
display.setCursor(0, 0);
display.print("Temp: ");
display.print(temp);
display.println(" C");

display.print("Humidity: ");
display.print(humid);
display.println(" %");

display.print("Relay: ");
display.println(relayState ? "ON" : "OFF");
display.display();

delay(50);

In-Depth Explanation of This Project.


This project aims to implement a real-time, sensor-based cooling system for pigs using an ESP32
microcontroller. The system is designed to respond to calculated heat stress levels (THI) rather than
temperature alone, making it more precise and resource-efficient.

A. Hardware Components

Component Function
ESP32 DevKit-C v4 Central microcontroller
DHT22 Measures temperature and humidity (THI)
SSD1306 OLED Displays sensor values and system status
Relay Module Activates water pump/sprayer
RTC DS1307 Limits system operation to specific hours (e.g., 8 AM–5 PM)

B. Operational Flow

1. System Initialization
o OLED display and sensors are initialized.
o A welcome message appears on-screen.
2. Sensor Data Acquisition
o The system reads real-time temperature and humidity using the DHT22.
3. THI Calculation
o THI is calculated using the established formula.
4. Relay Control
o If THI ≥ 60 → Relay ON → Water shower is activated.
o If THI < 50 → Relay OFF → Shower is turned off.
o Hysteresis prevents rapid toggling.
5. Time Restriction Logic
o Using the RTC, the system disables itself after 5:00 PM to conserve water.
6. OLED Output
o Continuously displays:
 Current temperature (°C)
 Humidity (%)
 Relay status ("ON" or "OFF")
7. Serial Output
o For debugging and record keeping:
 Temperature
 Humidity
 THI value
 Activation time

C. Design Simulation and Validation


Prior to physical implementation, the system is modeled using the Wokwi simulation platform, a widely
adopted virtual environment for embedded system prototyping. It allows for:

 Virtual prototyping of circuit design


 Debugging of embedded code
 Verification of timing and sensor logic

The simulation verifies logical accuracy, pin mappings, and sensor response under varying
environmental conditions.

The project also recommends using Fritzing or Proteus for designing and documenting the circuit layout
—a standard practice in electronics engineering research (Alimoradi & Jamshidi, 2020). In this case, we
made use of the Proteus software.

D. System Evaluation and Prospects


For robustness, the proposed system undergoes reliability testing via repeated trials (e.g., 100
iterations), analyzing consistency, failure rates, and operational stability. This approach aligns with
engineering benchmarks for evaluating embedded solutions in field conditions (Singh et al., 2022).

Future design improvements may include:

 Integration of motion sensors for animal presence detection


 Mobile app linkage for remote monitoring
 Buzzer or alert system for fault notifications

E. Unique Design Features.


 Utilizes THI instead of raw temperature, improving accuracy.
 Includes time-of-day logic to optimize water use.
 Features real-time OLED feedback for transparency.
 Tested in a virtual environment before physical prototyping.
 Introduces hysteresis to prevent relay bounce and wear.

Comparison with Prior Designs.


TRADITIONAL BASIC THIS
FEATURE
SYSTEMS AUTOMATION PROJECT
THI-Based Decision ❌ ❌ ✅
Time-of-Day Control ❌ ❌ ✅
OLED Visual Feedback ❌ ❌ ✅
Simulation Before Construction ❌ ❌ ✅
Hysteresis for Stability ❌ ❌ ✅
Combined Temp & Humidity Logic ❌ ✅ ✅

Conclusion.
This project introduces a scientifically grounded and practically robust solution to manage heat stress in
hogs. By combining the use of the THI formula, time-aware activation, and low-cost IoT components like
ESP32 and DHT22, the system provides:

 Improved animal welfare


 Reduced manual labor
 Efficient water usage

It bridges the gap between basic automated systems and intelligent livestock management, serving as
an ideal example of applied electronics in agricultural engineering.

The integration of electronic components like ESP32, DHT22, Relay, and Solenoid Valves represents a
novel, scalable solution for livestock cooling. Compared to traditional methods, the system is energy-
efficient, responsive to actual environmental conditions, and promotes sustainable animal farming.

The literature consistently supports the development of sensor-driven control systems as key
contributors to modern agriculture. This project not only aligns with those trends but also provides a
practical framework that can be extended to other vulnerable livestock species or climate-sensitive
farming operations.

You might also like