Professional Documents
Culture Documents
By
ABADI HAIDER MOHAMMED AHMED
INDEX NO.124061
Supervisor
Dr.Samah Mohamed Hashim
A REPORT SUBMITTED TO
University Of Khartoum
In partial fulfillment for the degree of
B.Sc. (HONS) Electrical and Electronics Engineering
(ELECTRONIC AND COMPUTER SYSTEMS)
Faculty of Engineering
Department of Electrical and Electronics Engineering
October 2017
DECLARATION OF ORGINALITY
Signature:_____________________
Name:________________________
Date:
i
ACKNOWLEDGEMENT
Huge efforts were made to achieve the objectives of this project. All gratitude and thanks goes to
Dr.Samah Mohammed Hashim for her valuable and decisive decisions and knowledge.
Huge thanks and admiration to engineer Mohammed Abdallah Mohammaed Al Wali for providing and
teaching us all the necessary knowledge we need to design our system on a printed board circuit and
giving us accessibility to advanced machines to design the printed board circuit.
Thanks to engineer Fath Al Rahman for helping us in finalizing and implementing the printed board
circuit.
Thanks to teacher Muhannad for his great knowledge to achieve this project.
DEDICATION
I dedicate this project to my family for their endless support and motivation throughout my life. I
thanks all my colleagues and friends for sticking with me until the end of this project.
Abstract
Servers are used in organizations for storing and securing important data and providing a connection
inside the organization (network). These data should be kept safe and accessed, therefore the safety of
servers is essential for an organization to fulfill its goals and objectives.
The Information Technology and Network Administration has servers that provide all important data and
network distribution inside the University of Khartoum. The servers are in rooms where they should be
kept in continuous observation and monitoring for keeping them safe and functional. Therefore, the
Information Technology and Network Administration requested a design of a temperature and humidity
system for the servers.
The goal of this project is to implement the temperature and humidity system that will perform the
observation and monitoring of the servers in the rooms, as well as sending alert messages to a specified
phone number when the temperature and humidity exceed certain values that might affect and damage the
servers. Another objective is to design a graphical user interface to give a user the control and accessibility
to change the settings of the temperature and humidity sensor by entering the values that might damage the
sensor and the desired phone number.
The temperature and humidity system was implemented on a Printed Circuit Board (PCB). The system
gave results when compared with other systems that measure temperature and humidity and gave a good
accuracy.
Vj A^u/Jl( A J^JJ JL^Jl jjijjj AAL^JI L/iLijJl UJLAIJJ UJ^^JJ ^i AJ^J^J
.I^JIJI^J /^iljAl AA^AAJI .^0^1 ^jjj^^ j^l AA^^ Uli ^J/JJ/JJ t/^jJl Jj‘^j!lj AAAI ^/J/JJJI O^A
J^.JJ AJL j^Jl A^AI^ J^IJ LijliYl A£J^JI ^OJJJ AAI^JI ^lil^l jijJ AJlj^ L^JJJ L/AJ^^I A£J^J Ai/oj Sjljl
Sjlj] LJJL t^J^J .^lil^l AJSIJ^^AJ /^ij/^j ^ijl J^UU SJAJUA AjSljA L^J UJ^J U' ^*.~V ^i ^jlj^Sl
Ailfll
^i ^jl^^Jl J^^jJj ^iljJ O’ l £ ‘-^j^ UA ^jJl AjjLjJlj Sjlj^Jl A^jjJ jLx/2^l ^l^i AJA,jA ^jj^^Jl 11A UA i iJgJl ^Jc. jJjJ J3 A
AJ* A AJS AjjLjJlj Sjlj^Jl A^jj ^j^H IAJJC. JJ^A U/A A^j ^Jl Jj/^j J/^jl ^J^£j ti jAl A^jJ Lljlj^l ^i jJJ*JJljA^^JJl UA
j/*/^Vl ^Jc. Jj^^^Jl AJ .AC.JJLAJ1 jJljjJl A^JJ Ajj^jJlj Sjlj^Jl A^jj A/^A AJ
I. DECLARATION OF ORGINALITY........................................................................................................................ I
II. ACKNOWLEDGEMENT....................................................................................................................................... II
IV. ABSTRACT......................................................................................................................................................... IV
V. V
TABLE OF CONTENTS................................................................................................................................................ VI
X. LIST OF ABBREVIATIONS............................................................................................................................... XV
1 CHAPTER 1: INTRODUCTION............................................................................................................................ 1
1.1 Overview...................................................................................................................................................................... 1
1.3 Objectives.................................................................................................................................................................... 1
1.4 Methodology................................................................................................................................................................ 1
2.1 Introduction................................................................................................................................................................. 3
2.2 Background and Motivation....................................................................................................................................... 3
2.7 Microcontrollers........................................................................................................................................................ 10
2.7.1 The PIC18F4550............................................................................................................................................... 11
2.8.2 SIM800............................................................................................................................................................. 12
4.2 Benchmarking........................................................................................................................................................... 45
6 REFERENCES.................................................................................................................................................... 53
LIST OF FIGURES
Figure 2.1 : Classification of Embedded systems......................................................................4
x
i
v
C LIST OF Celsius
ABBREVIATIONS
V Volt
A Ampere
mA MiliAmpere
Hz ESD ElectrostaticHertz
Discharge
uF Mircro Farard
PTC Positive Temperature Coefficient
EUSART
Enhanced Universal Asynchronous Receiver
Transceiver
ETSI
European Telecommunications Standards
Institute
AT Attention These
ATD Attention These Dial
x
v
i
Chapter One Introduction
CHAPTER 1: INTRODUCTION
1.1 Overview
A server room is used to power, store and operate computer servers that support enterprise applications
and secure critical data. As the servers contain data of high importance and perform very critical tasks,
their continuous operation is a necessity for any corresponding enterprise. Therefore countermeasures
need to be taken to ensure the servers reliability.
1.3 Objectives
• Design and implementation of a temperature and humidity monitoring embedded system.
1.4 Methodology
The taken approach was the division of the system into modules, where each module represents an
objective of the system. Such an approach was taken to facilitate the troubleshooting procedures during
the development of the system, in addition to improving the system maintainability and reliability. The
modules are to be combined to formulate a complete functional system.
1
Chapter One Introduction
Chapter Two: contains a brief background about the environment monitoring in server rooms. Chapter
Three: contains description of the design method used and how it was implemented in the simulation and
reality and brief description of the components used.
Chapter Four: provides the result obtained from the simulation and benchmarking of the embedded
system.
Chapter Five: provides the conclusion of the project and the potential future work and Improvements that
could be applied.
2
Chapter Two Literature Review
2.1 Introduction
Server rooms contain large and complex computers that control the flow of data and storage of said data for future use. An entire building
or a station with the same purpose is a data center. Server rooms or data centers require excellent monitoring of environmental threats such
as temperature, humidity, water leaks, intrusion, power outage and further on. In the aforementioned , temperature as well as humidity are
inconsistent environmental variables that need to be carefully monitored, for example computers generate heat during operation and
excessive heat bottlenecks the performance of computers, therefore maintaining a well air-conditioned room using temperature and
humidity monitoring techniques is essential for the continuous operation of computers for server rooms and data center [1].
In server rooms, avoiding downtime is critical. Temperature and humidity fluctuations can wreak havoc on server hardware and cause
costly outages. High temperatures and very low temperatures increase the risk of server failure and data loss, while low humidity means
that the dry air will lead to electrostatic discharge (ESD) which can damage critical server components, whereas too much humidity will
cause condensation, leading to hardware corrosion and equipment failure. A report from the Gartner Group in late 2003 estimated that the
average hourly cost of downtime for a computer network was $42,000, a more recent study estimates the cost of one hour of downtime has
reached about $336,000. Consequently researches have been conducted to identify a suitable range for temperature and humidity to
maintain good performance and high reliability. The American Society of Heating, Refrigerating and Air-Conditioning Engineers
(ASHRAE) recommends data centers and server rooms to maintain a temperature range of 68° to 75°F (20° to 24°C) and ambient relative
humidity levels between 45% and 55% [2].
In order to maintain the recommended ranges continuous air-conditioning and proper ventilation of the servers must be done along with
temperature and humidity monitoring, however such an
3
Chapter Two Literature Review
approach resulted in high power consumption due to the constant usage of ventilation systems. Advancements in the field lead
to the implementation of temperature and humidity control systems, which utilized ventilation systems by demand. Many
companies provide environmental conditions monitoring and control services for server rooms and data centers according to
ASHRAE standards. Most implementations of the monitoring or control systems are done as embedded systems.
Types Of Embedded
Systems
Embedded systems are primarily classified into different types based on the performance of the microcontroller or based on the
performance and functional requirements of the system embedded system as shown in Figure 2.1. Real time embedded systems are by far
the most critical category in terms of functionality and reliability.
4
Chapter Two Literature Review
Embedded systems find numerous applications in various fields such as digital electronics, telecommunications, computing network,
smart cards, satellite systems, military defense system equipment, research system equipment, and so on.
There are many different types of temperature sensors available and all have different characteristics depending upon their actual
application. A temperature sensor consists of two basic physical types:
• Contact Temperature Sensor: These types of temperature sensors are required to be in physical contact with the object
being sensed and use conduction to monitor changes in temperature.
• Non-contact Temperature Sensor: These types of temperature sensors use convection and radiation to monitor changes in
temperature and do not have to be in direct contact with the object being sensed.
The two basic types can be further sub-divided into the following three groups of sensors, Electromechanical, Resistive and Electronic.
2.4.1 Types of Temperature Sensors
1) Thermistors:-
A thermistor is a special type of resistor which changes its physical resistance when exposed to changes in temperature. Thermistors can
either have a Negative Temperature Coefficient of resistance (NTC), that is their resistance value decreases with an increase in
temperature, or have a Positive Temperature Coefficient (PTC), in which their resistance value increases with an increase in temperature.
5
Chapter Two Literature Review
An RTD, also known as a resistance thermometer, measures temperature by correlating the resistance of the RTD element with
temperature. An RTD element consists of a film or, for greater accuracy, a wire wrapped around a ceramic or glass core. The most
accurate RTDs are made using platinum but lower cost RTDs can be made from nickel or copper.
6
Figure 2.3 : A RTD
3) Thermocouple:-
Thermocouples are thermoelectric sensors that basically consists of two junctions of dissimilar metals that
are welded or crimped together. One junction is kept at a constant temperature called the reference (Cold)
junction, while the other the measuring (Hot) junction. When the two junctions are at different
temperatures, a voltage is developed across the junction which is used to measure the sensed temperature.
Humidity sensors or hygrometers, are used to measure humidity levels in the atmosphere by monitoring
the moisture and air temperature, and reporting the relative humidity (RH) in the air. Relative humidity is
the ratio of moisture in the air to the highest amount of moisture at a particular air temperature. All types
of sensors monitor the changes in the atmosphere in a fixed time in order to calculate the humidity in the
air [3].
1) Capacitive: A capacitive humidity sensor measures the relative humidity by placing a thin strip of
metal oxide between two electrodes. The electrical capacity of the metal oxide changes with the
atmosphere’s relative humidity. Capacitive sensors are robust against effects such as condensation
and temporary high temperatures but they are subject to contamination, drift and aging effects, but
are suitable for many applications.
2) Resistive: Resistive humidity sensors utilize ions in salts to measure the electrical impedance of
atoms. As humidity changes, so does the resistance of the electrodes on either side of the salt
medium. Resistive sensors are less sensitive than capacitive sensors. The accuracy and robustness
against condensation vary depending on the chosen resistive material.
Figure 2.6 : Resistive Humidity Sensor
3) Thermal: Two thermal sensors conduct electricity based upon the humidity of the surrounding air.
One sensor is encased in dry nitrogen or dry air (sealed) while the other measures ambient air
(vented). The difference between the two measures the humidity. These sensors measure absolute
humidity rather than relative humidity.
• Ultra-low cost
2.7 Microcontrollers
A microcontroller can be considered as a self-contained system with a processor, memory and peripherals.
Along with a variety of uses in electronic systems microcontrollers are particularly
used in embedded systems for real-time control applications with on-chip program memory and
devices.
The PIC18F4550 microcontroller has 40 pins. The pin configuration is shown in Figure 2.9 [6].
Global System for Mobile (GSM) is a wireless telephone technology that is used globally in phones. GSM
is developed by the European Telecommunications Standards Institute (ETSI) for mobile communications.
GSM uses a variation of time division multiple access (TDMA) and is the most widely used of the three
digital wireless telephony technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data,
then sends it down a channel with two other streams of user data, each in its own time slot. It operates at
either the 900 MHz or 1800 MHz frequency band. Since many GSM network operators have roaming
agreements with foreign operators, users can often continue to use their mobile phones when they travel to
other countries. Subscriber Identity Module (SIM) cards holding home network access configurations may
be switched to those will metered local access, significantly reducing roaming costs while experiencing no
reductions in service [7] [8].
2.8.1 AT commands
AT commands are instructions used to control a modem. AT is the abbreviation of attention. Every
command line starts with "AT" or "at". Many of the commands that are used to control wired dialup
modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state),
are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set,
GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM
technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS
(Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS
messages) [9].
2.8.2 SIM800
Components (e.g. capacitors, resistors or active devices) are generally soldered on the PCB using their
footprint or land pattern which is the arrangement of pads (in surface-mount technology) or through-holes
(in through-hole technology) used to physically attach and electrically connect a component to a printed
circuit board. PCBs can be single sided (one copper layer), double sided (two copper layers) or multi-layer
(outer and inner layers). Conductors on different layers are connected with vias. Multi-layer PCBs allow
for much higher component density. The manufacturing and assembly of PCB can be automated.
Manufacturing circuits with PCBs is cheaper and faster than with other wiring methods as components are
mounted and wired with one single part. PCBs are used in both desktop and laptop computers, TVs,
radios, digital cameras, cellphones ... etc. [10]
Figure 2.11 : A sample of PCBs
The Human Interface Device USB Class (HID) is mainly used for devices that allow human control over a
computer. Using these devices, the host is able to react on human input (e.g. movements of a mouse or
keypresses). This response has to happen quickly, so that the computer user does not notice a significant
delay between his action and the expected feedback, examples of HID class devices are keyboards, mouse,
display devices and gaming controllers. The USB HID class is defined in a number of documents provided
by the USB Implementers Forum's Device Working Group. The HID class is not necessarily a human
interface but a device using the HID class has to be able to work within the limits of the HID class where
the exchange of data between a device and a computer is in the form of reports with fixed length. HID
devices do not require the installation of special drivers as their drivers are generally implemented with the
operating system. [12]
Chapter Two Design and Implementation
3.1 Overview
Designing a fully operating embedded system requires steady and calculated steps to ensure
each part of the system is fulfilling its job to achieve the objectives. In this chapter we are
going to discuss the way the system was divided into modules, understand each module and
join the modules together to form the completed embedded system.
1
6
Chapter Two Design and Implementation
3.4.1 PIC18f4550
The following comparison was done in Table 3.1before choosing the PIC18F4550.
1
7
Chapter Two Design and Implementation
Features
The system requires a USB interface for the Configuration Graphical User Interface (GUI)
block and a considerable amount of flash memory, the most suitable choice is the
PIC18F4550.
1
8
Chapter Three Design and Implementation
The following comparison was done in Table 3.2 before choosing the DHT11 sensor.
Device
Features
20-90 % 0-100 %
5% 2-5%
The comparison between DHT11 and DHT22 shows that DHT22 is more accurate and has a wider range but is not the sensor that
was used in the system because the market availability considerations play a massive role while the DHT11 is available. Digital
sensors are better than analog sensor and more reliable.
3.4.3 SIM800 GSM Shield
For the ease of implementation, a development board for the sim800 was used instead of the actual SIM800. The board is called
1
9
Chapter Three Design and Implementation
• Two power supply interface: 5V-18V DC power supply or 3.5-4.2V power supply.
• Audio interface: using 3.5mm jacks for voice calls, voice playback and other functions.
• Micro-SIM card holder.
2
0
Chapter Three Design and Implementation
The board provides interface between the SIM800 and the outside world using the UART transmission and reception pins. The pinout of
the board is given in Table 3. 3 [13].
Table 3. 3 : UNVSIM800 Board Pinout
PIN Description
VDD Used to match the high voltage output of the TTL serial port.
GND Ground of the system
RXD
3V8 SIM800 data receiving end, need to connect the sending end of the
Input or output, when DCIN is connected to the power supply, the
external system.
output of this pin 3V8 DC voltage. When used as an input , this pin is
TXD used todata
supply power to the
SIM800 sending end, needdevelopment board
to connect the : 3.5 —end
receiving 4.2ofV.the
external system.
104nF capacitors
Required by the USB interface in the
PIC18F4550.
16x2 LCD
Used to display the sensor and other
outputs from the PIC18F4550
1K variable resistor
Used for the adjustment of contrast in the
LCD.
L7805CV 5 V regulator
To provide regulated 5 V from the 12V of
the DC supply.
USB connector
To connect the USB cable with the
PIC18F4550.
2
2
Chapter Three Design and Implementation
• MikroC for PIC compiler was used for the development and compilation of the C code for the PIC18F4550.
• Proteus simulator was used to design and simulate electronic circuits in each block, it was a major backbone for the development
and testing process.
• Visual Studio was used to develop the GUI for the sensor configuration using C# programming language.
• Altium Designer was used to construct the PCB circuit for the system.
The block diagram in Figure 3.4 represents the module. In this module, all the components require 5V dc supply for operation. The
DHT11 sensor will monitor the temperature and humidity, transmit the data to the microcontroller and the values will be displayed on
the LCD.
2
3
Chapter Three Design and Implementation
A flowchart on how the module will operate is shown in Figure 3.5. The start signal is a low level input signal sent for 18ms, without
the start signal from the microcontroller the DHT11 will not give response signal to microcontroller. DHT11 will send out low-
voltage-level for 80us as response signal, then a high level signal for 80us for preparation to send data. The microcontroller will check
for the response signal and the preparation signal to check whether the sensor is responsive or not.
2
4
Sendiheck Inva
start signal to response
sensor
whether the DHT11 va Receive data from
lid
from DHT11 sensor is \ c DHT11 sensor
valid or not. / no
Display
response from
the sensor
Yes
Process the data then display the temperature and humidity values.
The DHT11 will transmit data in the following format, 8bit humidity integer data + 8bit the Humidity decimal data + 8bit temperature
integer data + 8bit fractional temperature data +8 bit checksum for data integrity, however since the sensor is not accurate enough to
measure decimals
Chapter
the 8 bits Three
for decimal data will be transmitted as zeros. The data is saved andDesign andonto
displayed Implementation
the LCD.
LCD1
LK4
015L
T en p = 29° C
O ID=>5«76 y.
RH
CO
C0
>>>O KtO QQQQQQQQ
ID
UJ
RCQ/T10SOiT B15
RAG/ANO
3B RA1/AN1 RC1/T1
1CKI
OS ■ Fi
4B I/CCP2/UOE 16 1 gu
RA2/AN2/VREF-‘CVREF RC2/CCP1/P1A
5« ■23
6"
RA3/AN3-VREF+ RC4VD-/VM
24 re
RA4/T0CKI/C1OLTT/RCV RC5/D+/VP
7-
RA5/AN4/SS/LVDIN/C20UT RC6/TX/CK
■25 3.6
14« 2
13" RA6/OSC2.CLKO RC7/RX/DT/SDO 6 :
OSC1/CLKI
Si
R 3 ■ 1
S : 34« RBO/AN RD0VSPP0 ■ 9 m
e 12.,INT0,'FLT0/SDI.’,SDA RD1/SPP1
35 B
RB1 /AN 10/I NT 1 /SCKfSCL RD2/SPP2
■ ul
D 36B 21
■
4
u RB2/AN&1NTZVWO RD3VSPP3 22 ati
u 37"
R B3/A N 9/CC P2'VP 0 RD4VSPP4
■27
D
5
L
J
L
3
38"
RB4/AN11 /KBIO/CSSPP RD5/SPP5/P18
■28
2
D'GI
T
AL
on
o -
4
RB5/KBI1/PGM RD6/SPP0/P1C
■309
of
RB6/KBI2'PGC
RB7/KBI3PGD RD7/SPP7/P1D
0 th
VDD
RE0/AN5/CK1SP 3
DATA e
REVAN6/CK2SP
P 9
10 GND Te
i P RE2- ■1 l m
VUSB AN7/OESPP
F RE&WCLR/VPP DHT pe
11 ra
*TEXT tu
>
re
an
d
H
u
mi
dit
y
M
od
ul
e
2
6
Chapter Three Design and Implementation
3.6.2 GSM Communication Module
This module consists of the microcontroller and the UNVSIM800 development board interfaced together.
As a module both the microcontroller and the board operate using 5V of dc supply, however in the
complete system higher voltage must be supplied to the development board to account for the voltage
drop.
The RX and TX pins of the PIC18F4550 are connected with the TX and RX of the board for serial
transmission of the AT commands required to transmit the message using the GSM board. In the
simulation, a virtual terminal is used to mimic the SIM800 board.
Fi
gu
re
3.
9:
Fl
ow
ch
ar
t
of
th
e
G
S
M
m
od
ul
e
2
7
Chapter Three Design and Implementation
2
8
Chapter Three Design and Implementation
The shield in Figure 3.11 the LED will blink every 1 second if it is not operating properly, while blink
every 5 seconds if in proper operational mode.
• An implementation at the microcontroller side to store the configurations set by the user.
• A User interface to allow the user to the set the configuration.
The linkage of the two parts is done through USB interface. As soon as USB connection is made and the
clock speed of the microcontroller complies with the USB standards, USB device enumerations will occur
where the PIC18f4550 will send descriptor reports to identify itself as a HID class device and other
important parameters such as vendor and product ID, powering mode, endpoints used, reports length and
so on. Fi
gu
re
3.1
1:
G
S
M
M
od
ul
e
op
er
ati
ng
2
9
Chapter Three Design and Implementation
Fi
gu
re
3.
14
:
PI
C
18
F4
55
0
is
id
USB data is stored in USB RAM memory in the microcontroller. The memory allocation is as shown en
in
tif
Figure 3.15, thus USB data is limited to that address space. ie
d
as
H
ID
de
vi
ce
3
0
Chapter Three Design and Implementation
OOO
h
Banks 0 User Data
to 3
3FFh
Buffer Descnptors. USB 400h
Data or User Data 4FFh
500h
Banks
4
USB Data or
to 7 User Data
(USB
RAM)
7FFh
BOO
h
Banks 8 .
Unused
to 14
FOO
h
F60h
Bank15 ' SFRs FFFh
Figure 3.15 : PIC18F4550 USB
RAM memory
3
1
fF X
8 New Project - Proteus 8 Professions! - Schematic Capture
3H
: Capture X
ft |
.lINTER Field Value
NAL.
F'CVtg
RLP
l-l-ICjlNTSRNAL;
POWERuF
G€T_DeSCRIPT
OR_
H-|l,JINTERNAL
RESET
Q
B
CAP
r:IS
CRYST
GET.DeSCRIP
I^IQlOCa
F
RES J
f USB Sensor Control TCR
FRO)^DEVICE
L : K..
-
UNIVERSITY ■*: OF
KHARTOUM
9 USB
Anal
<? I yzer
&
I|
A|Q INTERNAL RESET
ICCTL
&ET_D£S
CRIFTQR
CONTROL_TRANSFER
CAP GETDESC
_FRQM_C
R
CAYSlI
€VI CE
IPTOR_FR
F :: 13F
RES
US ECO
j
’I' USB Sensor Control
OUD€VtC
E
UNIVERSITY OF KHARTOUM
Humdity
In order to achieve a fully functioning system, the modules must be combined into a full complex system.
This procedure was done using Altium Designer by constructing a PCB that will include the modules and
other required components as stated in Table 3.5.
In order to construct a PCB, a circuit schematic is needed first Figure 3. 19 shows the schematic.
Fi
gu
re
3.
19
:
C
o
m
pl
et
e
Sy
ste
m
Sc
he
m
ati
c
3
3
Further comes the construction of the components footprints and importing the footprints into the PCB
file. Tracks are used to connect the components together, the fully routed board is shown in Figure 3.20.
The bottom layer represents what should be on the bottom side of the board, which means anything
depicted as blue should be implemented on the bottom side. While red represents the top layer indicating
what should be done on top. This PCB is single sided as can be seen in Figure 3.20, Figure 3.21 no tracks
are visible on the top side and all the connections are made on the bottom side. The yellow represents the
silk screen or the overlay layer which is used for the naming of components or any other writings, finally
the pink represents the mechanical layer which indicates where cutting of the board should occur.
Afterwards, the board must be fabricated. The fabrication process starts with the drilling of the holes, pads
and vias required on the board, then a mechanical outline is performed to determine the size of the board.
After that the drilling of the tracks begins, once finished the board is cut off the sheet.
Fi
gu
re
3.
22
:
P
C
B
Fa
br
ica
tio
n
3
5
Chapter Three Design and Implementation
Fi
gu
re
3.
23
:
P
C
B
Fa
br
ic
ati
on
3
6
Chapter Three Design and Implementation
Fi
gu
re
3.
25
:
P
C
B
Fa
br
ica
tio
n
3
7
Normally the next step would be fabricating the solder mask layer, however the chemicals required to
create the mask were not available .Thus, the final step was to solder the components onto the board as
shown in
The system implementation was based on DHT22 because of its better qualifications but due to the lack of
market availability in Sudan and delivery problems, the DHT11 was used instead and set the accuracy of
the system to a lower grade.
The UNVSIM800 was an alternative component , being the UNVSIM900 was the intended one but market
availability played a role as well. A slight voltage drop below 5V caused the board to not function
properly and costed us a lot of time. The introduction of a 12V DC supply and L7805CV 5 V regulator
was taken. Other alternatives were taken but didn’t give results.
The lack of solder mask on top of the copper in the PCB caused delays in the process of making the PCB ,
as the solder will stick to as much copper as it can which if left unhandled will definitely create a short
circuit and possibly ruin the entire board. Soldering required meticulous work and high precision.
Tracks are made on the PCB to connect components together where it allows electricity to flow through
them. If a certain amount of voltage crosses a think track, it might possibly burn the track or the pad from
all the resistance. Therefore having wider tracks or pads when connected to high voltages will not be
damaged.
4
0
CHAPTER 4: RESULTS AND DISCUSSION
4.1 End Result
4.2 Benchmarking
4.2.1 Temperature Measurement
The sensor was benchmarked twice using two different methods. In the first benchmark an analog temperature sensor (Anymetre) and a
Thermotron [14] were used as basis of comparison.
Chapter Four Results and Discussion
Fi
gu
re
4.6
:
Th
er
m
ot
ro
n
Co
nt
rol
Pa
d
4
3
Figure 4.7 : Analog Temperature meter reading (Anymetre)
40 °C 35 C 36 C
30 C 32 C 34 C
20 C 24 C 28 C
As seen in Table 4.1 the results from the DHT11 and the Anymetre are in close proximity, however they
deviated from the Thermotron which I believe is due the Thermotron very slow response and behavior, as
temperature is dynamic and can rapidly change in short intervals of time that are faster than the Thermotron
response.
The second comparison was done using a standard thermometer Figure 4.9, Table 4.2 shows the
measurements of the thermometer against the DHT11 sensor under a predefined air conditioner temperature
value.
Figure 4.9 : Thermometer
23°C 23 °C 23 °C
19°C 20°C 20°C
The measurements are relatively the same which indicates a good level of accuracy for the DHT11 sensor.
As a suitable humidity sensor was not found to perform benchmarking with, it was decided to use two
DHT11 sensors and compare their humidity readings. Table shows the comparison.
The readings are almost identical for the two sensors, which indicates some credibility to the DHT11 sensor
humidity measurement.
Chapter Five Conclusions and Future Work
If we increase the size of the LCD we would be able to add more icons such as battery percentage, date
and time in order to improve the interaction with the user and make it easier..
Using logs help keep track of measured data by the sensor at set intervals of time to give an observation
of the environment. These observations can be used to identify abnormal behavior and countermeasures
could be done.
• To increase the number of phones that the alert message will be sent to, in order to ensure other user
receiving the messages in case failure to deliver to the main intended user .
• The ability to charge the SIM card through the interface.
In case the power goes out, the system needs an internal power supply to ensure the continuous monitoring of
the environment.
4
8
REFERENCES
[1] Prathamesh Narkhede, Bhushan Kiratkar, Bhushan Suryawanshi, "Physical Conditions Monitoring
in Server," International Journal of Electrical and Electronics Research, vol. Vol. 3, no. Issue 4, p.
3, December 2015.
[2] R. Grundy, "Recommended Data Center Temperature & Humidity," AVTECH, 14 November 2005.
[Online]. Available: https://avtech.com/articles/3647/recommended-data-center- temperature-
humidity/.
[3] S. International, "Different Types Of Humidity Sensors," 24 February 2016. [Online]. Available:
http://www.switches.co.za/different-types-humidity-sensors/.
[4] D.-R. UK, "DHT11 Humidity & Temperature Sensor," 30 July 2010. [Online]. Available:
www.droboticsonline.com.
[5] L. Aosong(Guangzhou) Electronics Co., "Temperature and humidity module DHT11 Product
Manual," [Online]. Available: www.aosong.com.
[8] M. Rouse, "GSM (Global System for Mobile communication)," May 2007. [Online]. Available:
http://searchmobilecomputing.techtarget.com/definition/GSM.
[10] Wikipedia, the free encyclopedia, "Printed circuit board," [Online]. Available:
https://en.wikipedia.org/wiki/Printed_circuit_board#cite_ref-1.
4
9
[11] T. Fisher, "Universal Serial Bus (USB)," 28 August 2017. [Online]. Available:
https://www.lifewire.com/universal-serial-bus-usb-2626039.
[12] USB.org, "Device Class Definition for HID 1.11," 21 January 2001. [Online]. Available:
www.usb.org/developers/hidpage/HID1_11.pdf.
[13] Globals, "Global Hawk electronic UNV-SIM800 voice board," [Online]. Available:
http://en.globals.social/item.html?id=tb38636874126.
5
0
Appendix A MikroC Codes
unsigned char readbuff[64] absolute 0x500; // Buffers should be in USB RAM unsigned char writebuff[64] absolute 0x540;
A-
1
Appendix A MikroC Codes
void interrupt(){
unsigned Temp, RH, Sum ; char message1 []= "Temp = 00 C "; char
void Initialization) {
UART1_Init(9600);
delay_ms(1000);
void eeprom(){
tmp[i] = count;
}
hum[i] = count;
}
number1[i] = count;
}
A-
2
void Sms_temp()
UART1_Write_Text("AT");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT0");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT+CMGF=1");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT+CMGS=");
Delay_ms(200);
UART1_Write(0x22); // "
Delay_ms(200);
UART1_W rite_Text(number1);
Delay_ms(200);
UART1_Write(0x22); // "
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART_Write(26);
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
void Sms_hum()
UART1_Write_Text("AT");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT0");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT+CMGF=1");
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART1_Write_Text("AT+CMGS=");
Delay_ms(200);
UART1_Write(0x22); // "
Delay_ms(200);
UART1_W rite_Text(number1);
Delay_ms(200);
UART1_Write(0x22); // "
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
UART_Write(26);
Delay_ms(1000);
UART_Write(0x0D);
Delay_ms(1000);
PORTD.F0 = 0; delay_ms(18);
PORTD.F0 = 1; delay_us(40);
TRISD.F0 = 1;
}
void CheckResponse(){
{ delay_us(80);
ADCON1 |= 0x0F;
CMCON |= 7; eeprom();
Lcd_Init();
Lcd_Cmd(_LCD_CURSOR_OFF);
Initialization();
Lcd_Cmd(_LCD_CLEAR);
StartSignal();
CheckResponse(); if(Check == 1){
RH_byte1 = ReadData();
RH_byte2 = ReadData();
T_byte1 = ReadData();
T_byte2 = ReadData();
Sum = ReadData();
RH = RH_byte1;
message1 [7] = 48 + ((Temp / 10) % 10); message1 [8] = 48 + (Temp % 10); message1 [9] = 223;
delay_ms(5000);
Sms_temp();
delay_ms(300000) ;
delay_ms(5000);
Sms_hum();
delay_ms(300000);
delay_ms(5000);
Sms_temp();
Sms_hum();
delay_ms(300000);
}
else{
Lcd_Cmd(_LCD_CURSOR_OFF);
error");} }
else {
sensor");
}
delay_ms(1000);
if(readbuff[0]=='9'){
while(1){
if(readbuff[0]=='0'){ for(cnt=1;cnt<64;cnt++)
EEPROM_Write(0x00+i,count); delay_ms(500); }
}
{ count = hum[i];
if(readbuff[0]=='2'){
for(cnt=1;cnt<64;cnt++) number1[cnt-1]=readbuff[cnt];
const char USB_SELF_POWER = 0x80; // Self powered 0xC0, 0x80 bus powered
} device_dsc = {
0x12, // bLength
0x01, // bDescriptorType
0x0200, // bcdUSB
0x00, // bDeviceClass
//
0x00,
bDeviceSubClass
0x00, // bDeviceProtocol
8, // bMaxPacketSize0
USB_VENDOR_ID, // idVendor
A-
12
Appendix A MikroC Codes
0x01, // iManufacturer
0x02, // iProduct
0x00, // iSerialNumber
0x01 //bNumConfigurations
};
char configDescriptor1[]= {
// Configuration Descriptor
zero
// Endpoint Descriptor
};
const struct {
char report[USB_HID_RPT_SIZE]; }
hid_rpt_desc =
// Input report
0x15, 0x00, // Logical Minimum (data bytes in the report may have minimum
value = 0x00)
0x26, 0xFF, 0x00, // Logical Maximum (data bytes in the report may have maximum
value = 0x00FF = unsigned 255)
// Output report
} strd1 = {
A-
16
4,
0x03,
{0x0409}
string[16];
}strd2={
{'M','i','k','r','o','e','l','e','k','t','r','o','n','i','k','a'}
};
string[10];
}strd3={
0x03,
','S','e','n','s','o','r'}
char* USB_string_dsc_ptr[3];
void USB_Init_Desc(){
USB_config_dsc_ptr[0] = &configDescriptor1;