call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
humidity sensor project
1. ECE503 PORTABLE HUMIDITY READER 2011
1.0 INTRODUCTION
This section will give a precise description on prior elements or purposes of this
project entitled the Portable Humidity Reader.
1.1 PROBLEM STATEMENT
Nowadays, there are lacks of awareness to the significant of humidity in our
life. Suitable humidity level is needed to stabilize our environment and the world
ecosystem including to ourselves.
The relative humidity in the air should be monitor in order to maintain an ideal
environment. The common problem result by humidity such as dampness, dryness
and condensation in surroundings cause discomfort and various problem to public.
Too high or too low humidity level condition can affect the quality of wood furniture
which needs an extra care of dry condition all the time.
For certain industry such as chickens eggs hatching or even the incubation of
immature new born chicks also needs a controlled humidity condition. In order to
ensure energy efficient and optimized results, proper controlled system need to be
designed. Development in sensor design lead sensor as main component to read some
of the parameters and microcontroller features make it preferred choice embedded
control to ease the end user to monitor the parameters, control devices and system
operation.
Hence we would like to propose this device that can read the humidity level
and the temperature in order to help us be aware of humidity condition around us.
1.2 OBJECTIVES
These are the objectives of our project;
I. To design a portable electronic device that can read humidity and temperature
level by using PIC 16F876A.
II. To stimulate and design the PCB layout using ALTIUM.
1
2. ECE503 PORTABLE HUMIDITY READER 2011
1.3 SCOPE OF PROJECT
Our project entitled Portable Humidity Reader is to read the level of humidity
and temperature in a particular room. The project will be using a humidity sensor
where the sensitivity is very high but quite costly as this is just the prototype of the
device. The roughly operation of this device is that once the ON/OFF button is
pressed once, the device will activated and the LCD will display both the reading of
humidity level and also temperature level and also that the reading is displayed by
output measured by the sensor continuously. The device will stop operating as the
ON/OFF button is pressed once again. The device will need a battery of 9V but the
voltage regulators will regulate the voltage to 5V for device usage. The size is about
16cm×11.5cm and hence it is quite handy for users. The accuracy of this device will
be depending on our sensor’s sensitivity used. The limitation of our project is that the
device is only specifically to display the reading of humidity and temperature on the
LCD provided. But this device are portable and available everywhere.
Figure 1.1 Block diagram of portable humidity sensor
2
3. ECE503 PORTABLE HUMIDITY READER 2011
1.4 STAKEHOLDER
All engineering projects are collaborative efforts. This collaboration is not
only the software designer and hardware designer who need to work together, sharing
design ideas, patterns, interfaces, architectures, standards, discovered faults and test
results but also between the users, and all other stakeholder. It could be argued that all
engineering projects are generally made up of three dimension (i) software
engineering; (ii) quality engineering and (iii) project management.
The software engineering dimension deals with the specification and building
of the system and focuses on activities such as requirement, design and development.
The quality engineering aspect deals with conformity to standards, configuration and
change management. While the project management dimension deals with planning,
scheduling, risk management and client management.
The two most common scenarios that occur in engineering projects are that the
end of the effort, the customer rejects the system that we done because does not fulfil
their requirements and the cost and schedule of the project increasingly grows. The
knowledge base, institutional and operation mechanism and skills of stakeholders are
all capacities that the project manager should access at the outset of the project.
Being aware of a stakeholder’s strengths and weakness can inform the design
and the design and implementation of project to help build the capacity of
stakeholders of participate effectively in the collaboration process. So in order to be
successful, all project stakeholders must actively work with the team to achieve these
goals.
In our group, the stakeholder consists of software designer, hardware designer
and project manager. This entire active role plays their task successfully. We discuss
together starting from collecting and analyzing information, defining priorities and
setting goals, deciding and planning project, managing projects, monitoring progress
of the projects and evaluating results and impacts.
3
4. ECE503 PORTABLE HUMIDITY READER 2011
PROJECT MANAGER HARDWARE DESIGNER/
TROUBLESHOOTER
NUR FATTAHIAH HASLAHUDDIN
SYED SHAMSUL AZHAR SYED
OTHMAN
CUSTOMERS
SOFTWARE DESIGNER
EN EZRIL HISHAM MAT SAAD
NORAZLIN MOHD RAZALI
GROUP MEMBER OF EE2405A
In conclusion, stakeholder participation within projects is both means and an
end. As a means, cooperation and the collaboration between managers and
stakeholders is the most important thing in the projects. As a end, participation on the
projects is a process that empowers stakeholders through skills, knowledge and
experience, leading to greater self-reliance and self-management.
4
5. ECE503 PORTABLE HUMIDITY READER 2011
1.4 DEFINITION, ACRONYMS AND ABBREVIATION
Humidity: the concentration of water vapour in the air. it can be expressed by
relative humidity, absolute humidity and specific humidity. This element depends on
the temperature and it gives adverse effect not only towards human health in fact all
life aspect.
Relative humidity: the actual quantity of water vapour present in a given space
expressed as a percentage of the quantity of water vapour that would be present in the
same space under saturation conditions at the same temperature.
Temperature:a degree of hotness.
LED: light emitting diode (LED) are diodes (electronics component that let
electricity pass in one direction that emit visible light when electricity is applied,
much like a light bulb.
LCD: stands for Liquid Crystal Display that are super-thin display that are used in
computer screens and flat panel monitors.
PCB: Printed Circuit Board that is a thin board made of fibreglass or a similar
material. We used PCB in order to design our circuit.
PIC: Peripherals Integrated Circuit.
MPLAB: Microchip programmer (software)
2.0 GENERAL DESCRIPTION
This section will specifically discuss the methodology to interfacethe sensor and
hardware module. The most important part is to enable the analogue sensor to sense
analogue data and represent it in digital. It can be done with various techniques. One of
the reliable techniques is to produce a relation between the sensor analogue range and
microcontroller analogue to digital converter (ADC) specification. This relation is based
on some calculation and will be clearly explained in the next section
After considering all the important software criteria, the flow of project continues
with the construction of hardware. The connection of sensor nodes and the related
component was built using printed circuit board (PCB). Before components were placed,
the PCB design was sketched by using Altium Designer Summer09.
5
6. ECE503 PORTABLE HUMIDITY READER 2011
Printed circuit board (PCB)
This design work as a connection reference needed for hardware including sensor
node interfacing with microcontroller. Most of the component in the designer does
not represent the actual components due to the software limitations. However, the main
concern is the exact holes connection. By following the layout, the complete design
was soldered.
6
7. ECE503 PORTABLE HUMIDITY READER 2011
2.1 SYSTEM FUNCTIONS
2.1.1HUMIDITY SENSOR
Module Humidity sensor HSM-20G.
Input 1. Batteries (9V),user button, temperature and humidity
reading
2. Surrounding (environment) humidity.
Output Humidity sensor will produce an analogue voltage then will go
through into analogue digital converter(ADC) on microcontroller
will give a digital voltage in order to get digital display the
reading of temperature in RH (relative humidity) and temperature
(Celsius)
-ADCNO=0b10000001 send 1 to enable ADC at last bit.
-ADCN1=0B01000100 send 0 to able ADC at last bit.
Functionality To convert sensor reading to voltage output.
7
8. ECE503 PORTABLE HUMIDITY READER 2011
2.1.2 MICROCONTROLLER
*28 pin-3 input ports, 14 interrupts, 5 analogue digital input channel
Module PIC 16F876A
Input Operates according to software programming commands.
Output Turn LED
-Send 1=active height
-Send 0=active low
the LCD display
- register to set LCD mode
RS at pin RB3
RW at pin RB2
E at pin RB1..2
LCD register need to be set(line,data width)
Functionality Process data to carry out the tasks.
8
9. ECE503 PORTABLE HUMIDITY READER 2011
2.1.3 VOLTAGE REGULATOR
Module Voltage regulator (VR-7805)
Input Voltage (9V)
Output Output current up to 1A,ouput voltage of 5-24V
Functionality Built –in current limiting, thermal shutdown, safe-operating area
protection which makes immune to damage from output overload.
2.1.4 UIC PROGRAMMER
Module UIC programmer
Input Reading from the sensor when PIC is on
Output Display the reading value at the LCD
Functionality To load software programming to the circuit.
2.1.5LCD
Module LCD (DS-LCD-162A)
Input Vr from power supply (battery) 9V Dc
Output Display both temperature and humidity reading in voltage and
degree Celsius (◦) respectively.
Functionality Display reading detected from the sensor.
Pin connection for LCD
9
10. ECE503 PORTABLE HUMIDITY READER 2011
1-GND 9-RC2
2-Vcc 10-RC3 Vdd=5V 10%
Vss=0V
3- Contrast (variable resistor) 11-RC4
Ta=25◦ c
4-RB3 12-RC5
5-RB2 13-RC6
6-RB1 14-RC7
7- RCO 15-Vcc
8-RC1 16-GND
2.2 USER INTERFACE
Generally, the goal of human-machine interaction engineering is to produce a
user interface which makes it easy, efficient, and enjoyable to operate a machine in
the way which produces the desired result. This generally means that the operator
needs to provide minimal input to achieve the desired output, and also that the
machine minimizes undesired outputs to the human. So our output is only to read the
value of humidity of the environment and detect temperature. First user will ON the
main switch to provide power to the circuit then sensor will operate that give a
analogue voltage that will give result in LCD. If the LCD is not give a reading users
need to press button reset to give a PIC reset an operation.
2.2.1 SCHEMATIC DIAGRAM
10
11. ECE503 PORTABLE HUMIDITY READER 2011
The following picture shows the circuit created by using Altium
Designer.
2.2.2 PCB
2.2.3 FLOW CHART (HARDWARE)
11
12. ECE503 PORTABLE HUMIDITY READER 2011
2.2.4 CODING PROGRAMME
#include <pic.h> //include PIC microcontroller library
// configuration
//=================================================================
=========
__CONFIG ( 0x3F32 ); //PIC microcontroller configuration
// define
//=================================================================
=========
#define rs RB3 //RS pin of LCD display
#define rw RB2 //R/W pin of the LCD display
#define e RB1 //E pin of the LCD display
#define b_light RB0 //Backlight of LCD display (high to on)
#define lcd_data PORTC //LCD display data PORT (8-bit)
#define led1 RA2 //led 1 (active high)
#define led2 RA5 //led 2 (active high)
12
13. ECE503 PORTABLE HUMIDITY READER 2011
// function prototype (every function must have a fucntion
prototype)
//=================================================================
=========
void delay(unsigned long data);
void send_config(unsigned char data);
void send_char(unsigned char data);
void lcd_goto(unsigned char data);
void lcd_clr(void);
void send_string(const char *s);
void send_num(unsigned short data);
unsigned char usart_rec(void);
void beep_short(void);
void beep_short2(void);
void beep_long(void);
unsigned char read_ad(unsigned char channel);
// global variable
//=================================================================
=========
// main function
//=================================================================
=========
void main(void)
{
//assign variable
unsigned char temp; //declare a temporary
variable for reading ADC
unsigned char mode; //declare a variable to
represent current mode
//set I/O input output
13
14. ECE503 PORTABLE HUMIDITY READER 2011
TRISB = 0b11110000; //configure PORT B I/O
direction
TRISA = 0b11011011; //configure PORT A I/O
direction
TRISC = 0b00000000; //configure PORT C I/O
direction
//configure lcd
send_config(0b00000001); //clear display at lcd
send_config(0b00000010); //Lcd Return to home
send_config(0b00000110); //entry mode-cursor increase 1
send_config(0b00001100); //diplay on, cursor off and cursor
blink off
send_config(0b00111000); //function set
//configure ADC
ADCON0=0b10000001; //enable ADC
converter module
ADCON1=0b01000100; //configure ADC
and ANx pin
//initial condition
b_light=1; //on backlight
lcd_clr(); //clear lcd
lcd_goto(0); //set the lcd cursor to
location 0
led1=1; //on led 1
led2=1; //off led 2
while(1) //infinity loop
{
14
15. ECE503 PORTABLE HUMIDITY READER 2011
lcd_goto(0); //set lcd
cursor to location 0
send_string("Humidity Sensor "); //display "Humidity Sensor"
temp=read_ad(1); //read AN1
(Humidity Sensor)
lcd_goto(20); //set lcd
cursor to location 20
send_num(temp);
//display the analog value of the gas sensor
}
}
// functions
//=================================================================
=========
void delay(unsigned long data) //delay function, the delay time
{
//depend on the given value
for( ;data>0;data-=1);
}
void send_config(unsigned char data) //send lcd configuration
{
rw=0; //set lcd to
write mode
rs=0; //set lcd to
configuration mode
lcd_data=data; //lcd data port = data
e=1; //pulse e to
confirm the data
delay(50);
e=0;
15
16. ECE503 PORTABLE HUMIDITY READER 2011
delay(50);
}
void send_char(unsigned char data) //send lcd character
{
rw=0; //set lcd to write
mode
rs=1; //set lcd to display
mode
lcd_data=data; //lcd data port = data
e=1; //pulse e to confirm
the data
delay(10);
e=0;
delay(10);
}
void lcd_goto(unsigned char data) //set the location of the lcd cursor
{ //if the
given value is (0-15) the
if(data<16) //cursor will be at
the upper line
{ //if the
given value is (20-35) the
send_config(0x80+data); //cursor will be at the lower
line
} //location of
the lcd cursor(2X16):
else // ----------------------
-------------------------------
{ // |
|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15| |
data=data-20; // |
|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35| |
send_config(0xc0+data); // --------------------------------
---------------------
16
17. ECE503 PORTABLE HUMIDITY READER 2011
}
}
void lcd_clr(void) //clear the lcd
{
send_config(0x01);
delay(600);
}
void send_string(const char *s) //send a string to display in the lcd
{
unsigned char i=0;
while (s && *s)send_char (*s++);
}
void send_num(unsigned short data) //function to display a value on lcd
display
{
unsigned char tenthou,thou,hund,tenth;
tenthou=data/10000; //get tenthousand
value
data=data%10000;
thou=data/1000; //get
thousand value
data=data%1000;
hund=data/100; //get hundred value
data=data%100;
tenth=data/10; //get tenth value
data=data%10; //get unit value
17
18. ECE503 PORTABLE HUMIDITY READER 2011
send_char(0x30+tenthou); //display the tenthousand value
send_char(0x30+thou); //display the thousand value
send_char(0x30+hund); //display the hundred value
send_char(0x30+tenth); //display the tenth value
send_char(0x30+data); //display the unit value
}
unsigned char read_ad(unsigned char channel) //fucntion read analog input according to the
given channel
{
unsigned char result; //declare a variable
call result
switch(channel)
{
case 0: //if
channel = 0
CHS2=0;
//CHS2=0
CHS1=0;
//CHS1=0
CHS0=0;
//CHS0=0
break;
case 1: //if
channel = 1
CHS2=0;
//CHS=0
CHS1=0;
//CHS=0
CHS0=1;
//CHS=1
break;
}
ADGO=1;
//start ADC convertion
18
19. ECE503 PORTABLE HUMIDITY READER 2011
while(ADGO); //wait for
ADC convertion to complete
result=ADRESH;
//read the result
return result; //return the
result
}
2.3 GENERAL CONSTRAINTS
General constraints specify information about what is and is not valid. They
differ from other constraints in having no restrictions on means or form of expression.
General constraints may be used to specify behaviors which are non-deterministic or
unconstrained for example software limitation, hardware limitation and system
limitation.
2.3.1SOFTWARE LIMITATION
There are several software limitations on this project for example when using
MPLAB IDE v8.30 we have to study in detail about this software and datasheet for
the component such as sensor, LCD, and turn on LCD. The other limitation is failure
in burning program in PIC because the requirement of burner to burn in PIC the
voltage of the PIC must not less than 4.5V.
The software under development is intended to be special-purpose software
focused tightly on customer needs. As such,the software is not intended to serve a
broad market or multiple customer, and the implementation of the software is not
required to be compatible with multiple platforms or interface standards beyond those
identification in the application design constraint.
2.3.2HARDWARE LIMITATION
19
20. ECE503 PORTABLE HUMIDITY READER 2011
This project has some mistake during using Altium designer summer09 for
example connection of ground and Vcc always interchange because the line is close
together. Limitation that commonly occurs in circuit is polarity of the component. In
our case the polarity of LED is in inverse direction so LED will not light up. Actually
on first design of PCB we forgot to put a switch on PIC that might be effect on our
result at LCD because there no reset buttons the circuit.
For LCD we have use 2 voltage regulator in order to get lighter backlight of
LCD, since that happen our voltage circuit drop about 4.3V whereas fail to burn
program in PIC. so we already take a solution about this problem whereas the other
voltage regulator that supply to LCD have omitted and the other voltage regulator in
result the voltage increase about 4.8V to achieve in burn program.
In other words troubleshooting is the best solution to achieve our goal in
getting perfect result.
2.3.3SYSTEM LIMITATION
On the system limitation we focus on our budget because totally our project is
too expensive to compare the other item on market. Because this is prototype so the
price is not an issue due to troubleshooting and other. Our dimension on project is not
totally exact with our first assumption that it can be a portable unit since our PCB is
larger than we expected.
3.0 ASSUMPTIONS AND DEPENDENCIES
20
21. ECE503 PORTABLE HUMIDITY READER 2011
Assumptions: the temperature is in range 0<temperature<100 degree Celsius.
This project is suitable in Malaysia because the temperature of this country is
not more than 100 degree Celsius. So our portable will cannot detect the temperature.
Dependency: Rapid review cycle
People work best when information is fresh in their minds. Therefore, it is
essential that documentation generated by the software development team be review
as quickly as possible, while the discussions that resulted in the documentation are
fresh in the minds of customer personal. A length review cycle typically leads to a
project becoming stagnant, and is one the leading causes of project abandonment.
Dependency: device is too sensitive and easily damaged.
Commonly the device that we use easily to broken when exposed to higher
temperature, that why we have leg of PIC for example.
4.0 REQUIREMENT DETAILS
21
22. ECE503 PORTABLE HUMIDITY READER 2011
Under this section, we will specifically describing the whole
procedures/system required for making this project of Portable Humidity Reader as a
reality. Here, we also temp to clearly explain the system operation.
4.1 CUSTOMER REQUIREMENTS
Basically, we firstly determined the purpose of this project and gather
information through various source for customer requirements. As to be discussed in
this final report, the Portable Humidity Reader should be capable as a monitoring
system for sensing humidity in the air. For customer requirements, we were required
to present the device as portable. Hence it is more energy efficient because the device
only needed a 9V battery to operate and therefore portable for customers usage where
ever they in need for humidity monitoring. Due to these characteristics of our device,
it is undeniable that this Portable Humidity Reader is handy and cost saving in terms
of electrical supply.
The other requirements for this project is that the device should be helpful to
show the reading of humidity sensor and here we present the data resulted by LCD
provided and the device also can be used by everyone through easily understanding
for units measured by the device. Through this Portable Humidity Reader , it
represent the humidity level that will be expressed as relative humidity (RH) which is
determined as a ratio of the current vapour pressure of water in air to the equilibrium
vapour pressure. A user manual should be provided to the customer suggesting that 65
to 85%(RH) is the most ideal range of humidity level. However the required humidity
level is dependent on the purpose of the usage of this Portable Humidity Reader. The
estimated cost for this device is approximately RM85 which is affordable for most
customers.
4.2 ENGINEERING EQUIPMENT
22
23. ECE503 PORTABLE HUMIDITY READER 2011
To accomplish this Portable Humidity Reader, we have listed all the required
components as the table below, together with their cost which deliberately represent
the overall cost of our project.
No. List of components Quantities Total cost
(RM)
1. PIC16F876A 1 25.00
2. LCD [blue] 1 25.00
3. Humidity Sensor 1 35.00
[HSM-20G]
4. PIC USB Programmer 1 58.00
5. LED [yellow & green] 4 0.80
6. Connectors [USB,LCD] 3 2.70
7. Resistors [10K,330R,47K] 5 0.25
8. Capacitors [100µ,0.1µ,30p] 10 2.10
9. Diodes [1N4148,1N4007] 1 0.20
10. Battery 9V[PANASONIC] 1 5.00
11. Voltage regulator 2 2.00
12. Battery connector 1 0.20
13. Crystal oscillator 1 1.50
14. Variable resistor 1 0.15
15. Switches 2 1.40
16. Casing [ordered-Perspex] 1 90.00
TOTAL (RM) 249.30
Hence, as for commercial distribution of this device, we hope to reduce the
cost for the manufacture since the total presented is only the cost for creating the
demo of this device.
4.2.1 HUMIDITY SENSOR
23
24. ECE503 PORTABLE HUMIDITY READER 2011
Humidity sensor is a devise consisting of a special plastic material whose
electrical characteristic change according to the amount of humidity in the air.
Basically, this sensor senses the amount of water vapour in air. For this project,
analogue input sensor was used. HSM 20-G is essential for the objectives and
applications where the reading in terms of Relative Humidity was converted into
standard voltage output. The applications include humidifiers and dehumidifiers, air
conditioner, humidity data loggers and automotive climate control.
4.2.2 PIC 16F876A
24
25. ECE503 PORTABLE HUMIDITY READER 2011
PIC 16F876A is chosen due to it characteristics that is suitable to this project
application. Based on the data sheet, these microcontrollers consist of 28pin that
include 3 input/output ports that will reduce the complexity of the system which is
suitable for the beginner, 14 interrupts and 5 port of A/D input channel.
4.2.3 PIC Kit Programmer
In order to load the program in the microcontroller, this software was used. This ad
all program made into internal memory of PIC16F876A. Once the HEX file was
created in MPLAB, this file will then be loaded into PIC16F876A using PIC Kit2.
4.2.4 LED (as an indicator)
25
26. ECE503 PORTABLE HUMIDITY READER 2011
Device that act as receiver thatindicates sensor node and overall system is working
by emitting low intensity light.This semiconductor diode has lower energy
consumption,longer lifetime, improvedrobustness, smaller size and faster switching.
4.2.5 Liquid Crystal Display (LCD)
An electronic display device which has a flat panel display type commonly used in
digital devices. In this project, LCD will display the readings and measurement of
parameters. LCD 2x 16 characters was used.
4.3 DESIGN SPECIFICATION
4.3.1 CONCEPTUALIZATION
26
27. ECE503 PORTABLE HUMIDITY READER 2011
It could be argued that humidity plays a part in every industrial production
process. The extent to which humidity plays a part in any given production
process may vary but in many cases it is essential that, at the very least, it is
monitored and, in most cases, controlled. It may also be said that humidity is a
more difficult property to define and measure than associated parameters such
as temperature and pressure. Indeed, it is a truly analytical measurement in
which the sensor must contact the process environment, in contrast to pressure
and temperature sensors, which are invariably insulated from the process by a
thermo well and a diaphragm respectively. Therefore we hereby try to come
out with our product of PORTABLE HUMIDITY READER. The primary
idea is focusing on how we can read humidity level in a room condition which
then allows us to monitor the level besides the temperature reading. Hence,
due to our specific function of device, we do not tend to include other extra
features as available like other devices of humidity reader such as Bluetooth,
USB data transfer, and so on. It shall be a portable device only to display the
humidity and temperature.
4.3.2 ANALYSIS
The portable reader that we designed is specifically focused on the reading
humidity and the temperature of the surrounding environment. The sensor that
we use in our project is HSM-20G.The specification of the sensor is a DC
5.0±0.2 V input voltage and the output voltage is 1-3V. The measuring
accuracy for the detection of humidity reading is ±0.05RH. The combination
of humidity output, with the temperature output being matching current or
voltage signal. The sensor is high sensitivity to humidity in the air. The
relationship between output voltage and temperature refer on figure below.
27
28. ECE503 PORTABLE HUMIDITY READER 2011
Based on figure 2.1, when the temperature goes higher than45℃, the output
voltage will become unstable. The relationship between output voltage and
humidity is as shown in figure 2.2 and table 1 below.
We use 9V of battery to supply on the portable humidity reader. We use the battery as the
power supply as our project is the portable unit, so it is better to use battery rather than
other power supply.
28
29. ECE503 PORTABLE HUMIDITY READER 2011
4.3.3 BLOCK DIAGRAM OF THE SYSTEM
Top-Down Design
Top-down design is the type of our design because we start from input to the output.
From sensor detector it will detect humidity level from surrounding and convert to
voltage to get level of humidity. So output voltage will be read in PIC based on our
program by using equation of gradient to get value humidity and temperature. Lastly our
PIC will give a command to display output of the system that it temperature and
humidity.
4.3.4 LEVEL DESIGN ARCHITECHTURE
Level 0: Our goal is to read/display the humidity level and temperature.
Level 1 Architecture
29
30. ECE503 PORTABLE HUMIDITY READER 2011
4.3.5 FULL ANALYSIS
Based on the synthesized system the objective of the project to design a portable
electronic device that can read humidity level by using PIC 16F876A and to stimulate,
design the PCB layout using ALTIUM is achieved. There are several risks that we have
to face, for example our project can only read humidity at certain point not continuously.
30
31. ECE503 PORTABLE HUMIDITY READER 2011
Based on this graph we can extract mathematical model as below;
Y=mx+ c
Y=value of voltage
X=temperature.
M=gradient of the slope.
= ( y-y1)/(x-x1 )
For example :
Equation for voltage Vs sensor
Y=mx+c
Y=0.1133x-2.833
This equation is used to find the value of temperature.
31
32. ECE503 PORTABLE HUMIDITY READER 2011
For this graph we extract the same mathematical model;
Y=mx+ c
Y=output of voltage
X=humidity level
M=gradient of the slope.
= (y-y1 )/(x-x1 )
This equation is used to get the value of humidity level.
For example : Equation for voltage vs humidity value
Y=mx+c
Y=1/3(x+1)
After determine mathematical model, we do some general analysis (simulation or
experimentally) by conducting it at different places to make sure our portable device
can operate smoothly. To make ensure the successfulness of our project, we redo
synthesis process to refine a solution such as how to make a simple humidity detector
with maximum efficiency. Then we analyze it again by taking an average of the
readings to get an accurate reading. Lastly we can evaluate the other alternative
solution by using different sensors to get the maximum sensitivity and therefore more
accurate results.
32
33. ECE503 PORTABLE HUMIDITY READER 2011
4.4 SYSTEM INPUT
The Portable Humidity Reader was using a humidity sensor as the only input
system which is a device consisting of a special plastic material that the electrical
characteristic change in accordance to the amount of humidity in the air. Basically,
this sensor senses the amount of water vapour in air. For this project, an analogue
input sensor was used that form the vital system input. HSM 20-G is essential for the
objectives and applications where the reading in terms of Relative Humidity was
converted into a standard voltage output. The system input for the Portable Humidity
Reader is best described as presented earlier in this final report. Please refer to Figure
2.1 (Block diagram of portable humidity sensor).
There are many reasons for choosing HSM 20-G as our humidity sensor. The
following points showed some of the reasons;
Small size makes it easy to conceal and suit current
miniaturization product.
Compatible with all types of microcontroller makes it reduces
the complexity of interfacing.
Very high sensitivity to humidity in the air and makes it
reliable.
4.5 SYSTEM OUTPUT
In order to present the system output, we use a LCD (2x16 characters) where
the output from the humidity sensor will be displaying both the temperature and
humidity level on the screen. The humidity level is shown as % of RH (relative
humidity) while temperature as unit of °C (degree of Celsius).
33
34. ECE503 PORTABLE HUMIDITY READER 2011
4.6 SYSTEM PROCESSES
The roughly operation of this device is that when the ON/OFF button is
pressed once by user, the device will activated and the LCD will display both the
reading of humidity level with temperature level and also that the readings is
displayed by output measured by the sensor continuously. The device will stop
operating as the ON/OFF button is pressed once again. The device will need a battery
of 9V but the voltage regulators will regulate the voltage to 5V for device usage.
In order to load the program in the microcontroller used which is
PIC16F876A, MPLAB was used for this Portable Humidity Reader. This software
will load all program made into internal memory of PIC16F876A. Once the HEX file
was created in the MPLAB, this file will then be loaded into PIC16F876A using PIC
Kit2.
To ensure the sensor works in the specified range, detailed programming must
be taken into consideration since the sensor is sensitive towards vapour produced by
exhalation or water heater. The programming is modified so that the LCD will display
the reading continuously measured by Humidity Sensor.
In circuit designated, a diode (1N4007) is use to protect the circuit from wrong
polarity supply. Few capacitors is used to stabilize the voltage at the input side of the
voltage regulator, while the other capacitors is used to stabilize the voltage at the
output side of the voltage supply from the 9V battery. The LED is a green LED to
indicate the power status of the circuit. A resistor is also used to protect LED from
over current which might burn LED.
MCLR, RB6 and RB7 need to be connected to the USB in Circuit Programmer
(UIC00A) to program the PIC microcontroller. At the same time, RB3 need to be pull
down to 0V to disable low voltage programming, because the programmer is using
high voltage programming.
The PIC16F876A will gather all analogue input data senses by the humidity
sensor and converted into digital output and shows through the LCD. The process is
in infinity loop operation as according to the programming loaded earlier into the PIC
microcontroller.
34
35. ECE503 PORTABLE HUMIDITY READER 2011
5.0 PROJECT SCHEDULE AND MILESTONES
Subject SEPT2011-DEC 2011(weeks)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Discussions with
customer
Searcha title of
project
First Present to
customer
Buying
components
Design PCB
Soldering
Second
presentation to
customer
Programming
Trouble-shooting
Final presentation
to customer
35
36. ECE503 PORTABLE HUMIDITY READER 2011
6.0 CONCLUSION AND RECOMMENDATIONS
CONCLUSION
Sensor technologies are developing fast with time and innovative technology. This
field is one of the most interesting areas to be discovered continuously. so many sensor
designs will come out and develop in future hence increasing the competitiveness between
researchers. This project is a minor contribution to interest of people. it also gives a very
basic understanding which will be a good learning process to the beginner. The hardware and
software part of this project is working based on the objectives mentioned before and based
on the conduct test or experiments held towards the end this project, suppose it will working
properly but due to some problem while troubleshooting the hardware and software we can’t
proved this project well. Through this project, it has much to teach us the meaning of patience
and a spirit of teamwork. Besides that, we also find that it is hard to produce electronic
products, and we very much appreciate the progress in electronics in recent times.
Even though our project does not work as we planned, we got a lot of experiences on
doing this microwave oven project. At least, we were now familiar on using an Altium
Software Designer to build our printed circuit board, PCB which can’t be obtained in other
subjects. A lot of question we asked to other friend, lecturers and the seniors to get a lot of
information to improve our knowledge and skills on Altium software. This will help us a lot
in our final year project soon.
RECOMENDATIONS
To improve it, a wireless communication can be set up to a portable, the ability of
monitoring system communication in spacious place and wide spectrum.
For further improvement, the research can add some features that enable the
master controller to control the sensing element, for example gas sensor.
36
37. ECE503 PORTABLE HUMIDITY READER 2011
7.0 REFERENCE
1) http://en.wikipedia.org/wiki/User_interface
2) http://osm7.cs.byu.edu/OSA/generalConst.html
3) http://ezril.uitm.edu.my/index.html
4) Parchizadeh.H “PIC project “2009.
5) Stephen R. Turns, 2006, Thermodynamics: Concepts and Applications, (Volume 1),
Cambridge of University Press
6) Norman A. Anderson, 1980, Instrumentation for Process Measurement and Control,
(3rd edition), University of Michigan: Chilton Co
7) R.C. Srivastava, Subit K. Saha and Abhay K.Jain, 2004, Thermodynamics: A Core
Course (2ndEdition), Prentice Hall if India Limited
8) http://saveenergy.about.com/od/efficientlighting/g/LED.htm
37