Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Final Yr Report Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 73

i

MAKERERE UNIVERSITY

COLLEGE OF ENGINEERING DESIGN ART AND TECHNOLOGY
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

DESIGN AND IMPLEMENTATION OF A TEMPERATURE
REGULATION SYSTEM FOR A CHICKEN BROODING HOUSE

A FINAL YEAR PROJECT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
OF DEGREE OF BACHELOR OF SCIENCE IN TELECOMMUNICATIONS ENGINEERING

BY
TUMUSIIME MODDY 10/U/15842/PSA



ii

DECLARATION
I, Tumusiime Moddy, do hereby declare that the material included in this dissertation is my
original work and has not been submitted wholly or in part for any academic award or
qualification other than for which it is now submitted.
Signature : Date:
.. ...

TUMUSIIME MODDY

Signature: Date:

Mrs. LUTALO JOSEPHINE
(MAIN SUPERVISER)

iii

DEDICATION
I dedicate this project to my mother Mme Maureen Kobusingye

iv

ACKNOWLEDGEMENT
I would like to express my gratitude to Mrs. Lutalo Josephine, my supervisor for her guidance,
support and encouragement throughout this project. Her mastery of the subject and a great deal
of dynamism has made working on this project the most wonderful experience.
I am also grateful to my project partner Mr. Kasujja Charles for his contributions to this project,
as well as all the conversations and technical discussions we shared.
I am truly grateful to Mr. Kwesiga Julius of Consortium for University Students Responsiveness
to Agribusiness Development. (C.U.R.A.D) The knowledge, advice and connections he shared
with us was invaluable.
Finally I would like to thank my family, Mummy, Peter, Andrew, Esther, Emma, Timothy, God
bless you so much for the support and love you have always shown me. Not forgetting my
friends and classmates who have been by my side throughout my campus life.

v

ABSTRACT
Poultry farming is becoming increasingly lucrative in Uganda, with demand for eggs and chicken
meat on the upward trend. However, before these birds are put on market for sale, due diligence
has to be exercised if high quality produce is to be realized. This will necessitates ensuring the
right quality and quantity of feeds, drinking water and additionally suitable temperature for the
brooding house.
Farmers struggle to provide suitable temperatures in the brooding houses as these temperatures
keep fluctuating. The rise and fall in these temperatures is due to the changes in temperature of
the air outside the brooding houses which air enters the brooding houses and brings about
changes in temperature inside the brooding house.
This project investigates how these changes in temperature in a brooding house affect the
poultry, how this can be mitigated by design of a system to automatically regulate the
temperature within the desired range for the birds.
In addition the project provides a means of ensuring adequate water availability for the birds in
the brooding house.

vi

PREFACE
This report details the authors final year project titled, Design and implementation of a
temperature regulation system for a chicken brooding house. It is done in partial fulfillment of
the requirements for a Degree of Bachelor of Science in Telecommunications Engineering at
Makerere University.
This report consists of four chapters;
Chapter one generally introduces this project; defining the problem statement, objectives of the
project, background and methodology.
Chapter two contains the literature review on temperature regulation in a brooding house, the
different components that made up the system, its architecture and physical design.
Chapter three has a description of the design activities, circuit fabrication testing of the system
and implementation.
Chapter four details the results and recommendations for future implementation of the project

vii


Table of Contents
DECLARATION ........................................................................................................................... ii
DEDICATION .............................................................................................................................. iii
ACKNOWLEDGEMENT ............................................................................................................ iv
ABSTRACT .................................................................................................................................... v
PREFACE ..................................................................................................................................... vi
Table of contents ............................................................................ Error! Bookmark not defined.
Acronyms ........................................................................................................................................ x
List of figures ................................................................................................................................. xi
List of tables .................................................................................................................................. xii
CHAPTER ONE ............................................................................ Error! Bookmark not defined.
1.1 INTRODUCTION ........................................................... Error! Bookmark not defined.
1.2 PROJECT BACKGROUND .......................................................................................... 15
1.3 PROBLEM STATEMENT ............................................................................................ 16
1.4 OBJECTIVES ................................................................................................................ 17
1.5 JUSTIFICATION ........................................................................................................... 17
1.6 SCOPE ........................................................................................................................... 17
1.7 METHODOLGY ............................................................................................................ 18
2 CHAPTER TWO ................................................................................................................... 20
2.1 INTRODUCTION .......................................................................................................... 20
2.2 BODY TEMPERATURE REGULATION IN CHICKS ............................................... 20
2.2.1 Methods used to regulate temperature in a brooding house. .................................. 21
2.2.2 The Effects of Very High/Very Low Temperatures to chicks ................................ 24
2.2.3 Poultry Water Need for chicks ................................................................................ 26
viii

2.3 PREPARING A BROODING HOUSE ......................................................................... 27
2.3.1 Providing Temperature in a Brooding House ......................................................... 27
2.3.2 Drinking Water ....................................................................................................... 27
2.4 MICROCONTROLLER BASED TEMPERATURE REGULATING SYSTEM ........ 28
2.4.1 Hardware Requirements.......................................................................................... 28
2.4.2
PIC18F2455 MICRONCONTROLLER
[10]
............................................................... 29
2.4.3 LM35 Temperature Sensor
[11]
................................................................................ 33
2.4.4 Incandescent Bulbs
[12]
............................................................................................ 34
2.4.5 GSM Module
[15]
..................................................................................................... 35
2.4.6 Relay Switches
[13]
.................................................................................................. 36
2.4.7 Liquid Crystal Display (LCD
) [14]
............................................................................ 38
3 CHAPTER THREE ............................................................................................................... 42
3.1 DATA COLLECTION AND ANALYSIS ..................... Error! Bookmark not defined.
3.1.1 Investigating Effect of Low Temperature on Performance and Blood System in
Chicken
[16]
............................................................................. Error! Bookmark not defined.
3.2 SIMULATION LEVEL DESIGN .................................................................................. 42
3.3 SYSTEM DESDIGN AND IMPLEMENTATION ....................................................... 49
3.3.1 Water Level Sensor Design .................................................................................... 50
3.3.2 System Operation ..................................................... Error! Bookmark not defined.
3.3.3 Implementation and Testing ................................................................................... 54
3.3.4 System Implementation .......................................................................................... 54
4 Chapter Four .......................................................................................................................... 57
4.1 Results and Conclusion .................................................................................................. 57
4.2 Conclusion ...................................................................................................................... 57
4.3 Future Scope and Enhancement ..................................................................................... 57
ix

4.4 Recommendations .......................................................................................................... 58
5 References ............................................................................................................................. 59



x

Acronyms

xi

List of Figures
Figure 1: Diagram of a Space heater system
[6]
........................................................................ 23
Figure 2: Diagram of a Radiant Heating System
[6]
...................................................................... 24
Figure 3: One - quart waterer
[9]
.................................................................................................... 27
Figure 4: PIC18F2455 MICRONCONTROLLER
[10]
.................................................................. 29
Figure 5: The LM35 Temperature sensor
[11]
................................................................................ 34
Figure 6: The AT139 GSM Module
[15]
........................................................................................ 35
Figure 7: Circuit to show operation of a Relay with a Transistor
[13]
........................................... 37
Figure 8: Normally open and normally closed Relays respectively
[13]
........................................ 38
Figure 9: Pin configuration of a 16 by 2 LCD
[14]
......................................................................... 39
Figure 10: Snapshoot to show all bulbs/heaters on for temperatures below 35C ....................... 44
Figure 11: Snapshot to show only 100W bulbs off for temperatures 35C -40C ....................... 46
Figure 12: Snapshot to show all bulbs/heaters off for temperatures above 40C ......................... 47
Figure 13: System Design ............................................................................................................. 49
Figure 14: Circuit diagram of the water level sensor .................................................................... 51

xii

List of Tables
Table 1: Table showing Methodology .......................................................................................... 18
Table 2: Table showing Methodology .......................................................................................... 19
Table 3: Water Consumption of Broiler Chickens by Age
[4]
....................................................... 26
Table 4: Features of the AT139 GSM Module
[15]
........................................................................ 36
Table 5 : Table to show pin description
[14]
.................................................................................. 40
Table 6: Table to show basic LCD commands ............................................................................. 41
Table 7: Results of the performance and carcass efficiency
[16]
.... Error! Bookmark not defined.
















xiii

List of Acronyms

A.C Alternating Current
A.D.C Analog Digital Converter
A/D Analog to Digital
BTUh British Thermal Unit per hour
C.P.U Central Processing Unit
C.U.R.A.D Consortium for University Students Responsiveness to Agribusiness Development
Cm Centimeter
CO
2
Carbon dioxide
CS Coding Scheme
D.C Direct Current
DB Data Bus
Dbm Milli Decibel
E.E.P.R.O.M Electrically Erasable Programmable Read Only Memory
E.M.F Electromotive Force
EUSART Enhanced Universal Synchronous Asynchronous Receiver Transmitter
F.C.R Food Conversion Ratio
FR Full Rate
g grams
G.S.M Global System for Mobile Communication
GND Ground
GPRS General Packet Radio Service
HR High Rate
I/O Input/output
IC Integrated Circuit
ICD/IC/ICSP In-circuit Serial Programming
KHz Kilohertz
L.C.D Liquid Crystal Display
LED Light Emitting Diode
M.C.U Microcontroller Central Unit
Mbps Megabits per second
MHz Megahertz
mm Millimeters
MS Milestone
Ohm
OSE Operating System Embedded
RS Register Select
RW Read Write
S.M.S Short Message Service
SMT Surface Mount Technology
SSP Synchronous Serial Port
U.S.B Universal Serial Bus
USART Universal Synchronous Asynchronous Receiver Transmitter
UShs Uganda Shillings
V Volt
V
out
Output Voltage
xiv

W Watt
WP Work Package















CHAPTER ONE: PROJECT INTRODUCTION
1.1 OVERVIEW
This project intends to address the issue of temperature fluctuations in a brooding house and with
the focus being on chicks of between 0 and 14 days. Constant water availability for chicks in a
brooding house will also be addressed. A system to create a favorable temperature range and
ensure water availability has been designed for this project.
1.2 PROJECT BACKGROUND
Poultry keeping is a lucrative business today with high profit returns within a short time. For
example, one chick that costs between UShs1500 and 1700 could be sold at prices between
USshs7000 and 20,000
[1]
.However, before they can attain that value, chicken have to be taken
care of well, by provision of enough feeds, water, protection and favorable temperatures at
different ages of growth.
Maintaining the correct temperature is crucial in chick brooding, especially during the first seven
to ten days of the chick's life. Early in life, the chick cant sufficiently regulate its metabolic
processes to adequately control its body temperature. As a result, the young chick is dependent
on the ambient temperature to maintain its body temperature
[2].
If the room temperature
decreases, the chick's body temperature will decrease. Likewise, if room temperature increases,
the chick body temperature will increase.
In commercial settings, the farmer prepares a brooding house for the chicks and tries to provide
the warmth, chicken feeds and water periodically. The warmth is provided using heated pots,
charcoal stoves or incandescent bulbs. These systems may appear to be relatively cheap but are
actually characterized by indirect high costs and inefficiencies. The costs manifest in form of
decreased growth and development, poorer feed conversion, increased incidences of diseases and
deaths which ultimately translate into diminished profits or complete losses.



1.3 PROBLEM STATEMENT
Maintaining the favorable temperatures for chicks in a brooding house is difficult because these
temperatures keep varying according to the temperature of the environment. The methods used
are labor intensive and yet if this is used as an excuse for not maintaining the temperature within
the desired range, the birds will be adversely affected.
If the birds are exposed to cold temperature, they will try to save or generate heat by huddling or
by consuming a lot of feed to keep warm. This leads to a poor Food Conversion Ratio, a situation
where the feeds consumed are used to maintain the body temperature instead of nourishment. As
a result, the feeds consumed are not proportional to the rate of growth.
In the opposite case, with temperature too high, the birds will try to give off heat or avoid
producing heat, pant to lose heat (leading to poor Food Conversion Ratio, FCR) when they stop
eating.
[2]
If chicks start panting they can lose 5 to 10g of moisture in the first 24 hours and then
dehydration will occur. When the birds are not comfortable during their growth they will be
more susceptible to infections and have lower immunity
[5]

Water availability is an issue too. This is because according to Viola et al. (2003), a 40% water
restriction decreases the feed intake (542 to 338g), body weight (471to 295g) and FCR (1.28 to
1.37) at 14 days. Ideally, 24ml of water per bird in the first 24 hours need to be guaranteed.
[6]




1.4 OBJECTIVES
Main objective
The main objective of this project is to design and implement a prototype to regulate temperature
and also ensure water availability using SMS alerts sent by phone for low water levels.
Specific objectives
1. To design a system to regulate temperature between 35C and 40C and also send an
SMS alert for a low water level.
2. To implement a working prototype in a brooding house.
1.5 JUSTIFICATION
By using bulbs of different ratings, different levels of heat should be achieved. In this way the
temperature is able to be regulated if bulbs of different ratings are switched off, while others are
left on. Temperature regulation will be automatically done by the system, therefore reducing
manned operation during temperature regulation.
SMS alerts for low water levels will ensure quick response to water shortage since the person in
charge will get informed wherever they are within a short time. The person in charge will then be
expected to refill the drinkers. Once these measures are implemented, then the farmers poultry
produce will be greatly boosted.
1.6 SCOPE
This project is restricted to design of a system to regulate temperature between 35C and 40C
using incandescent bulbs. The system is also expected to ensure that when water level falls
below 6cm, an SMS is sent to a phone assigned to receive the message. Both the temperature
level and the low water level situation will be displayed on an LCD.




1.7 METHODOLGY




















Milestones Work packages Activities Deliverables
MS1
Requirement
Specification
WP1-
Determining
the functional
requirements
1. Elicitation
2. Analyzing
gathered
requirements
3. Developing
requirements
specifications

Functional
Requirements
WP2-
Determining
non functional
requirements
System quality
attributes
MS2
Developing a
system
design
WP3-
Developing
logical design
1. Selecting
technologies
2. Designing
system
architecture
3. Purchasing
circuit
components
Logical system
design
WP4-
Developing the
physical design
Physical
system design
Table 1: Showing Methodology


METHODOLOGY



Milestones Work packages Activities Deliverables
MS3
Implementation
of design
WP5-
Determining of
tools and
software
needed for the
system
1. Researching
and
downloading
software
Working
system
prototype
WP6-
Implementating
logical design
1. Writing code
2. Running,
debugging the
code
WP7-
Implementation
of the physical
design
1. Installing and
configuring the
system
2. Debugging
MS4
Documentation
WP8-
Developing the
system
documents
Developing
specification
documents, reports and
user manuals
All of the
system
documents
Table 2: Showing Methodology


CHAPTER TWO: LITERATURE REVIEW
1.8 INTRODUCTION
One of the goals during brooding is to maintain chicks within their comfort zone, which is,
where they are not using energy to gain or lose heat to maintain body temperature. When birds
are kept in environmental temperatures above or below their comfort zone, more energy must be
expended to maintain body temperature. This extra energy will ultimately be created by the feed
consumed. Therefore, the energy from the feed will be used to maintain body temperature
instead of growth and development resulting in poor Feed Conversion Ratio. Thus, the
environmental temperature plays a major role in determining the expenditure on feeds for chicks
which ultimately affects the capital expenditure.
In addition, water availability is a very important aspect as far as proper growth and development
of chicks is concerned. In moderate weather a hen may drink a pint of water a day. In hot
weather, that amount nearly doubles
[4]
. Birds roaming freely may drink more or less than
confined birds, depending on the moisture content of the food they consume and how active they
are.
This project studies the temperature and water needs of brooders and scientifically tries to
provide a solution to the problems faced in availing the two necessities in a brooding house.
1.9 BODY TEMPERATURE REGULATION IN CHICKS
The temperatures in the brooding house change according to the changes in weather/ temperature
of the environment. Since the weather keeps changing, the temperature outside and inside the
brooding house too has to keep changing. This implies that the chicks body temperatures are
bound to keep changing as well.
If the temperature in a brooding house falls, chicks experience cold conditions. To prevent their
internal body temperature from falling, the birds raise their metabolic rate. On the other hand, if
the brooding house temperature becomes too hot, birds must mobilize water to lose heat through
evaporative cooling and avoid death from overheating. This is because birds have no sweat


glands and so heat must be lost through the respiratory tract by panting, or by the rapid vibration
of the upper throat and thin floor of their mouth.
[5]
Chicks that are feeling cold can also be seen huddling together (even next to the side wall) and
will tend to sit in feeder pans. Chicks that are feeling hot on the other hand will move away from
the brooders and furnaces and will stretch out on the litter in efforts to cool themselves.
Chicks are better equipped to regulate body temperature once they have acquired a considerable
amount of feathers, and that is at the age between 12 to 14 days. This is because during hot days
feathers keep birds cool whereas during cold days, they insulate the birds to keep warm. At that
stage, feathers are used to trap pockets of air close to the bird's body to help keep it warm. How
much body heat they keep can be adjusted by arranging their feathers to trap more or less air.
Chicks do this fluffing their feathers in the cold as a way of adding extra air to trap body heat and
keep warmer. However, below 12 days chicks have to be seriously aided to regulate their body
temperature.
[5]
1.9.1 Methods used to regulate temperature in a brooding house.
Whereas there are no measures to control the temperature changes of the environment, different
methods have been locally devised to try to control temperature changes inside a brooding house.
Some of these methods are locally devised, without scientific analysis of the efficiency of their
operation.
1.9.1.1 Heated pots
In this method, farmers fill pots with hot charcoal so as to preserve the heat in the pot for a long
time. Pots are used because they are made of clay and therefore cant be burnt by the hot
charcoal. In addition, materials made from clay are good conductors of heat which can easily be
radiated into the surrounding. This method is cheap to use, however, it has no ability of adapting
to the temperature requirements in the brooding house. This would be by increasing heat when
temperatures are cool and reducing heat when the temperatures are hot.
1.9.1.2 Charcoal stoves
Charcoal stoves are also locally known as sigiris. These are fitted with hot charcoal to provide
heat in a brooding house. This method is however very inefficient because the hot charcoal is
exposed to wind and therefore burns away quickly compared to the heated pots charcoal. It is


.also dangerous because the chicks are likely to get into the charcoal and get burnt besides the
charcoal stove being too hot since its made of steel. It is also an inefficient method of
temperature regulation.
1.9.1.3 Use of Incandescent bulbs
These bulbs are able to provide both light and heating in a brooding house. Because incandescent
bulbs have low energy efficiency, only 10% is used for lighting and the 90% is released as heat.
It is this heat that that is used to raise the temperature in a brooding house. The method however
lacks the adaptability to the changes in the brooding house. Temperature inside the brooding
house may increase outside the required range leading to hot conditions with their accrued
negative implications.
Although these are barely used in Uganda, Forced hot air Space Heaters and Radiant Brooders
are some of the advanced methods used to regulate temperature in brooding houses in developed
countries.
The decision to use either of the two is not clear cut, however, when the requirement is for chicks
of up to about two weeks of age, space heaters are a better option since they radiate heat to the
floor, which heat then ascends into space to form warm air. It is this warm air that provides the
suitable temperature for the chicks. These therefore dont have to be many to provide the right
temperature and this makes them more economical than radiant heaters.
1.9.1.4 Space heaters
Space heaters are able to provide a relatively heated room from the floor to the ceiling, given the
heating system is well designed. The system uses forced-air heaters that range from 15,000
BTUh to over 300,000 BTUh, with poultry brooding houses, they are commonly rated between
80,000 to 250,000 BTUh. The industry standard is to provide around four heaters in a 500-foot
long broiler house, rather than one or two large heaters. This improves heat distribution in the
house.
[7]




Figure 1: Diagram of a Space heater system
[6]

1.9.1.5 Radiant brooders
Radiant brooders on the other hand make use of radiation to provide heat at the floor level and
at poultry near the heater. The amount of radiation delivered on a surface depends on the
temperature of the radiating element and the distance between the radiating element and the
surface. In order to be heated, an object must be as close as possible to the hot radiating object in
the brooder. The location of the radiating element is based on the number of chicks that can be
warmed comfortably without causing the chicks to pile up near it. The comfortable temperature
zone of a radiant brooder is reflected in a pattern in which the chicks surround the feeder or
drinker.



Figure 2: Diagram of a Radiant Heating System
[6]

Modern radiant brooders have automatic ignition and more uniform radiant heating than older
models. Good radiant brooders have large radiant zones because they have large radiant
elements, are fuel efficient, and can be hung five feet from the floor. They typically provide a 9-
12m diameter heated zone.
[7]
However, these methods mentioned above are unaffordable to the local farmers in Uganda who
prefer to use the first three methods; heated pots, charcoal stoves or incandescent bulbs.
1.9.2 The Effects of Very High/Very Low Temperatures to chicks
Chicks between 0 to 14 days lack the feathers that would have aided the regulation of their body
temperature. As a result, their bodies are susceptible to the negative repercussions of
temperatures being too low/high. The desirable temperature for chicks between 0 to 14 days is
35C to 40C. Temperatures outside this range for such chicks have been proved to cause the
following problems;
1.9.2.1 Suppression of the immune system of chicks
The Research has shown that the surrounding temperatures may have bearing on the immunity of
poultry. The mechanism by which this happens is speculated to be the increase in the adrenal
gland due to increase in stress level of serum corticosteroids, which causes suppression of cell


proliferation factor. The intensity and duration of the stress induced by high temperature may
impair the immune system of the birds. Some of the diseases that affect poultry include;

Avian influenza
Fowl typhoid
Newcastle disease
1.9.2.2 Poor feed conversion ratio
Ambient temperature in a brooding house does much to determine the feed conversion ratio of
poultry. In cold temperatures, chicks will eat more feed but many of the calories are used for
warmth, they are not used for nourishment. This is because chickens are warm blooded and so
try always to maintain their body temperature warm. At optimum temperatures, chicken are able
to convert the feeds into nutrients that are consumed by the body. On the other hand, at high
temperatures, less feeds are consumed and those that are consumed are converted less efficiently.

Feed efficiency is calculated by dividing feed intake by weight gain to find the feed conversion
ratio-FCR. Higher numbers of feed efficiency therefore imply good Food Conversion Ratio and
vice versa.
1.9.2.3 Panting in chicks
When temperatures are so high, in order to generate heat for their bodies, chicks start panting.
Panting removes heat by the evaporation of water from the moist lining of the respiratory tract.
However, panting itself generates body heat, and it causes poultry to eliminate water from the
body. This adversely affects the birds because it leads to weight loss (water is lost as vapor),
productivity and overall performance of the birds.
It can induce respiratory alkalosis, which occurs because the bird "blows off" excessive carbon
dioxide (CO
2
) when it pants. As a result, body fluids become more alkaline, causing their
kidneys to excrete excessive amounts of several electrolytes.
[5]
Evaporative heat loss typically
becomes the primary method by which birds regulate their body temperature unless proper
ventilation is provided and other steps are taken to reduce heat stress.


1.9.3 Poultry Water Need for chicks
Water consumption is directly related to the temperature of the surroundings. Once air
temperatures exceed the required temperature for the given age of chicken, the expected water
consumption can increase above normal consumption rates. Poultry are unable to sweat as a
means of regulating body temperature.
Their method of heat control involves increasing the respiratory rate (panting) to expel surplus
heat. This results in the release of large amounts of moisture from the bird that must be replaced
lest the bird becomes dehydrated. To combat this dehydration, the birds are provided with water
constantly.
The table below shows an estimate of the daily water consumption of 1,000 broiler chickens at
different stages of growth. It also illustrates the effect air temperature can have on their water
consumption rates.
Age in
weeks
Water requirement at
21C
Water requirement at 32 C.
1 to 4 50-260Litres
(1000birds/day)
50-415Litres (1000birds/day)
5 to 8 345-470Liters
(1000birds/day)
550-770Litres (1000birds/day)

Table 3: Water Consumption of Broiler Chicken by Age
[4]
At unfavorably high temperatures (above 40C.), chicks need much more water than at just
32C. Water is used to compensate for the loss through moisture during panting at such hot
temperatures. Water is also very vital for healthy growth and development of the birds and so
should be in constant supply. According to Viola et al, 40% deprivation of drinking water leads
to weight loss (471-295g) at 14days of age.
[4]



1.10 PREPARING A BROODING HOUSE
1.10.1 Temperature in a Brooding House
Before chicks can be introduced to the brooding house, the place has to be well prepared for their
comfortable living. First of all the brooder area has to be warmed up, 24 hours in advance. Since
day old chicks have body temperatures of about 39C, the heat provider should be able to
provide this temperature.
A 250-watt heat lamp suspended 18-24 inches over the brooding area that is completely
surrounded by a draft guard 12-18 inches high will brood 75 chicks at 35C, minimum
[**]temperature. If the minimum temperature is higher, one chick is added for each degree. If the
minimum temperature is lower, one chick is subtracted per degree.
1.10.2 Drinking Water
Chicks should have water available right away. This water should be warm since day old chicks
easily become cold. A 1057cubic meter (m
3
) chick waterers placed on3/4" or 1.5" thick lumber
scraps can be used.

Figure 3: 1,057cubic meter (m
3
) waterer
[9]

They ensure the water is close to the ground for easy access by the chicks and they can be 4-6
waterers for every 100 chicks. Ideally, the chicks should be fed about three hours after they've
been placed in the brooder. This gives them time to drink first.
Chicks should have water available right way. It should be warm; day-old chicks are easily
chilled. I use 1057m
3
chick waterers should be placed on 3/4" or 1.5" thick lumber scraps about


4 inches square. This keeps the waterers from sinking too far into the litter. The waterers are
placed pretty close to the floor, though, because chicks have no instinct to search for water much
above ground level.
MICROCONTROLLER BASED TEMPERATURE REGULATING SYSTEM
Having investigated the need to have a way of maintaining temperature within a given range, in a
brooding house, a system to do this was deemed necessary. Since the temperatures in a brooding
house keep changing according to the environmental temperatures, this kind of system needs to
read the ambient temperature, compare it with the preset range and if its out of the range,
intelligently adjust it to fall back within the range.
This kind of system would require a microcontroller to provide the needed intelligence to govern
its operations. On the whole, the system will require the following hardware.
1.10.3 Hardware Requirements
i. PIC18F2455 MICRONCONTROLLER
ii. LM35 TEMPERATURE SENSOR
iii. ADC
iv. LCD (16x2)
v. RELAYS
vi. INCADESCENT BULBS
vii. 10 RESISISTORS
viii. A.C POWER SUPLLY
ix. GSM MODULE
x. BREADBOARDS






1.10.4 PIC18F2455 MICRONCONTROLLER


The PIC18F2455 belongs to the family of the PIC 18 microcontrollers. It is an 8 bit high
performance microcontroller (computational performance) and a low power consuming device
(nanowatt). It has large amounts of RAM memory for buffering and Enhanced FLASH program
memory making it ideal for embedded control and monitoring. It is ideal for applications that
benefit from the availability of three serial ports: FS-USB (12Mbit/s), IC and SPI (up to
10Mbit/s) and an asynchronous (LIN capable) serial port (EUSART).
[10]


Figure 4: PIC18F2455 MICRONCONTROLLER
[10]

I/O PORTS
Depending on the selected device and the features enabled, there up to five ports available. Some
of the pins of the I/O ports are multiplexed with an alternate function from the peripheral features
on the device. In general when a peripheral is enabled, that pin may not be used as a general
purpose I/O pin. Each port has three registers for its operation. These registers are;


The TRIS register (data direction register) PORT register (reads the levels on the pins of the
device)
The LAT register (output latch) /data Latch is useful for readability-write operations on the value
driven by the I/O pins.
PORT A: is an 8-bit wide, bidirectional port. The corresponding data direction register which is
the TRISA which when set to bit 1 will make the corresponding PORTA pin an input (i.e. put the
corresponding output driver in a high-impendence mode). Clearing TRISA to 0 will make the
corresponding PORTA pin an output (i.e. put the contents of the output on the selected pin).

PORTB: PORTB is an 8-bit wide, bidirectional port. The corresponding data direction register is
the TRISB. Setting a TRISB to bit 1 will make the corresponding PORTB pin an input (i.e put
the corresponding output driver in a high-impendence mode). Clearing a TRISB bit to 0 will
make the corresponding PORTB pin an output (i.e. put the contents of the output latch on the
selected pin)

PORT C: is a 7-bit wide bidirectional port. The corresponding data direction register is TRISC.
Setting a TRISC bit to 1 will make the corresponding PORTC pin an input (i.e put the
corresponding output driver in a high-impendence mode). Clearing a TRISC bit to 0 will make
the corresponding PORTC pin an output.
1.10.4.1 CORE FEATURES OF THE PIC18F2455 MICROCONTROLLER
Nanowatt Technology
Devices in the PIC18 family significantly reduce power consumption by the following features;
Alternate run modes: the controller is clocked from Timer1 source reducing power
consumption by as much as 90%
Multiple idle modes: the MCU can run with its CPU core disabled while the peripherals
are idle. Power can further be reduced to about 4% of that required normally.
On-the-fly Mode Switching: during operation, power-managed modes are invoked by
user code, allowing the user to add power saving algorithms into the software design.
Low consumption in key Modules: Timer1 and watchdog power requirements are
minimized.


Universal Serial Bus (USB)
It incorporates a fully featured USB communications module compliant with USB specification
Revision2.0. The module supports both low rate and full rate communication for all supported
data transfer types. It also incorporates its own on-chip transceiver and 3.3V regulator and
supports the use of external transceivers and voltage regulators.

Multiple Oscillator Options and Features
All of the devices in the PIC18F2455/2550/4455/4550family offer twelve different oscillator
options, allowing users a wide range of choices in developing application hardware.
Other Special Features
Memory Endurance: the Enhanced Flash cells both for the program memory and data
EEPROM are rated to last for many thousands of erase/write cycles up to 100,000 for the
program memory while they are 1,000,000 for the EEPROM. Data retention without refresh is
conservatively estimated to be greater than 40 years.

Self-Programmability: this Microcontroller can write to its own program memory spaces under
internal software control. It uses a boot-loader routine located in the protected Boot Block on top
of the program memory, to create an application that can update itself in the field.

Extended Instruction Set: the PIC18F2455 introduces an optional extension to the PIC18
instruction set. This adds 8 new instructions and an indexed Literal Offset Addressing mode.
This extension has been specifically designed to optimize re-entrant application code originally
developed in high-level languages, like C since it is enabled as a device configuration option.

Enhanced Addressable USART: This serial communication module is capable of standard RS-
232 operation and provides support for the LIN bus protocol. Other enhancements include
Automatic Baud Rate Detection and a 16-bit Baud Rate Generator for improved resolution.
When the Microcontroller is using the internal oscillator block, the EUSART provides stable
operation for the applications that talk to the outside world without using an external crystal.



10-BIT A/D Converter: this module incorporates programmable acquisition time, allowing for a
channel to be selected and a conversion to be initiated, without waiting for a sampling period and
thus reducing code overhead.

Dedicated ICD/IC SP Port: this Microcontroller introduces the use of debugger and
programming pins that are not multiplexed with the rest of the Microcontroller features. This
feature allows users to develop I/O intensive applications while reserving the ability to program
and debug, if it is used in select packages.

Universal Serial Bus Features
USB V2.0 compliant
Low speed (1.5Mbps) and full speed (12Mbps)
1Kbytes Dual Access RAM for USB
Supports 32 endpoints (16 bidirectional)
Streaming Parallel Port (SSP) for USB streaming Transceivers (40/44-pin devices only)
Interface for off-chip USB transceiver
On-chip USB transceiver with on-chip voltage regulator.

Power managed modes
Run: CPU on, Peripherals on
Idle: CPU off, Peripherals on
Sleep: CPU off, Peripherals off
Idle mode currents down to 5.8A
Sleep ,mode current down to 0.1 A
Watchdog timer current 2.1 A typical

Flexible oscillator structure
2 external clock modes, up to 48MHz
Internal oscillator block (8user selectable frequencies, from 31KHz to 8MHz)
User tunable frequency to compensate for frequency drift
Secondary oscillator using Timer1 at 32KHz


Peripheral highlights
High current sink/source 25mA/25mA
Three external interrupts
Four timer modules (Timer0 to Timer3)
Enhanced USART module (LIN bus support)
Master Synchronous Serial Port (SSP) module supporting 3-wire SPI (all 4 modes) and
IC master and slave modes
10bit, up to 13-channel ADC module with programmable acquisition Time
Dual Analogue Compensation with input multiplexing

Special features
C compiler optimized architecture with optimal extended instruction set
Flash/Data EEPROM retention greater than 40 years
Priority levels for interrupts
Single supply 5V in circuit serial
Wide operating voltage range (2.0V 5.5V )
1.10.5 LM35 Temperature Sensor

The temperature sensor belongs to the LM35 series. The LM35 are not only precision integrated-
circuit temperature sensors but their output is linearly proportional to the Celsius temperature.
The LM35 therefore has an advantage over linear temperature sensors calibrated in K, as there
is no need to subtract a large constant voltage from its output to obtain centigrade reading. The
LM35 doesnt need any external calibration or trimming to give its typical accuracy of 14C at
room temperature and 34C over a -55 to 150 C temperature range. Low cost is due to
trimming and calibration at the wafer level.

The LM35s linear output and precise inherent calibration make interfacing to readout or control
circuitry especially easy. LM35 can be used with single power supplies, or with plus and minus
supplies. It draws only 60 A from its supply, so it has very low self-heating, less than 0.1C in
still air. It is rated to operate between 55 to +150C temperature range, while the LM35C is
rated for a 40 to +110C range.
[11]






Figure 5: The LM35 Temperature sensor
[11]
The +Vs can be from 4V to 20V as specified by the pin configuration. To use the sensor Vcc is
connected to +5V, GND to ground and the OUT to one of the ADC (Analog to digital Converter)
channels. This is to ensure that the output is in digital form. This output varies linearly with
temperature since it varies by 10 millivolts per degree centigrade.
1.10.6 Incandescent Bulbs
An incandescent bulb is a light source that produces light by incandescence, a general term to
mean heat-driven light emissions, which includes the simple case of black body radiation.
Approximately 90% of the power consumed by an incandescent light bulb is emitted as heat,
rather than as visible light.
Some applications of the incandescent bulb make use of the heat generated, such as incubators,
brooding boxes for poultry, heat lights for reptile tanks , infrared heating for industrial heating
and drying processes. In cold weather the heat shed by incandescent bulbs contributes to building
heating.
Incandescent light bulbs are usually marketed according to the electrical power consumed. This
is measured in watts and depends mainly on the resistance of the filament, which in turn depends
mainly on the filament's length, thickness, and material. For two bulbs of the same voltage, type,
color, and clarity, the higher-powered bulb gives more light and heat. Some of the common
ratings that exist include; 60W, 75W, 100W etc.
[12]



1.10.7 GSM Module








The AT139 is very compact wireless module base on an Infineon UCL2 platform with an
industry-standard interface. It is a Surface Mount Technology (SMT) package with small
dimension, low power consumption, quad-band (AT139) and dual-band (AT139D) GSM/GPRS
module. The AT139 can provide voice, SMS, fax, data applications for its users.
[12]








Figure 6: The AT139 GSM Module
[15]



Network Features GPRS/GSM
RF Receive Sensitivity <108dBm
Speech Codec Modes FR,EFR,AMR
SMS TEXT/PDU
GPRS Connectivity GPRS Class 10
Coding Schemes CS1,CS2,CS3,CS4
Power Supply 3.3V-4.5V
MCP 64Mb NOR + 32Mb PSRAM
SIM Card Application Support SIM Card: 1.8V/3.0V
Audio Two input/output Audio channel
Pin Amounts 38PINs
Operating System OSE
Dimensions 24(0.1)*24(0.1)*3(0.1)mm
Frequency Bands AT139:
GSM850/ GSM900/DCS1800/PCS1900MHz
AT139D:
GSM900/DCS1800MHz
RF Output Power AT139:
GSM850/GSM900: 33dBm,
DCS1800/PCS1900: 30dBm
AT139D:
GSM900: 33dBm,
DCS1800: 30dBm

Table 4: Features of the AT139 GSM Module
[15]

1.10.8 Relay Switches


A relay switch uses an electromagnet for its switching mechanism. Relays are used when it is
necessary to control a circuit by a low-power signal, or where several circuits must be controlled
by one signal. The signal is a current and this current flows through the coil of the relay to create
a magnetic field. The magnetic field attracts a lever and switch contact are changed. The coil
current can be on or off so relays have two switch positions and most have double throw
(changeover) switch contacts.
[15]



1.10.8.1 Operation of a relay
The coil of a relay passes a relatively large current, approximately 30mA for a 12V relay, but it
can be up to 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot
provide this current and a transistor is usually used to amplify the small IC current to the larger
value which is required for the relay coil. The maximum output current for the 555 timer IC is
200mA so these devices can supply relay coils directly without any amplification.
[13]


Relays allow one circuit to switch a second circuit. A low voltage battery circuit can use a relay
to switch a 230V AC mains circuit. Inside the relay between the two circuits there is no electrical
connection; the link is magnetic and mechanical.



Figure 7: Circuit to show operation of a Relay with a Transistor
[13]

Relays are of two types: normally open or normally closed; in normally open the relays switch
remains open until energized (ON) while in normally closed relays switch is closed until
energized. Relays are shown in de energized position i.e. when there is no current in the control
circuit.






Figure 8: Normally open and normally closed Relays respectively
[13]
Terminals 1 and 3 comprise the control circuit while terminals 2 and 4 comprise the load circuit.
The switch connections of the relays are usually:

COM = Common, always connect to this; it is the moving part of the switch.

NC = Normally Closed, COM is connected to this when the relay coil is off.

NO = Normally Open, COM is connected to this when the relay coil is on.
1.10.9 Liquid Crystal Display (LCD
) [14]


The LCD is a device used for electronic display alphanumeric characters. A 16x2 LCD display is
commonly used in various devices and circuits and it can display 16 characters per line and 2
lines can be displayed. LCDs possess two registers: Data and Command registers. The command
register stores the command instructions given to the LCD. A command can be defined as an
instruction given to LCD to do a predefined task. For example; initializing the LCD, clearing the
screen, controlling the cursor position and controlling the display etc. The data register stores the
data displayed on the LCD screen.
[14]



The advantages of LCDs are as follows:
LCDs are economical.
They are easily programmable.
A number of characters can be displayed.
Very compact and light.
Low power consumption.

LCDs are preferred over seven segments and other multi segment LEDs.
1.10.9.1 Pin Configuration

Figure 9: Pin configuration of a 16 by 2 LCD
[14]











PIN DESCRIPTION
PIN NO. NAME FUNCTION
1 Ground Ground (0V)
2 VCC Supply Voltage 5V
3 VEE Contrast Adjustment: through a variable resistor
4 Register Select (RS) Selects command register when low and data register when high
5 Read/Write (RW) Low to write the register: High to read from the register
6 Enable (EN) Sends data to data pins when a high low pulse is given
7 DB0


8 DATA PINS
8 DB1
9 DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7

Table 5 : Table to show pin description
[14]
1.10.9.2 Programming of LCD
int: initialize the display and sets the module to two line operation
wrchr: prints one character onto the LCD screen
wrins: writes one command to the LCD module. (This is actually just the wrchr sub procedure
with the addition of one line that sets the RS line into instruction mode at the start of the sub
procedure).











1.10.9.3 LCD Commands

CODE (HEX) COMMAND TO LCD
1 CLEAR DISPLAY SCREEN
2 RETURN HOME
4 DECREMENT CURSOR (SHIFT CURSOR TO
LEFT)
7 INCREMENT CURSOR (SHIFT CURSOR
TORIGHT)
5 SHIFT DISPLAY RIGHT
6 SHIFT DISPLAY LEFT
8 DISPLAY OFF, CURSOR OFF
A DISPLAY OFF CURSOR ON
E DISPLAY ON CURSOR OFF
C DISPLAY ON CURSOR BLINKING
F DISPLAY ON CURSOR BLINKING
10 SHIFT CURSOR POSITION TO LEFT
14 SHIFT CURSOR POSITION TO RIGHT
18 BRIGHT TO ENTIRE DISPLAY TO THE LEFT
1C BRING CURSOR TO BEGINNING OF RIGHT
80 BRING CURSOR TO BEGINNING OF 1
ST
LI NE
CO BRING CURSOR TO BEGINNING OF 2
ND
LINE

Table 6: Table to show basic LCD commands






CHAPTER THREE: PRACTICAL WORK DONE
In this chapter, the proposed system was designed and implemented. However, in order to have
foresight of how the system will look like and be operated, a simulation design was first carried
out using Proteus software. Later in this chapter, the system was designed into a physical circuit
that was later implemented in a actual brooding house.
1.11 SIMULATION
The simulation design was carried out using Proteus software which was double clicked and a
working space with interface buttons to design the circuit appeared.
Next, components for building the circuit were selected from library. In menu bar library > pick
device/ symbol. Then one window with the symbols of the circuit components opened.
Components were selected one by one by clicking on one (changing their angle by rotation) and
clicking in the workspace where the component was to be placed, and the component appeared.
After all devices were placed in the workspace, the cursor was put at the pin end and connections
were drawn with the pen symbol. Components were connected as per the circuit shown in figure
10.
A PIC microcontroller was selected mainly because it had 40input and output pins an important
aspect for the circuit design because it required multiple inputs and outputs.
A Darlington transistor was selected because it was an IC made of a number of transistor
circuits. This reduced on the number of elements on the circuit. The Darlington transistor
amplified the current flowing from the microcontroller to the relays. This was because the
current from the microcontroller was low and could not drive the relays. The microcontroller
input/output pins were connected to the Darlington transistor as shown in the snap shot.
Relays were selected to switch on/off the bulbs in response to the output of the microcontroller
via the Darlington transistor.
7 bulbs were placed on the working space one by one and connected to each relay switch and
grounded because they were DC bulbs.
The LM35 temperature sensor was connected to the microcontroller and also grounded.
Considering that the LM35 sensed temperature and produced a corresponding voltage output,
temperature in the simulation was altered by increasing/reducing the voltage at the LM35. This
voltage signal was sent to the microcontroller for interpretation.


A level sensor was represented by a voltage divider connected to the microcontroller and
grounded. The reason was that the level sensor input to the microcontroller would be interpreted
as either a low or high voltage.
A virtual terminal was connected to represent the GSM module having a SIM card inserted in it.
An LCD was connected to the microcontroller to display the apparent temperature in relation to
the output voltage at the LM35 temperature sensor.
Code for the microcontroller and the GSM module was written using C sharp language and
uploaded onto the circuit designed.
In the code; the following conditions were set;
Analog to digital converter bits were configured to be 10
Baud rate set to 115200 symbols per second.
First condition for temperature increase.
Second condition for temperature stabilizing.
Condition to ensure high temperatures are minimized.
Condition to reduce temperature.
Checking for low water level.
Condition to send SMS in-case the water level was low.
The code was uploaded on the circuit and the whole system was run by selecting the last button
in the left bottom corner of the software interface.
Debugging was done rectify the errors in the code and once this was finished the system was
able to run successfully.
To represent a situation where all bulbs would light in case of temperatures below 35, the voltage
at the LM35 temperature sensor was increased in steps and when it reached 200V, all the bulbs
lit up as shown in the snapshot below, in figure 10.











To ensure that all the bulbs were lit, the voltage output displayed on the LM35 was
increased to 240V.

Figure 10: Snapshoot to show all bulbs/heaters on for temperatures below 35C

































To ensure that five bulbs were lit while two were off, the voltage at the LM35 was varied, between 200 V
and 220V.


To ensure that all the bulbs were off, the voltage at the LM35 was reduced by continuosly
clicking the red button on the left of the two buttons on the LM35.
Figure 11: Snapshot to show only 100W bulbs off for temperatures 35C -40C



Figure 12: Snapshot to show all bulbs/heaters off for temperatures above 40C














To demonstrate an alert message sent for low water level, the voltage divider pointer was raised to
bring about voltage increase at its output. This showed that water level was low.

Figure 13: Snapshot of the virtual terminal illustrating the sending of messages.













1.12 SYSTEM DESIGN AND IMPLEMENTATION

Figure 14: System Design
The live wires from the seven bulbs were connected to the 9V relay switches at the two load
pins. These were always open relays meaning they remain open until energized.
The control circuit pins of the relay coil were connected to the transistor collector pins, before
they were connected to the microcontroller. This is because the relays are inductive and therefore
require more current than the microcontroller could accommodate.


The transistor was able to amplify the current from the microcontroller so that this current could
drive the relay switches.
A diode was connected across the output of each relay so that it could suppress back
Electromotive force.
The control circuit pins were both connected to the 9V power supply.
The transistor base pins were then connected to the PIC18F2455 microcontroller via 10
resistors at port D which is a bidirectional I/O port or a streaming parallel port (SPP) of a
microcontroller. The emitter of the transistor was grounded.

The output pin (V
out
) of the LM35 temperature sensor was connected to the Analog Digital
Converter (ADC) at Port A of the microcontroller. The ADC was embedded inside the
microcontroller.

The LM35 would sense temperature and translate it into an output voltage that can be interpreted
by the microcontroller.

ADC was activated for interfacing the temperature sensor and a program was written so that
whatever temperature the sensor sensed it could be displayed on LCD screen.

The 16 by 2 LCD display was connected to the MCU via pins D4, D5, D6, D7, including its
control pins, EN, RW and RS to port B which is a bidirectional digital I/O port on the MCU.
The LCD was then powered by the 5V power supply
The GSM module was interfaced to the microcontroller to cater for the sending of alert messages
when the water levels are lower than 6cm deep. It was powered by the 5V power source.
Code was written such that the microcontroller could switch ON/OFF bulbs/heaters to set the
temperature within the required range (35

C to 40

C) against the ambient prevailing temperature.



Code was written for the GSM module to take commands from the microcontroller of detected
water level, whether low or high. The GSM module would then send messages from a SIM card
inserted in it.
1.12.1 Water Level Sensor Design
To detect for low water level, a level sensor had to be integrated onto the system. Only one level
was required, below which an alert SMS would be sent to the person in charge of the poultry.
The message alerts of low water level and requests for immediate refilling in the drinker. Efforts
to buy a level sensor were futile since this involved shipping one from abroad. For that reason, a
water level sensor was designed as explained below.


A BC547 NPN Bi-polar Junction Transistor was used because it is mainly applied in switching
designs. This would be possible by either forward or backward biasing the base of the transistor.
The transistor was connected in series with a resistor and an LED but all the three in pararrel
with the power supply as shown in the circuit below.

Figure 15: Circuit diagram of the water level sensor
The level sensor was designed by extending the circuit using two wires that it is made of two
wires wound together in order to create two terminals that are separated one from another by
6cm.
The shorter terminal indicated by an arrow acted as the live terminal while the longer terminal
acted as the neutral and the input to the sensor. The live terminal was the stripped, un-insulted
part on the two wound wires and it supplied 5V at this un-insulated part.
The neutral terminal was the longer wire that touched the bottom of the water can. Once the
water was powered at 5V, the neutral was able to return this voltage back to the circuit and
therefore forward biasing the transistor at the base by supplying a Direct Current at the base of
the transistor.
As a result current was able to flow throughout the circuit and therefore the LED was seen to
light, one of the indicators that the water was still powered at 5V and therefore the live terminal
which powered the water was still below the water level.
This meant that the water level was still above 6cm from the bottom and so no alert was sent for
this case.
This is because the current that arrived at the base forward biased the transistor and therefore the
voltage input to the microcontroller which was picked at the base-emitter junction of the


transistor was low. A low voltage input from the level sensor to the microcontroller did not
trigger off any action, but a very high (infinite) voltage input did.
On the hand, when the water level was reduced below the live terminal, that is to say the water
level was less than 6cm from the bottom; the water was no longer powered at 5V.
This meant that there was an open circuit between the two terminals since there was no water
between them to complete the circuit.
There was therefore no input signal to travel through the neutral wire to the base of the transistor.
There was no current to travel to the input and bias the base of the transistor.
The voltage at the base-emitter was so high because of the infinite resistance that was caused by
the open circuit condition. The voltage input to the microcontroller was therefore infinite and
was registered as low water availability and hence triggering off the GSM module to send a
message alert.
The SMS alert was sent from the SIM card inserted in the GSM module to another SIM card
whose cell number was pre-configured in the code of the GSM module.
The circuit design was implemented and below is the snap of the finished circuit but switched
off.

Figure 16: Designed Circuit

1.12.2 System operation



The system used incandescent bulbs (100W, 100W, 75W, 60W, 60W, 60W) to generate the
temperature required (35

C to 40

C).

Before the system was turned on, a SIM card was fixed into the GSM module SIM card slot and
the water level sensor placed inside a container of water full to over 6cm above the bottom of the
container.

When the system was turned on, all the bulbs are expected to light so as to raise the temperature
of the surroundings and this happened.

The LM35 temperature sensor read the temperature provided by the bulbs of different ratings and
produced a voltage (millivolts) output which was fed into the ADC embedded in the
microcontroller and converted into corresponding digital data.

The temperature sensor output in terms of the prevailing temperature created by the bulbs was
displayed on the LCD interfaced to the Microcontroller.

When the water level was low, the LCD displayed a message, sending for low water level.

A message was sent from the SIM card in the GSM module to the phone number set in the GSM
module program. Water level low, immediate Attention required will be the message received.
A snapshot of the messages sent is shown below.















Figure 17: Snapshots of the messages received from the GSM module
SIM card


1.12.3 Testing
The system was first tested using a 45cm by 45cm box where it was placed to act as an
enclosure. This was done to ensure the temperature rose faster for testing purposes.
A SIM card loaded with bonus SMSs was inserted into the SIM card slot of the GSM module.
The water level sensor was dipped into a small container of water filled to about 10cm.
The bulbs were spread out, (approximately 10cm apart) and the system was turned on.
All the bulbs got switched on and the LCD displayed a temperature of 13

C.
This was noted and discovered to be caused by the heating up in the wires of the circuit, before
the temperature from the bulbs could be detected. Thereafter, the temperature kept rising and this
was due to the heat provided by the bulbs that were all lighting. After about 10minutes, the
temperature was 35

C.
At this point two 100W bulbs were expected to switch off. However, this didnt happen until the
temperature read 37

C. This was noted and discovered to be caused by the delay in the system.
The temperature kept varying within 34

C, 35

C, 37

C, 38

C, 39

C, 40

C, 41

C and 42

C for about
2hours. At 44

C, the other bulbs too were switched off, leaving no lit bulb.
After a period of about 20 minutes, all the other bulbs (75W, 60W, 60W, 60W) except the two
100W bulbs were switched on.
The temperature displayed on the LCD started varying as before, displaying, 35

C, 37

C, 37

C,
38

C, 39

C, 40

C, 42

C. This happened for about an hour and a half before all the bulbs were
automatically switched off.
To test for low water level, the water level sensor was raised to about 8cm above the bottom of
the container, leaving it only 2cm deep inside the water.
A message sending for low water level was displayed on the LCD.
An SMS was received shortly. It read, Water level low, immediate attention!!
The test was considered successful!!!
1.12.4 Practical Implementation
The system was implemented at Nabbingo, along Masaka road, Uganda. A poultry farmer, Mr.
Muwanguzi offered a brooding house having about 200 three day old chicks.
To ensure favorable temperatures, heated pots and charcoal stoves were used in addition to
energy saving bulbs of 10W


The brooding house was also well ventilated to allow easy flow of air in and out of the brooding
house.





Water was availed using plastic industry made drinkers and feeds were spread all over the floor
A number of the birds were seen close to the heated pots or the charcoal stoves.
While others were active inside the brooding house, some of them looked weak and inactive.
The system was installed in a section of the brooding house.
The bulbs were spread out, (approximately 10cm apart).
The water level sensor was dipped into one of the drinkers filled with water and a SIM card was
inserted in to the SIM card slot of the GSM module.
The system was turned on.
All the bulbs were switched on to raise the temperature of the section being used.
All the bulbs got switched on and the LCD displayed a temperature of 28

C.
Figure 18: The brooding house used for implementation


Thereafter, the temperature kept rising and after about 5minutes, the temperature displayed was
37

C.
By this point the two 100W bulbs were expected to have switched off. However, this didnt
happen until the temperature read 38

C and then 37

C again. This was noted and discovered to be


caused by the presence of other heat sources.
The temperature kept varying within 35

C, 36

C, 37

C, 38

C, 39

C, 40

C, 41

C and 42

C for
about1 hour. At 42

C, all the bulbs were switched off.


The temperature begun falling and when it starting varying within 36

C, 37

C and 38

C all the
other bulbs (75W, 60W, 60W, 60W) except the two 100W bulbs were switched on.
The temperature displayed on the LCD continued varying, altering thus; 35

C, 36

C, 37

C, 38

C,
39

C, 40

C, 42

C, 44

C. This went happened for about an hour before all the bulbs were
automatically switched off.
To test for low water level, the water level was reduced by scooping out some of the water from
the drinker. A message sending for low water level was displayed on the LCD.
An SMS was received on a phone shortly. It read, Water level low, immediate attention!!
Meanwhile a video of the working system as explained above was captured.
The system operated successfully for 6 hours and it was afterwards dismantled.



2 Chapter Four
2.1 Results and Conclusion
A system was designed to create conducive temperatures in a brooding house and also maintain
them within the right range, that is to say, 35

C-40

C
The temperature was created using six incandescent bulbs of different ratings (100W, 100W,
75W, 60W, 60W, 60W).
Temperature regulation was achieved by use of a PIC18F2455 microcontroller interfaced with a
temperature sensor, the LM35
The apparent ambient temperature was displayed on the LCD screen.
The system ensured availability of drinking water for chicks by sending SMS alerts to warn the
poultry farmer of inadequacy of the drinking water. This was if the water level was below 6cm.
The system was implemented in a physical brooding house and tested to observe the behavior of
the chicks towards the systems operation.
Chicks preferred to feed around the section where the system had been installed for the time it
was present.
2.2 Conclusion
Poultry are homoeothermic creatures that can live comfortably only in a relatively narrow zone
of thermo-neutrality. Chicks between 0 to 14 days lack the ability to regulate their body
temperature. This is because they have not yet developed a sufficient amount of feathers to trap
warm or cool air when it is too cold or too hot. As a result food intake and physiological
response are changed by environmental temperatures that keep changing in the brooding house.

It is therefore very important to create mechanisms to regulate the temperature changes in a
brooding house by keeping the temperature within a desired range. A system has been designed
to regulate the temperature within the range of 35

C-40

C which is the desired temperature range


for chicks between 0 to 14 days. The system also ensures water availability in a brooding house
by sending SMS alerts for low water availability.
With the conducive temperature chicks will be able to be resistant to diseases such influenza and
new castle disease. Food Conversion Ratio will also be improved significantly.
2.3 Future Enhancement
The prototype was bulky; in future a more compact system would be designed, possibly by use
of ICs.
The project did not include a security measure against theft of chicks. This could be achieved by
including an intrusion sensor on the system.


The projects scope did not consider energy efficiency analysis of the system versus the energy
efficiency of other systems serving the same purpose.
There were a considerable number of delays in the system; these still need to be minimized
further.
The water availability component requires the person who receives the message on their phone to
manually re-fill the drinker. It would be better if water was re-filled automatically via SMS or if
a control system was designed to re-fill the drinkers automatically.
2.4 Recommendations
The project involved several expenses which were met with a lot of difficulty. It is recommended
that the University funds some of these projects so that students concentrate on delivering the
project objectives.
It is recommended to use a precisely calibrated level sensor for the case of sensing water level
instead of designing one that involved powering the drinking water. Though the 5V would not
cause any harm to the birds, it increased sources for error of the system












1. References

[1] Minting Money from Poultry Farming, Mr. Kiwanuka Francis Majwega, Ugachick
Poultry Extension Officer interview to East Africa Agribusiness
http//:www.ea.agribusiness.co.ug, July August 2013
[2] Brian D. Fairchild, University of Georgia, Environmental Factors to Control When
Brooding Chicks, 23
rd
October 2006
[3] Rolland .A and Martin .D, Brooding Temperature for Small Poultry Flocks
http://www.gov.mb.ca/agriculture/livestock/production/poultry/brooding-
temperatures-for- small-poultry-flocks.html, June 2002
[4] Kimberly Willis and Rob Ludlow; How to Hydrate Chickens with Plenty of Drinking
Water, August 1999.
[5] Kenneth E. Anderson, Thomas A. Carter, Hot Weather Management Extension
North Carolina State University, www.poultrysite.com; June 2004.
[6] University of Kentucky, College of Agriculture; Radiant Heater
http://www.spaceray.co.uk/uploads/image/Radiant; August 2007
[7] University of Kentucky, College of Agriculture, Cold weather ventilation Poultry
Production Manual, Chapter 8 Tuesday, March25, 2014,
[8] Daniel Ward; Kevin McKague. Water Requirements of Livestock; May 2007
[9] http://www.mypetchicken.com/catalog/Feed-and-Water-Supplies
[10] Microchip PIC18F2455/2550/4455/4550 Datasheet, 12 August 2006
[11] LM35 Datasheet by National Instruments, www.ti.com, August 1999
[12] Spiritus Temporis, http://www.spiritus-temporis.com/luminous-efficacy#overall-
luminous-efficacy, 31 July 2004.
[13] Kevin .R. Sullivan, Understanding Relays, www.autoshop101.com 24 March 1999.
[14] LCD 016M002B Datasheet, www.vishay.comLCD-016M002B Datasheet, Oct 2002.
[15] Colin & Jin Yi, AT139 Hardware Design Manual_V1.3, 15 September 2011.









3 APPENDIX
#include "18f4550.h" //selecting the processor
#device adc = 10 // configuring the analog to digital converter bits
#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NODEBUG //configuring programing mode
#use delay (clock=12M) //setting the oscillator frequency
#use rs232(baud = 115200, xmit = PIN_c6, rcv = PIN_c7) //configuring UART port
#include <lcdd.c>//libray file for lc
int8 CH = false; // triggers sending for low water level
int8 level1 = false; // first condition of temperature increase
int8 level2 = false; // second condition for temperature stabilizing
int8 level3 = false; // condition for decrease in temperature
int8 level4 = false; // condition for critical temperature
int8 on1 = false;/*conditions for setting pin levels on1-on4*/
int8 on2 = false;
int8 on3 = false;
int8 on4 = false;
int counter1 =0;/*conditions for waiting for desired condtion temperature before checking counter1 -
counterx4*/
int counter2 =0;
int counter3 =0;
int counter4 =0;
int counterx1 =0;
int counterx2 =0;
int counterx3 =0;


int counterx4 =0;
float ADC_read(int index);//function to compute the water level and the temperature
void Initialize(); //function to setup the gsm module
void main()// main function
{
float temp, waterlevel; //variables to store water level and temperature
lcd_init();// initializing the LCD Display
delay_ms(100);
lcd_putc("Initializing...");
Initialize();
setup_adc(ADC_CLOCK_INTERNAL); // ADC clock
setup_adc_ports(AN0_TO_AN3); // Input combination
lcd_putc("\f");/*printing to the lcd*/
lcd_gotoxy(1,1);
lcd_putc("Te:");
lcd_gotoxy(1,2);
lcd_putc("Level:");
while(true)
{
check:
temp = ADC_read(0);/*reading temperature and waterlevel*/
waterlevel = ADC_read(1);
lcd_gotoxy(1,1);/*printing to the lcd*/
lcd_putc(" ");
lcd_gotoxy(1,1);


lcd_putc("Te:");
lcd_gotoxy(1,2);
lcd_putc(" ");
lcd_gotoxy(1,2);
lcd_putc("Level:");
lcd_gotoxy(4,1);
printf(lcd_putc,"%.0f",temp);
lcd_gotoxy(7,2);
printf(lcd_putc,"%.0f",waterlevel);
/*checking for prevailing conditions both temperature and waterlevel*/
if(temp<35.00){output_high(pin_e2);output_low(pin_e0);output_low(pin_e1);level1=true;level2=false;l
evel3=false;}
if(temp>=35.00&&temp<=40.00){output_low(pin_e0);output_high(pin_e1);output_low(pin_e2);level2=t
rue;level1=false;level3=false;}
if(temp>40.00&&temp<=45){output_high(pin_e0);output_low(pin_e1);output_low(pin_e2);level3=true;l
evel1=false;level2=false;}
if(temp>45.00){level4=true;}
while(level1)// condition to increase temperature
{
if(on1==false){
output_high(pin_d0);
output_high(pin_d1);
output_high(pin_d2);
output_high(pin_d3);
output_high(pin_d4);
output_high(pin_d5);
output_high(pin_d6);


output_high(pin_d7);
}
on1=true;on2=false;on3=false;on4=false;
delay_ms(10);
temp = ADC_read(0);
waterlevel = ADC_read(1);
lcd_gotoxy(4,1);
printf(lcd_putc,"%.0f",temp);
lcd_gotoxy(9,1);
lcd_putc("INC");
lcd_gotoxy(7,2);
printf(lcd_putc,"%.0f",waterlevel);
if(waterlevel>255)CH=true;
if(waterlevel<255)CH=false;
while(CH)// condition to send sms for low water level
{
lcd_gotoxy(1,1);
lcd_putc(" ");
lcd_gotoxy(1,1);
lcd_putc("Sending...");
lcd_gotoxy(1,2);
lcd_putc(" ");
lcd_gotoxy(1,2);
lcd_putc("for low level");
delay_ms(10);


printf("at+cmgs = \"0706790430\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
printf("at+cmgs = \"0704881623\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
counterx1++;
if(counterx1==5){CH = false;counterx1=0;break;}
}
delay_ms(100);
counter1++;
if(counter1==600){counter1=0;level1=false;goto check;}
delay_ms(1);
}
while(level2)// condition to indicate stable level
{
if(on2==false)
{
output_low(pin_d0);


output_low(pin_d1);
output_high(pin_d2);
output_high(pin_d3);
output_high(pin_d4);
output_high(pin_d5);
}
on2=true;on1=false;on3=false;on4=false;
delay_ms(100);
temp = ADC_read(0);
waterlevel = ADC_read(1);
lcd_gotoxy(4,1);
printf(lcd_putc,"%.0f",temp);
lcd_gotoxy(9,1);
lcd_putc("STB");
lcd_gotoxy(7,2);
printf(lcd_putc,"%.0f",waterlevel);
if(waterlevel>255)CH=true;
if(waterlevel<255)CH=false;
while(CH)// condition to send sms in-case the water level is low
{
lcd_gotoxy(1,1);
lcd_putc(" ");
lcd_gotoxy(1,1);
lcd_putc("Sending...");
lcd_gotoxy(1,2);


lcd_putc(" ");
lcd_gotoxy(1,2);
lcd_putc("for low level");
delay_ms(10);
printf("at+cmgs = \"0706790430\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
printf("at+cmgs = \"0704881623\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
counterx2++;
if(counterx2==5){CH = false;counterx2=0;break;}
}
counter2++;
if(counter2==600){counter2=0;level2=false;goto check;}
delay_ms(1);
}
while(level3)// condition to ensure high temperatures are minimized
{


if(on3==false)
{
output_low(pin_d0);
output_low(pin_d1);
output_low(pin_d2);
output_low(pin_d3);
output_low(pin_d4);
output_low(pin_d5);
output_low(pin_d6);
output_low(pin_d7);
}
on3=true;on2=false;on1=false;on4=false;
delay_ms(100);
temp = ADC_read(0);
waterlevel = ADC_read(1);
lcd_gotoxy(4,1);
printf(lcd_putc,"%.0f",temp);
lcd_gotoxy(9,1);
lcd_putc("RED");
lcd_gotoxy(7,2);
printf(lcd_putc,"%.0f",waterlevel);
if(waterlevel>255)CH=true;
if(waterlevel<255)CH=false;
while(CH) // checking for low water level
{


lcd_gotoxy(1,1);
lcd_putc(" ");
lcd_gotoxy(1,1);
lcd_putc("Sending...");
lcd_gotoxy(1,2);
lcd_putc(" ");
lcd_gotoxy(1,2);
lcd_putc("for low level");
delay_ms(10);
printf("at+cmgs = \"0706790430\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
printf("at+cmgs = \"0704881623\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
counterx3++;
if(counterx3==5){CH = false;counterx3=0;break;}

}


counter3++;
if(counter3==600){counter3=0;level3=false;goto check;}
delay_ms(1);
}
while(level4)// temperature reduction
{
if(on4==false)
{
output_low(pin_d0);
output_low(pin_d1);
output_low(pin_d2);
output_low(pin_d3);
output_low(pin_d4);
output_low(pin_d5);
output_low(pin_d6);
output_low(pin_d7);

}
on4=true;on1=false;on2=false;on3=false;
delay_ms(100);
temp = ADC_read(0);
waterlevel = ADC_read(1);
lcd_gotoxy(4,1);
printf(lcd_putc,"%.0f",temp);
lcd_gotoxy(9,1);


lcd_putc("CRT");
lcd_gotoxy(7,2);
printf(lcd_putc,"%.0f",waterlevel);
if(waterlevel>255)CH=true;
if(waterlevel<255)CH=false;
while(CH) //checking for low water level
{
lcd_gotoxy(1,1);
lcd_putc(" ");
lcd_gotoxy(1,1);
lcd_putc("Sending...");
lcd_gotoxy(1,2);
lcd_putc(" ");
lcd_gotoxy(1,2);
lcd_putc("for low level");
delay_ms(10);
printf("at+cmgs = \"0706790430\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");
delay_ms(500);
putc(0x1A);
delay_ms(5000);
printf("at+cmgs = \"0704881623\"\r");
delay_ms(500);
printf("Low water level: Imediate Attention required");


delay_ms(500);
putc(0x1A);
delay_ms(5000);
counterx4++;
if(counterx4==5){CH = false;counterx4=0;break;}

}
counter4++;
if(counter4==600){counter4=0;level4=false;goto check;}
delay_ms(1);

}

delay_ms(500);
}
}
float ADC_read(int index)
{
float valueRead;
delay_ms(10);
if(index ==0)
{
set_adc_channel(index);
delay_ms(10);
valueRead = read_adc();


valueRead = valueRead * 0.489;
delay_ms(10);
return valueRead;
}
if(index ==1 )
{
set_adc_channel(index);
delay_ms(10);
valueRead = read_adc();
valueRead = valueRead * 0.48875;
delay_ms(10);
return valueRead;
}
}
void Initialize() // function for initializing gsm module
{
printf("ate\n\r");
delay_ms(500);
printf("at\n\r");
delay_ms(500);
printf("at+cmgf=1\n\r");
delay_ms(500);
printf("at^curc\n\r");
delay_ms(500);
printf("\"AT+CPMS=\"\"SM\",\"SM\",\"SM\"\n\r");


delay_ms(500);
printf("at+cmgd = 1,4\n\r");
delay_ms(3000);
printf("AT+CNMI=2,1,0,2,0\n\r");
delay_ms(500);
}

You might also like